[Mono-bugs] [Bug 620362] Verifier incorrectly rejects this code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 7 20:41:35 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=620362

http://bugzilla.novell.com/show_bug.cgi?id=620362#c1


Rodrigo Kumpera <rkumpera at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msafar at novell.com
          Component|verifier                    |C#
         AssignedTo|rkumpera at novell.com         |mono-bugs at lists.ximian.com
            Product|Mono: Runtime               |Mono: Compilers

--- Comment #1 from Rodrigo Kumpera <rkumpera at novell.com> 2010-07-08 00:41:34 UTC ---
This is a compiler bug.

gmcs generates the following IL:


    // method line 1
    .method private static hidebysig 
           default void Verify ([out] valuetype Test& a, [out] valuetype Test&
b)  cil managed 
    {
        // Method begins at RVA 0x20ec
    // Code size 15 (0xf)
    .maxstack 8
    IL_0000:  ldarg.0 
    IL_0001:  ldarg.1 
    IL_0002:  initobj Test
    IL_0008:  ldarg.1 
    IL_0009:  stobj Test
    IL_000e:  ret 
    } // end of method Test::Verify

Note that on stobj we have on stack: Test&, Test&.
The stack top for stobj must be of type Test. MS peverify rejects it.

I'm improving the errors message on this case thou.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list