October, 2007

Blog - About

About Jason He's WebLog

Jason He = ZifengH 

 

  • Jason He's WebLog

    MSIL Verification Notes - 11

    • 1 Comments
    Tired of creating one sample for one unverifiable scenario. Here is a laundry list for the other scenarios I know of. Build the sample in your mind and be happy. calli by design unverifiable ldftn/ldvirtftn not allowedn on .ctor "This" parameter...
  • Jason He's WebLog

    MSIL Verification Notes - 10

    • 1 Comments
    Another one that taking ArgIterator is deemed unverifiable. This time is for making a Type Reference. .method public hidebysig static vararg void VarArg () cil managed { .maxstack 8 .locals init ( [ 0 ] valuetype [ mscorlib ] System...
  • Jason He's WebLog

    MSIL Verification Notes - 9

    • 1 Comments
    Tail call verification rules require that no managed pointers to be passed from caller to callee if it points to a stack frame that to be removed. ArgIterator does not satisfy the condition. Therefore below code will not be verifiable. .method public...
  • Jason He's WebLog

    MSIL Verification Notes - 8

    • 1 Comments
    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...
  • Jason He's WebLog

    MSIL Verification Notes - 7

    • 1 Comments
    Box operation can operate on ValueType but not all of them. Below example is trying to box System.ArgIterator. ArgIterator can have pointer points to stack, therefor BOX it won't be verifiable. .method public hidebysig static vararg...
  • Jason He's WebLog

    MSIL Verification Notes - 6

    • 2 Comments
    Recently I am running some DynamicMethod scenario. It seems very easy to Emit incorrect IL using ILGenerator. If the IL is not correct, JIT will throw unverifiable code exception or invalid program exception. I tend to debug with WinDBG+SOS for...
  • Jason He's WebLog

    MSIL Verification Notes - 5

    • 2 Comments
    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...
Page 1 of 1 (7 items)