[BUG] Stack consistency error (sp: 11, bp: 12)

e$B0J2<$N$h$&$K$9$k$He(B Stack consistency error e$B$K$J$j$^$9!#e(B

% ./ruby -e ’
class C
def inspect
bar {}
end

def bar
raise
ensure
end
end
C.new.foo

-e:12:in `method_missing’-e:4: – control frame ----------
c:0006 p:0008 s:0011 b:0012 l:000011 d:000011 METHOD -e:4
c:0005 p:---- s:0009 b:0009 l:000008 d:000008 FINISH :set_backtrace
c:0004 p:---- s:0007 b:0007 l:000006 d:000006 CFUNC :to_str
c:0003 p:---- s:0005 b:0005 l:000004 d:000004 CFUNC :to_s
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 CFUNC :message
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

DBG> : “:0:in to_str'" DBG> : ":0:into_s’”
DBG> : “:0:in `message’”
– backtrace of native function call (Use addr2line) –
0x80f0e4a
0x810a888
0x810a927
0x80eb2d7
0x80eeb5e
0x80e685a
0x805b9c0
0x805bc42
0x807716a
0x805b20e
0x810b60e
0x80e6e7f
0x80e69a6
0x805b9c0
0x805bc42
0x80787d2
0x807881c
0x80c61d1
0x80c7601
0x810b321
0x80e6e7f
0x80e69a6
0x805b9c0
0x805bc42
0x810ae31
0x80e6e7f
0x80e69a6
0x805b9c0
0x805bc42
0x8057317
0x80579a4
0x8059b13
0x8059d8b
0x8056eb5
0xb7d9aea8
0x8056de1

e$B!!$5$5$@$G$9!#e(B

Tanaka A. wrote:

e$B0J2<$N$h$&$K$9$k$He(B Stack consistency error e$B$K$J$j$^$9!#e(B

e$B!!D>$7$^$7$?!#$7$+$7!"$h$/8+$D$1$^$9$M$(!#e(B

e$B!!$3$l$r5!$KNc30$^$o$j$r8+D>$7$?$s$G$9$,!"$A$g$C$H%3!<%I$,1x$$$N$G$Je(B
e$B$s$H$+$7$?$$5$$,$7$^$9!#e(B

In article [email protected],
SASADA Koichi [email protected] writes:

e$B0J2<$N$h$&$K$9$k$He(B Stack consistency error e$B$K$J$j$^$9!#e(B

e$B!!D>$7$^$7$?!#$7$+$7!"$h$/8+$D$1$^$9$M$(!#e(B

test_exception.rb e$B$K%F%9%H$NDI2C$,$“$j$^$9$,!”$=$N%F%9%H$,%Fe(B
e$B%9%H$K$J$C$F$$$J$$$h$&$K;W$$$^$9!#e(B

ruby e$B$r8E$$$^$^$K$7$F$=$3$@$1<B9T$7$F$be(B [BUG] e$B$K$J$j$^$;$s!#e(B

NoMethodError e$B$re(B rescue
e$B$7$?$i%F%9%H$K$J$i$J$$$N$G$O$J$$$s$8$ce(B
e$B$J$$$G$7$g$&$+!#e(B

e$B$G$O%F%9%H$r=q$-D>$=$&$+!“$H;W$C$F9M$($?$N$G$9$,!”$&$^$/$+$1e(B
e$B$^$;$s!#e(B

% ruby-1.8 -e ’
class C
def inspect
bar {}
end

def bar
raise
ensure
end
end
C.new.foo

-e:12: undefined method `foo’ for #<C:0xb7dce9e0> (NoMethodError)

e$B$H$$$&%a%C%;!<%8$r%A%‘%C%/$7$h$&$H;W$C$?$N$G$9$,!"e(Bstderr e$B$re(B
stdout e$B$K0$9$N$Oe(B reopen e$B$G$$$$$H$7$F!"7k2L$H$7$FF@$i$l$ke(B
"-e:12: undefined method `foo’ for #<C:0xb7dce9e0> (NoMethodError)"
e$B$H$$$&J8;zNs$r3NG’$7$h$&$H;W$C$?$H$3$m$G$O$?$H:$$j$^$7$?!#e(B

bootstraptest/runner.rb e$B$K$Oe(B assert_equal e$B$7$+$J$$$N$G!"e(B
#<C:0xb7dce9e0> e$B$H$$$&$$$+$K$bKh2sJQ$o$j$=$&$JJ8;zNs$r%A%'%Ce(B
e$B%/$G$-$^$;$s!#e(B

test/unit e$B$_$?$$$Ke(B assert_match e$B$,$“$l$P$$$$$N$G$9$,!”:n$j$^e(B
e$B$;$s$+e(B?

e$B!!$5$5$@$G$9!#e(B

Tanaka A. wrote:

bootstraptest/runner.rb e$B$K$Oe(B assert_equal e$B$7$+$J$$$N$G!"e(B
#<C:0xb7dce9e0> e$B$H$$$&$$$+$K$bKh2sJQ$o$j$=$&$JJ8;zNs$r%A%’%Ce(B
e$B%/$G$-$^$;$s!#e(B

test/unit e$B$_$?$$$Ke(B assert_match e$B$,$"$l$P$$$$$N$G$9$,!":n$j$^e(B
e$B$;$s$+e(B?

e$B!!$<$R:n$C$F$/$@$5$$!#$J$s$+B>$K$bM_$7$$$b$N$,$"$l$P!"$I$s$I$s!#e(B