+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
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+
+//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
+
+
+}
--- /dev/null
+//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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}
--- /dev/null
+.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
+
+
+}