aload 2
pop
ret 2
- ; ERROR: VerifyError.*load of returnAddress
+ ; ERROR: VerifyError
.end method
--- /dev/null
+.class public test_verify_fail_jsr_exceptions
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static checkI(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 3
+ .limit locals 3
+
+ .catch java/lang/Exception from test_start to test_end using handler
+
+ ldc 35
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+ jsr sbr_1
+ ldc 111
+ invokestatic test_verify_fail_jsr_exceptions/checkI(I)V
+ return
+
+continue_1:
+ jsr sbr_2
+ ldc 222
+ invokestatic test_verify_fail_jsr_exceptions/checkI(I)V
+ return
+
+test_start:
+continue_2:
+
+; ERROR: VerifyError
+; This fails, because the "astore 1" is _after_ the exception range boundary
+
+ astore 1
+ ldc 2
+ ldc 0
+ idiv
+ pop
+
+ astore 1
+ ldc 2
+ ldc 0
+ idiv
+ pop
+ return
+
+test_end:
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ return
+
+sbr_1:
+ goto continue_1
+
+sbr_2:
+ goto continue_2
+
+handler:
+ pop
+ ret 1
+
+.end method
+
--- /dev/null
+.class public test_verify_fail_jsr_handler_in_sub
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static checkI(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
+
+ .catch java/lang/Exception from test_start to test_end using handler
+
+ ldc 35
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ jsr sbr_1
+ iload 1
+ invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ return
+
+; ERROR: VerifyError
+; This fails, because the "astore 2" is _after_ the exception range boundary
+
+sbr_1:
+test_start:
+ astore 2
+ ldc 2
+ ldc 0
+ idiv
+ pop
+ ldc 666
+ invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+ return
+test_end:
+
+handler:
+ pop
+ ldc 48
+ invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+ ret 2
+
+.end method
ldc "string"
astore 2
ret 2
- ; ERROR: VerifyError.*RET with non-returnAddress
+ ; ERROR: VerifyError
.end method
sbr_1:
pop
ret 2
- ; ERROR: VerifyError.*RET with non-returnAddress
+ ; ERROR: VerifyError
.end method
+++ /dev/null
-.class public test_verify_ok_jsr_exceptions
-.super java/lang/Object
-
-; ======================================================================
-
-.method public <init>()V
- aload_0
- invokenonvirtual java/lang/Object/<init>()V
- return
-.end method
-
-; ======================================================================
-
-.method public static checkI(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 3
- .limit locals 3
-
- .catch java/lang/Exception from test_start to test_end using handler
-
- ldc 35
- istore 1
-
- aload 0
- ifnull force_basic_block_boundary
-
- ; --------------------------------------------------
- jsr sbr_1
- ldc 111
- invokestatic test_verify_ok_jsr_exceptions/checkI(I)V
- return
-
-continue_1:
- jsr sbr_2
- ldc 222
- invokestatic test_verify_ok_jsr_exceptions/checkI(I)V
- return
-
-test_start:
-continue_2:
- astore 1
- ldc 2
- ldc 0
- idiv
- pop
-
- astore 1
- ldc 2
- ldc 0
- idiv
- pop
- return
-
-test_end:
- ; --------------------------------------------------
-
-force_basic_block_boundary:
-
- return
-
-sbr_1:
- goto continue_1
-
-sbr_2:
- goto continue_2
-
-handler:
- pop
- ret 1
-
-.end method
-
+++ /dev/null
-.class public test_verify_ok_jsr_handler_in_sub
-.super java/lang/Object
-
-; ======================================================================
-
-.method public <init>()V
- aload_0
- invokenonvirtual java/lang/Object/<init>()V
- return
-.end method
-
-; ======================================================================
-
-.method public static checkI(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
-
- .catch java/lang/Exception from test_start to test_end using handler
-
- ldc 35
- istore 1
-
- aload 0
- ifnull force_basic_block_boundary
-
- ; --------------------------------------------------
-
- jsr sbr_1
- ; OUTPUT: 48
- iload 1
- invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
- ; OUTPUT: 35
-
- ; --------------------------------------------------
-
-force_basic_block_boundary:
-
- return
-
-sbr_1:
-test_start:
- astore 2
- ldc 2
- ldc 0
- idiv
- pop
- ldc 666
- invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
- return
-test_end:
-
-handler:
- pop
- ldc 48
- invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
- ret 2
-
-.end method