[MacRuby] #1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads

MacRuby ruby-noreply at macosforge.org
Mon Jul 4 00:01:34 PDT 2011


#1349: Segfault occurs when invoked String#to_sym and Proc.new in some threads
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 Thread.new {
   10000.times do |i|
     "test#{i}".to_sym
   end
 }

 10000.times do |i|
   Proc.new{puts i}
 end
 }}}

 BackTrace:
 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
 0x00007fff83cc3c00 in strlen ()
 (gdb) bt
 #0  0x00007fff83cc3c00 in strlen ()
 #1  0x000000010012d622 in rb_vm_dispatch () at dispatcher.cpp:698
 #2  0x00000001000d9dc9 in rb_vm_call0 (vm=0x100f231c0, top=0,
 self=8590528320, klass=0x200094800, sel=0x0, block=0x0, opt=2 '\002',
 argc=0, argv=0x0) at vm.h:654
 #3  0x00000001000daeee in rb_vm_call2 (block=0x0, self=8590528320,
 klass=8590542848, sel=0x0, argc=0, argv=0x0) at vm.h:679
 #4  0x00000001000dad8e in rb_call (recv=8590528320, mid=8160, argc=0,
 argv=0x0, scope=1, pass_current_block=false) at vm_eval.c:32
 #5  0x00000001000db162 in rb_funcall2 (recv=8590528320, mid=8160, argc=0,
 argv=0x0) at vm_eval.c:112
 #6  0x00000001000292c2 in rb_obj_call_init (obj=8590528320, argc=0,
 argv=0x0) at eval.c:589
 #7  0x0000000100032499 in rb_proc_s_new (klass=8590542848,
 sel=0x7fff880b1e60, argc=0, argv=0x0) at proc.c:334
 #8  0x000000010012e2b3 in ruby_dispatch [inlined] () at /Users/watson/src
 /macruby-master/dispatcher.cpp:448
 #9  0x000000010012e2b3 in rb_vm_dispatch () at dispatcher.cpp:872
 #10 0x00000001016004f4 in ?? ()
 #11 0x0000000101600b48 in ?? ()
 #12 0x0000000100134ccb in __rb_vm_bcall [inlined] () at /Users/watson/src
 /macruby-master/dispatcher.cpp:100
 #13 0x0000000100134ccb in vm_block_eval [inlined] () at /Users/watson/src
 /macruby-master/dispatcher.cpp:1221
 #14 0x0000000100134ccb in rb_vm_yield_args () at dispatcher.cpp:1278
 #15 0x00000001000db2fd in rb_vm_yield (argc=1, argv=0x7fff5fbfccb8) at
 vm.h:697
 #16 0x00000001000db2d0 in rb_yield (val=1385) at vm_eval.c:183
 #17 0x000000010004d1da in int_dotimes (num=40001, sel=0x100fe7350) at
 numeric.c:3241
 #18 0x000000010012e8b4 in __rb_vm_rcall [inlined] () at /Users/watson/src
 /macruby-master/dispatcher.cpp:159
 #19 0x000000010012e8b4 in ruby_dispatch [inlined] () at /Users/watson/src
 /macruby-master/dispatcher.cpp:466
 #20 0x000000010012e8b4 in rb_vm_dispatch () at dispatcher.cpp:872
 #21 0x00000001016004f4 in ?? ()
 #22 0x000000010160012a in ?? ()
 #23 0x000000010014a072 in rb_vm_run (fname=0x2000a7340
 "/Users/watson/tmp/t.rb", node=0x2000249e0, binding=0x0,
 inside_eval=false) at vm.cpp:4115
 #24 0x000000010002898b in ruby_run_node (n=0x2000249e0) at eval.c:211
 #25 0x0000000100000be3 in main (argc=2, argv=0x100f1c040,
 envp=0x7fff5fbfde58) at main.cpp:40
 (gdb)
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1349>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list