From: Eric Hodel Date: 2006-06-27T06:06:22+09:00 Subject: Re: Segfault in rb_ary_push, ruby 1.8.4 (2005-12-24) [powerpc-openbsd3.8] On Jun 26, 2006, at 12:40 PM, Sam Stephenson wrote: > Hi, > > I have a Ruby script that segfaults after a few days with: > > ./script/../lib/cardinal/handler.rb:30: [BUG] Segmentation fault > ruby 1.8.4 (2005-12-24) [powerpc-openbsd3.8] > > The line in question is: > > 29 def handles_response?(method) > 30 public_methods.grep(method.to_s).first > 31 end > > A complete backtrace follows. Hope this helps. (I've not yet tried > to reproduce the bug in 1.8.5-preview1.) Do you have a script to reproduce this? Three lines of ruby aren't (sometimes) enough. > Program received signal SIGSEGV, Segmentation fault. > rb_ary_push (ary=805306368, item=832938624) at array.c:403 > 403 rb_ary_store(ary, RARRAY(ary)->len, item); What is item? What is ary? > #8 0x01811e98 in rb_eval (self=832941192, n=0x31a5a280) at ruby.h:638 > #9 0x01811d8c in rb_eval (self=832941192, n=0x31a5a280) at eval.c: > 3375 If you need to look farther up the stack, you'll need to compile with a lower optimization level. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com