From: Markus Date: 2004-08-28T06:00:57+09:00 Subject: Re: [BUG] Frequent Segfault with stable snapshot 2004-08-23 It may be something data dependent. Could you try this: * take it out of the class String and do it inline, with self being replaced by my_string or something * replace my_string with it's value * ls the directory on which it crashes to a file. * make a little sample app in which the array is built (via %w{} say) without using Dir * Do a binary-search-ish reduction to find the smallest array-of-strings on which delete("xxxx/..") segfaults The simplest case in which it fails is often the most enlightening. Other questions: * Have you tried it on multiple machines * How frequently does it fail? Always on a particular directory? Sometimes, on any directory? Occasionally, with no real pattern? Only when ruby is compiled with your personal fork of glibc? (Just kidding about the last one, I hope). -- MarkusQ On Fri, 2004-08-27 at 13:32, Andrew Walrond wrote: > Since upgrading from a stable snapshot dated 2004-05-26 to a recent one dated > 2004-08-23, I am getting regular segfaults from a ruby script which has worked > flawlessly for ages. > > The output looks like this: > > /home/andrew/rubyx/lib/ruby/site_ruby/rubyx/strfile.rb:54: [BUG] Segmentation fault > ruby 1.8.2 (2004-08-22) [i686-linux] > > Aborted > > > The relevant portion of code is this ls() function added to the String object. > The offending line 54 is indicated with * > > class String > def ls() > fa=Dir.glob(self+"/{.,}?*") > * fa.delete(self+"/..") > return fa > end > end > > Anything relevant changed recently? > > Andrew Walrond