[MacRuby-devel] [MacRuby] #227: Using a block's binding causes segfault
MacRuby
ruby-noreply at macosforge.org
Mon Mar 9 00:23:39 PDT 2009
#227: Using a block's binding causes segfault
------------------------------------+---------------------------------------
Reporter: charles.nutter@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.4
Component: MacRuby | Keywords:
------------------------------------+---------------------------------------
Under all version of Ruby, you can use the binding associated with a block
for further evals. This appears to segfault MacRuby 0.4:
{{{
~/projects/jruby ➔ macruby -e "def foo(&b); eval 'a = 2', b.binding; end;
a = 1; foo {}; puts a"
-e:1: [BUG] Bus Error
MacRuby version 0.4 (ruby 1.9.1) [universal-darwin9.5, i386]
-- stack frame ------------
0000 (0x30030): 00000004
0001 (0x30034): 00000000
0002 (0x30038): 00000004
0003 (0x3003c): 00000000
0004 (0x30040): 00000003
0005 (0x30044): 00000004
0006 (0x30048): 01018a80
0007 (0x3004c): 00000004
0008 (0x30050): 010183a0
0009 (0x30054): 00000004
0010 (0x30058): 01018370
0011 (0x3005c): 00000004
0012 (0x30060): 01048730
0013 (0x30064): 010183a0
0014 (0x30068): 00000004
0015 (0x3006c): 00000000 <- lfp <- dfp
-- control frame ----------
c:0005 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :binding
c:0004 p:0011 s:0013 b:0011 l:000010 d:000010 METHOD -e:1
c:0003 p:0016 s:0007 b:0007 l:000fe8 d:000fe8 TOP -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited:
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP
---------------------------
DBG> : "-e:1:in `binding'"
DBG> : "-e:1:in `foo'"
DBG> : "-e:1:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0x2f1f66
0x2069dc
0x206a1b
0x2a27db
0x9715f2bb
0xffffffff
0x2ed63f
0x2ddbaf
0x2e822b
0x2e84be
0x209ec9
0x20d050
0x1e8f
0x1df6
-------------------------------------------------------
Abort trap
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/227>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list