[Mono-bugs] [Bug 564376] New: invalid code generated for indexers on valuetypes

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 14 05:45:57 EST 2009


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

http://bugzilla.novell.com/show_bug.cgi?id=564376#c0


           Summary: invalid code generated for indexers on valuetypes
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Testcase:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

public struct Breaks {

    private double val;

    public double this[int i, int j] {

        get { return val; }

        set { val = value; }

    }

    public Breaks(double val)
    { this.val = val; }

}

public class Tester {

    public static void Main(string[] args)

    {
        Breaks b = new Breaks(3.0);

        b[0, 0] += 3.0;

    }

}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Expected results: works.
Actual results: throws a NullReferenceException.

mono --verify-all bug.exe prints:
Unhandled Exception: System.Security.VerificationException: Invalid type at
stack for ldind_ref expected object byref operation at 0x001b

This breaks mono/tests/test-dup-mp.cs in the runtime tests.

-- 
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