[MacRuby] #1050: Segfault occurs with Rake::namespace.

MacRuby ruby-noreply at macosforge.org
Wed Dec 15 18:25:39 PST 2010


#1050: Segfault occurs with Rake::namespace.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 require 'rake'

 def defmock(sym, &block)
   class << @mock; self; end.class_eval do
     define_method(sym, block)
   end
 end

 @app = Rake.application
 Rake.application = @mock = Object.new

 args = []
 defmock(:in_namespace) {|a, *| args << a}
 namespace "xyz" do end
 }}}

 BacTrace:
 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000005
 0x000000010013c350 in vm_block_eval [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:1153
 1153                    new_argv[i] = i < argc ? argv[i] : Qnil;
 (gdb) bt
 #0  0x000000010013c350 in vm_block_eval [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:1153
 #1  0x000000010013c350 in rb_vm_block_eval2 (b=0x2002b6c60,
 self=8592780032, sel=0x103d73280, argc=2847616, argv=0x5) at
 dispatcher.cpp:1214
 #2  0x0000000100137013 in ruby_dispatch [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:452
 #3  0x0000000100137013 in rb_vm_dispatch () at dispatcher.cpp:1214
 #4  0x0000000103b00c26 in ?? ()
 #5  0x0000000103b328e0 in ?? ()
 #6  0x00000001001375e6 in __rb_vm_rcall [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:161
 #7  0x00000001001375e6 in ruby_dispatch [inlined] () at /Users/watson/src
 /macruby-trunk-svn/dispatcher.cpp:466
 #8  0x00000001001375e6 in rb_vm_dispatch () at dispatcher.cpp:1214
 #9  0x0000000103b00c26 in ?? ()
 #10 0x0000000103b00375 in ?? ()
 #11 0x00000001001519cd in rb_vm_run (fname=0x20004f4a0
 "/Users/watson/tmp/test_rake.rb", node=0x2000551a0, binding=0x0,
 inside_eval=false) at vm.cpp:3928
 #12 0x0000000100038479 in ruby_run_node (n=0x2000551a0) at eval.c:211
 #13 0x0000000100000c15 in main (argc=3, argv=0x100e1de30,
 envp=0x7fff5fbfee60) at main.cpp:40
 Current language:  auto; currently objective-c++
 (gdb)
 }}}

 By the following commands, could confirm a this problem.
 {{{
 On MacRuby source directory:
 $ cd test/test-mri/
 $ macruby -r require_relative.rb test/rake/test_top_level_functions.rb -v
 }}}

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



More information about the macruby-tickets mailing list