2 This test an invalid methoddef token
4 .assembly extern mscorlib
7 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
11 .hash algorithm 0x00008004
16 .class public auto ansi beforefieldinit Driver
17 extends [mscorlib]System.Object
19 .method public static void Misc() {
23 .method public static void InvalidMethodDef ()
26 .locals init (int32 bla)
28 call void Driver::Misc()
29 /*Token is 0x00AAAA, which is well beyond the numbers of methods here.*/
41 .method public static int32 Main ()
45 .locals init (int32 V0)
47 call void Driver::InvalidMethodDef()
48 //mini.c inline_method doesn't clean loader errors, meaning that System.Console fails with BadImageException
49 //ldstr "InvalidMethodDef() should throw BadImageException"
50 //call void class [mscorlib]System.Console::WriteLine(string)
54 } catch [mscorlib]System.BadImageFormatException {