2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 19 Dec 2007 17:51:04 +0000 (17:51 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 19 Dec 2007 17:51:04 +0000 (17:51 -0000)
* invalid_empty_catch_block.il
* invalid_empty_fault_block.il
* invalid_empty_filter_block.il
* invalid_empty_finally_block.il
* invalid_empty_handler_block.il
* invalid_empty_try_block.il
tests for empty protected blocks.

* invalid_exception_blocks_order.il:
test for the required ordering of exception
clauses.

* invalid_finally_block_overlap_try_block.il
* invalid_try_block_includes_catch_block.il
* invalid_try_block_inside_filter_block.il
tests for ill formed exception clauses.

* invalid_fallout_of_filter_block.il
* invalid_fallout_of_handler_block.il
* invalid_fallthru_into_filter_block.il
* invalid_fallthru_into_handler_block.il
* unverifiable_fallout_of_catch_block.il
* unverifiable_fallout_of_fault_block.il
* unverifiable_fallout_of_finally_block.il
* unverifiable_fallout_of_try_block.il
* unverifiable_fallthru_into_catch_block.il
* unverifiable_fallthru_into_fault_block.il
* unverifiable_fallthru_into_finally_block.il
* valid_end_try_block_with_throw.il:
tests for fallthru in and out of protected blocks.

svn path=/trunk/mono/; revision=91641

23 files changed:
mono/tests/verifier/ChangeLog
mono/tests/verifier/invalid_empty_catch_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_empty_fault_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_empty_filter_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_empty_finally_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_empty_handler_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_empty_try_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_exception_blocks_order.il [new file with mode: 0644]
mono/tests/verifier/invalid_fallout_of_filter_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_fallout_of_handler_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_fallthru_into_filter_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_fallthru_into_handler_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_finally_block_overlap_try_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_try_block_includes_catch_block.il [new file with mode: 0644]
mono/tests/verifier/invalid_try_block_inside_filter_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallout_of_catch_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallout_of_fault_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallout_of_finally_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallout_of_try_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallthru_into_catch_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallthru_into_fault_block.il [new file with mode: 0644]
mono/tests/verifier/unverifiable_fallthru_into_finally_block.il [new file with mode: 0644]
mono/tests/verifier/valid_end_try_block_with_throw.il [new file with mode: 0644]

index d5e9286fcaa65599b948744c20eb949382b4639d..7abe4f65a4b3d46ac16f811c8dcca0af7a4128e9 100644 (file)
@@ -1,3 +1,36 @@
+2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
+
+       * invalid_empty_catch_block.il
+       * invalid_empty_fault_block.il
+       * invalid_empty_filter_block.il
+       * invalid_empty_finally_block.il
+       * invalid_empty_handler_block.il
+       * invalid_empty_try_block.il
+       tests for empty protected blocks.
+
+       * invalid_exception_blocks_order.il:
+       test for the required ordering of exception
+       clauses.
+
+       * invalid_finally_block_overlap_try_block.il
+       * invalid_try_block_includes_catch_block.il
+       * invalid_try_block_inside_filter_block.il
+       tests for ill formed exception clauses.
+               
+       * invalid_fallout_of_filter_block.il
+       * invalid_fallout_of_handler_block.il
+       * invalid_fallthru_into_filter_block.il
+       * invalid_fallthru_into_handler_block.il
+       * unverifiable_fallout_of_catch_block.il
+       * unverifiable_fallout_of_fault_block.il
+       * unverifiable_fallout_of_finally_block.il
+       * unverifiable_fallout_of_try_block.il
+       * unverifiable_fallthru_into_catch_block.il
+       * unverifiable_fallthru_into_fault_block.il
+       * unverifiable_fallthru_into_finally_block.il
+       * valid_end_try_block_with_throw.il:
+       tests for fallthru in and out of protected blocks.
+
 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
 
        * make_test.sh: added tests for filter
diff --git a/mono/tests/verifier/invalid_empty_catch_block.il b/mono/tests/verifier/invalid_empty_catch_block.il
new file mode 100644 (file)
index 0000000..9071956
--- /dev/null
@@ -0,0 +1,34 @@
+.assembly 'invalid_empty_catch_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+//try catch
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_02
+
+
+}
diff --git a/mono/tests/verifier/invalid_empty_fault_block.il b/mono/tests/verifier/invalid_empty_fault_block.il
new file mode 100644 (file)
index 0000000..d00faa6
--- /dev/null
@@ -0,0 +1,34 @@
+.assembly 'invalid_empty_finally_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+//try catch
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               nop
+               endfinally
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 fault handler BB_02 to BB_02
+
+
+}
diff --git a/mono/tests/verifier/invalid_empty_filter_block.il b/mono/tests/verifier/invalid_empty_filter_block.il
new file mode 100644 (file)
index 0000000..420d44a
--- /dev/null
@@ -0,0 +1,39 @@
+.assembly 'invalid_empty_filter_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               ldc.i4.0
+               endfilter
+BB_03:
+
+BB_04:
+               pop
+               leave END
+BB_05:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_03 handler BB_04 to BB_05
+
+
+}
diff --git a/mono/tests/verifier/invalid_empty_finally_block.il b/mono/tests/verifier/invalid_empty_finally_block.il
new file mode 100644 (file)
index 0000000..9d7dd1a
--- /dev/null
@@ -0,0 +1,34 @@
+.assembly 'invalid_empty_finally_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+//try catch
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               nop
+               endfinally
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 finally handler BB_02 to BB_02
+
+
+}
diff --git a/mono/tests/verifier/invalid_empty_handler_block.il b/mono/tests/verifier/invalid_empty_handler_block.il
new file mode 100644 (file)
index 0000000..b00d35b
--- /dev/null
@@ -0,0 +1,39 @@
+.assembly 'invalid_empty_handler_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               ldc.i4.0
+               endfilter
+BB_03:
+
+BB_04:
+               pop
+               leave END
+BB_05:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_04
+
+
+}
diff --git a/mono/tests/verifier/invalid_empty_try_block.il b/mono/tests/verifier/invalid_empty_try_block.il
new file mode 100644 (file)
index 0000000..483c2fa
--- /dev/null
@@ -0,0 +1,33 @@
+.assembly 'invalid_empty_try_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_00 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/invalid_exception_blocks_order.il b/mono/tests/verifier/invalid_exception_blocks_order.il
new file mode 100644 (file)
index 0000000..fc7f288
--- /dev/null
@@ -0,0 +1,40 @@
+.assembly 'invalid_empty_try_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               nop
+BB_TRY_0:
+
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+BB_04:
+               nop
+               endfinally
+BB_05:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_03 finally handler BB_04 to BB_05
+.try BB_TRY_0 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/invalid_fallout_of_filter_block.il b/mono/tests/verifier/invalid_fallout_of_filter_block.il
new file mode 100644 (file)
index 0000000..fd38cce
--- /dev/null
@@ -0,0 +1,38 @@
+.assembly 'invalid_fallout_of_filter_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               nop
+BB_03:
+
+
+BB_04:
+               nop
+               nop
+               leave END
+BB_05:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_05
+
+
+}
diff --git a/mono/tests/verifier/invalid_fallout_of_handler_block.il b/mono/tests/verifier/invalid_fallout_of_handler_block.il
new file mode 100644 (file)
index 0000000..fd92649
--- /dev/null
@@ -0,0 +1,38 @@
+.assembly 'invalid_fallout_of_handler_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               ldc.i4.0
+               endfilter
+BB_03:
+
+
+BB_04:
+               nop
+               nop
+BB_05:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_05
+
+
+}
diff --git a/mono/tests/verifier/invalid_fallthru_into_filter_block.il b/mono/tests/verifier/invalid_fallthru_into_filter_block.il
new file mode 100644 (file)
index 0000000..cf55168
--- /dev/null
@@ -0,0 +1,46 @@
+.assembly 'invalid_fallthru_into_filter_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+       
+       ldloc.0
+       brfalse BB_MIDDLE
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_MIDDLE:
+               nop
+               nop
+
+BB_02:
+               pop
+               ldc.i4.0
+               endfilter
+BB_03:
+
+
+BB_04:
+               nop
+               nop
+               leave END
+BB_05:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_05
+
+
+}
diff --git a/mono/tests/verifier/invalid_fallthru_into_handler_block.il b/mono/tests/verifier/invalid_fallthru_into_handler_block.il
new file mode 100644 (file)
index 0000000..83408fe
--- /dev/null
@@ -0,0 +1,43 @@
+
+//This scenario is not quite possible, as the only block before the handler is the filter block
+//So we test a filter without endfilter at end
+.assembly 'invalid_fallthru_into_handler_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+       
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               nop
+               nop
+BB_03:
+
+
+BB_04:
+               nop
+               nop
+               leave END
+BB_05:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_05
+
+
+}
diff --git a/mono/tests/verifier/invalid_finally_block_overlap_try_block.il b/mono/tests/verifier/invalid_finally_block_overlap_try_block.il
new file mode 100644 (file)
index 0000000..f10d6fb
--- /dev/null
@@ -0,0 +1,41 @@
+//try/catch and try/finally overlaps try range
+
+.assembly 'invalid_finally_block_overlap_try_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+//try catch
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+BB_06:
+               nop
+               endfinally
+BB_07:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+.try BB_00 to BB_01 finally handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/invalid_try_block_includes_catch_block.il b/mono/tests/verifier/invalid_try_block_includes_catch_block.il
new file mode 100644 (file)
index 0000000..d11d324
--- /dev/null
@@ -0,0 +1,34 @@
+.assembly 'invalid_try_block_includes_catch_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+//try catch
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_03 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/invalid_try_block_inside_filter_block.il b/mono/tests/verifier/invalid_try_block_inside_filter_block.il
new file mode 100644 (file)
index 0000000..f87cabd
--- /dev/null
@@ -0,0 +1,51 @@
+.assembly 'invalid_try_block_inside_filter_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               ldloc.0
+               brfalse BB_N03
+
+BB_N00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_N01:
+
+BB_N02:
+               pop
+               leave END
+BB_N03:
+
+               ldc.i4.0
+               endfilter
+BB_03:
+
+BB_04:
+               leave END
+BB_05:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_N00 to BB_N01 catch [mscorlib]System.Exception handler BB_N02 to BB_N03
+.try BB_00 to BB_01 filter BB_02 handler BB_04 to BB_05
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallout_of_catch_block.il b/mono/tests/verifier/unverifiable_fallout_of_catch_block.il
new file mode 100644 (file)
index 0000000..b21fea4
--- /dev/null
@@ -0,0 +1,33 @@
+.assembly 'invalid_fallout_of_catch_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               pop
+               nop
+               nop
+BB_03:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallout_of_fault_block.il b/mono/tests/verifier/unverifiable_fallout_of_fault_block.il
new file mode 100644 (file)
index 0000000..64a9d0e
--- /dev/null
@@ -0,0 +1,31 @@
+.assembly 'invalid_fallout_of_fault_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               nop
+               nop
+BB_03:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 fault handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallout_of_finally_block.il b/mono/tests/verifier/unverifiable_fallout_of_finally_block.il
new file mode 100644 (file)
index 0000000..f359d4a
--- /dev/null
@@ -0,0 +1,31 @@
+.assembly 'invalid_fallout_of_finally_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_02:
+               nop
+               nop
+BB_03:
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 finally handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallout_of_try_block.il b/mono/tests/verifier/unverifiable_fallout_of_try_block.il
new file mode 100644 (file)
index 0000000..e50ef6e
--- /dev/null
@@ -0,0 +1,37 @@
+.assembly 'invalid_fallout_of_try_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               ldloc.0
+               brfalse PART_0
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+PART_0:
+               nop
+               nop
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallthru_into_catch_block.il b/mono/tests/verifier/unverifiable_fallthru_into_catch_block.il
new file mode 100644 (file)
index 0000000..77ada73
--- /dev/null
@@ -0,0 +1,40 @@
+.assembly 'invalid_fallthru_into_catch_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+       
+       ldloc.0
+       brfalse BB_MIDDLE
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_MIDDLE:
+               nop
+               nop
+BB_02:
+               pop
+               nop
+               nop
+               leave END
+BB_03:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallthru_into_fault_block.il b/mono/tests/verifier/unverifiable_fallthru_into_fault_block.il
new file mode 100644 (file)
index 0000000..353cd61
--- /dev/null
@@ -0,0 +1,39 @@
+.assembly 'invalid_fallthru_into_fault_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+       
+       ldloc.0
+       brfalse BB_MIDDLE
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_MIDDLE:
+               nop
+               nop
+BB_02:
+               nop
+               nop
+               endfinally
+BB_03:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 fault handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/unverifiable_fallthru_into_finally_block.il b/mono/tests/verifier/unverifiable_fallthru_into_finally_block.il
new file mode 100644 (file)
index 0000000..f6ef9f7
--- /dev/null
@@ -0,0 +1,39 @@
+.assembly 'invalid_fallthru_into_finally_block'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+       
+       ldloc.0
+       brfalse BB_MIDDLE
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+               leave END
+BB_01:
+
+BB_MIDDLE:
+               nop
+               nop
+BB_02:
+               nop
+               nop
+               endfinally
+BB_03:
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 finally handler BB_02 to BB_03
+
+
+}
diff --git a/mono/tests/verifier/valid_end_try_block_with_throw.il b/mono/tests/verifier/valid_end_try_block_with_throw.il
new file mode 100644 (file)
index 0000000..077c6bb
--- /dev/null
@@ -0,0 +1,32 @@
+.assembly 'valid_end_of_try_block_with_throw'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+
+.method public static int32 Main() cil managed
+{
+       .entrypoint
+       .maxstack 8
+       .locals init (int32 V0)
+
+BB_00:
+               newobj instance void class [mscorlib]System.Exception::.ctor()
+               throw
+BB_01:
+
+BB_02:
+               pop
+               leave END
+BB_03:
+
+
+
+END:
+       ldc.i4.0
+       ret
+
+.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
+
+
+}