e$B1sF#$H?=$7$^$9!#e(B
1.9 e$B$G0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B
$ ./ruby -ve ‘eval “while true; return; end rescue p $!”’
ruby 1.9.0 (2007-08-27 patchlevel 0) [i686-linux]
#<LocalJumpError: unexpected return>
(eval):1: – control frame ----------
c:0006 p:0008 s:0013 b:0012 l:000004 d:000011 EVAL (eval):1
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH :new
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :eval
c:0003 p:0009 s:0005 b:0005 l:000004 d:000004 TOP -e:1
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
DBG> : “-e:1:in eval'" DBG> : "-e:1:in
'”
– backtrace of native function call (Use addr2line) –
0x80dea35
0x80f85e3
0x80f86ab
0x80dcb14
0x80dd304
0x805bac1
0x805bda5
0x80d535e
0x80d6fc6
0x80d9cac
0x80dd304
0x80dd63b
0x80597a9
0x805cdad
0x80573a2
0xb7d84ea8
0x80572d1
[BUG] Stack consistency error (sp: 13, bp: 12)
ruby 1.9.0 (2007-08-27) [i686-linux]
e$B%"%!<%H$7$^$7$?e(B (core dumped)
e$B;n9T:x8m$7$?$i$H$j$"$($:0J2<$GMn$A$J$/$J$j$^$7$?$,!"D>$C$F$J$$$+$be(B
e$B$7$l$^$;$s$7!“B>$KJQ$J1F6A$,$”$k$+$b$7$l$^$;$s!#e(B
catch type e$B$N9=@.$H$+0UL#$H$+A4A3$o$+$C$F$J$$e(B
Index: compile.c
— compile.c (revision 13289)
+++ compile.c (working copy)
@@ -3764,6 +3764,7 @@
else {
ADD_INSN1(ret, nd_line(node), throw,
INT2FIX(0x01) /* TAG_RETURN */ );
-
}ADD_INSN(ret, nd_line(node), pop);
break;
}