[MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor.

MacRuby ruby-noreply at macosforge.org
Thu Jan 6 06:02:18 PST 2011


#1025: Sandbox#apply! causes segfault when no argument is passed to constructor.
-----------------------------+----------------------------------------------
 Reporter:  rob@…            |        Owner:  lsansonetti@…        
     Type:  defect           |       Status:  reopened             
 Priority:  blocker          |    Milestone:  MacRuby 1.0          
Component:  MacRuby          |   Resolution:                       
 Keywords:                   |  
-----------------------------+----------------------------------------------

Comment(by watson1978@…):

 Case of Segfault:
 {{{
 $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -e 'Sandbox.new.apply!'

 (gdb) b rb_sandbox_init
 Breakpoint 1 at 0x20c49ba554b042: file sandbox.c, line 34.
 (gdb) r
 Starting program: /Users/watson/src/macruby-trunk-svn/macruby -e
 Sandbox.new.apply\!
 Reading symbols for shared libraries .++++........................ done
 Reading symbols for shared libraries . done
 Reading symbols for shared libraries .. done

 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000068
 0x00007fff88414339 in flockfile ()
 (gdb)

 }}}

 Case of Success:
 {{{
 $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -e 'Sandbox.no_internet.apply!'

 (gdb) b rb_sandbox_init
 Breakpoint 1 at 0x20c49ba554b042: file sandbox.c, line 34.
 (gdb) r
 Starting program: /Users/watson/src/macruby-trunk-svn/macruby -e
 Sandbox.no_internet.apply\!
 Reading symbols for shared libraries .++++........................ done
 Reading symbols for shared libraries . done
 Reading symbols for shared libraries .. done

 Program exited normally.
 (gdb)

 }}}

 Will it be a meaning that it is a problem that #initialize is not called?

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1025#comment:5>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list