[Mono-bugs] [Bug 333334] New: event addition is done incoorectly in some cases

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 12 06:54:59 EDT 2007


           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: rharinath at novell.com
        ReportedBy: lupus at novell.com
         QAContact: mono-bugs at ximian.com
          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.

More information about the mono-bugs mailing list