Jaa


MSIL Verification Notes - 8

 One more verification rule for ArgIterator. We cannot put it in an array. To avoid stack corruption, the JIT will consider below code unverifiable.

IL_0000:    ldc.i4.1
IL_0001:    newarr ArgIterator
IL_0006:    stloc.0
IL_0007:    ret

 Here is the PEVerify result.

[IL]: Error: [xxx.exe : TestClass::Main][mdToken=0x6000001][offset 0x00000001] Array of ELEMENT_TYPE_BYREF or ELEMENT_TYPE_TYPEDBYREF.(Error: 0x80131890)

Comments