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

           Summary: event addition is done incoorectly in some cases
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


When adding or removing delegate instances from an event, they need to happen
inside a lock, to prevent race conditions. mcs generates the add/remove methods
with the sychronized flag, but it doesn't use the method in some cases.
See the generated code for the Main method in this test:

class T {
        public delegate void Do ();
        public event Do MyDo2;
        static void p () {System.Console.WriteLine ("hi");}
        static void Main () {
                T t = new T ();
                t.MyDo2 += p;
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to