Get_destination_insn must not skip ADJUST

e$B1sF#$H?=$7$^$9!#e(B

1.9 e$B$,0J2<$GMn$A$^$9!#e(B

$ ./ruby -e ‘nil while ([0, (false ? 1 : redo; 2)])’
-e:1: [BUG] Segmentation fault
ruby 1.9.0 (2008-01-28 revision 15294) [i686-linux]

– control frame ----------
c:0003 p:0002 s:303206399 b:0006 l:000005 d:000005 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 :17

– backtrace of native function call (Use addr2line) –
0x80ef855
0x810e2ce
0x810e32b
0x80be760
0xffffe440
0x80ed264
0x80ed59d
0x805a7f9
0x805e940
0x8058221
0xb7dd2ea8
0x8058131

e$B%"%!<%H$7$^$7$?e(B

get_destination_insn e$B$,e(B ADJUST
e$B$rFI$_Ht$P$7$F$$$k$N$,860x$G$9!#e(B
e$B0J2<$GF0$-$^$9$,!"B>$NLdBj$r0z$-5/$3$9$+$b$7$l$^$;$s!#e(B
(line_no == -1 e$B$Je(B ADJUST e$B$OFI$_Ht$P$9$Y$-!)$H$+e(B)

Index: compile.c

— compile.c (revision 15294)
+++ compile.c (working copy)
@@ -1320,7 +1320,7 @@

 list = lobj->link.next;
 while (list) {
  • if (list->type == ISEQ_ELEMENT_INSN) {
  • if (list->type == ISEQ_ELEMENT_INSN || list->type ==
    ISEQ_ELEMENT_ADJUST) {
    break;
    }
    list = list->next;