[Mono-bugs] [Bug 656008] New: cecil/light throws in MethodDefinition.PInvokeInfo

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 25 14:04:21 EST 2010



           Summary: cecil/light throws in MethodDefinition.PInvokeInfo
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Cecil
        AssignedTo: jbevain at novell.com
        ReportedBy: spouliot at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

This occurs in

            if (!method.IsPInvokeImpl || (method.PInvokeInfo == null))
                return RuleResult.DoesNotApply;

where IsPInvokeImpl returns true but PInvokeInfo throws.

The exception is thrown because the assembly contains a module reference
(extern) with an empty name (".module extern " as seen with reflector). That
makes Mixin.CheckName (in CustomAttribute.cs) throws an ArgumentException.

I did not check the spec but PEverify does not complain about it (not did the
older cecil). Remove this "empty-check" fix the issue in Gendarme without
causing any other side effects afaik.

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

More information about the mono-bugs mailing list