[Mono-bugs] [Bug 367914] New: use of ldflda breaks remoting support

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 6 14:15:35 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=367914


           Summary: use of ldflda breaks remoting support
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lupus at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Consider the following program:
using System;

public class Test: MarshalByRefObject
{
        public DateTime Stamp = new DateTime (1968, 1, 2);

        static void Main ()
        {
                AppDomain d = AppDomain.CreateDomain ("foo");
                Test t = (Test) d.CreateInstanceAndUnwrap (typeof
(Test).Assembly.FullName, typeof (Test).FullName);
                t.Stamp = new DateTime (1968, 1, 3);
                Console.WriteLine (t.Stamp);
        }
}

mcs emits a ldflda to call the DateTime constructor for t.Stamp.
It should use a local variable instead and use a ldfld instruction to store the
field.
The sample compiled with mcs will throw a InvalidOperationException at runtime.


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