Jason He's WebLog

MSIL Verification Notes - 5

This is a short one.

The arglist operation can only work when the method's signature indicates that it accepts a variable number of arguments. The verification rule also requires a type check for System.RuntimeArgumentHandle.

Below scenario is clear a violation of both conditions.

.method public hidebysig static void Test() cil managed
{
    .maxstack 8
    L_0000: arglist 
    L_0002: call void [mscorlib]System.Console::WriteLine(int32)
    L_0007: ret 
}
The peverify result looks like below.
[IL]: Error: [xxx.exe : arglist_negt::Test][mdToken=0x6000001][offset 0x00000000] Allowed only in vararg methods.(Error: 0x8013187A)

Published Monday, October 01, 2007 6:48 PM by ZifengH

Comments

 

Techy News Blog » MSIL Verification Notes - 5 said:

October 1, 2007 7:20 PM
 

generic zoloft available in the us said:

generic zoloft available in the us

October 1, 2007 10:20 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker