Christian Thalinger
Christian Ullrich
- $Id: stack.c 5715 2006-10-07 12:54:14Z edwin $
+ $Id: stack.c 5717 2006-10-07 23:02:53Z edwin $
*/
if (sp->type == TYPE_RET) {
if (sd->var[b->invars[i]].vv.retaddr != sd->var[sp->varnum].vv.retaddr) {
separable = true;
- break;
+ /* don't break! have to check the remaining stackslots */
}
}
}
if (dv->type == TYPE_RET) {
if (sv->vv.retaddr != dv->vv.retaddr) {
separable = true;
- break;
+ /* don't break! have to check the remaining stackslots */
}
}
}
$(srcdir)/test_verify_fail_jsr_called_with_different_stackdepths.j \
$(srcdir)/test_verify_fail_jsr_exceptions.j \
$(srcdir)/test_verify_fail_jsr_handler_in_sub.j \
+ $(srcdir)/test_verify_fail_jsr_polymorphic_pop.j \
$(srcdir)/test_verify_fail_load_wrong_type.j \
$(srcdir)/test_verify_fail_load_wrong_type_within_block.j \
$(srcdir)/test_verify_fail_local_index.j \
--- /dev/null
+.class public test_verify_fail_jsr_polymorphic_pop
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static check(I)V
+ .limit locals 1
+ .limit stack 10
+ getstatic java/lang/System/out Ljava/io/PrintStream;
+ iload_0
+ invokevirtual java/io/PrintStream/println(I)V
+ return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 2
+ .limit locals 3
+
+ ldc 35
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc 123
+ jsr sbr_1
+
+ aconst_null
+ jsr sbr_1
+ ; ERROR: VerifyError
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ iload 1
+ invokestatic test_verify_fail_jsr_polymorphic_pop/check(I)V
+
+ return
+
+sbr_1:
+ astore 2
+ pop
+ iload 1
+ invokestatic test_verify_fail_jsr_polymorphic_pop/check(I)V
+ iinc 1 1
+ ret 2
+
+.end method
+