[Mono-bugs] [Bug 639510] New: BadImageFormatException when delegate

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 15 07:29:13 EDT 2010



           Summary: BadImageFormatException when delegate
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.6.x
          Platform: x86-64
        OS/Version: Windows 7
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: piotr.wysocki at secpl.cs.put.poznan.pl
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=389724)
 --> (http://bugzilla.novell.com/attachment.cgi?id=389724)
failing example

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3

When I compile the attached example source with gmcs,
it runs ok in mono, but it fails to run on MS.NET.

When I compile the attached example source with MS.NET compiler,
it runs ok on both mono and MS.NET.

The resulting ILs differ pretty much between compiled by MS.NET and mono, but
the difference between the failing example and not failing one (see the
attached source, lines 27-38) compiled by mono is very small. I have no idea
what's going on.

I have been using MonoDevelop to compile by both, mono and MS.NET, but that's
rather irrelevant.

Reproducible: Always

Steps to Reproduce:
1. Compile the source file using mono (gmcs).
2. Execute the resulting EXE file using MS.NET.
3. There will be two tests run. Watch for an exception to be printed on the
console during the second test.
Actual Results:  
A System.BadImageFormatException gets thrown when executing a delegate defined
inline in a generic method (the delegate uses those generics).

Expected Results:  
The exception should not appear, as in the first test.

Configure bugmail: https://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