http://bugzilla.novell.com/show_bug.cgi?id=559876
http://bugzilla.novell.com/show_bug.cgi?id=559876#c0 Summary: Exception raise resets values Classification: Mono Product: Mono: Runtime Version: SVN Platform: x86 OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: JIT AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=330499) --> (http://bugzilla.novell.com/attachment.cgi?id=330499) test.cs, shows the issue User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10 Certainly due to an incorrect optimisation, but the attached small test shows the issue: public static void Main () { int myb = 4; // First assign try { myb = int_func (8); // returns 8, so at this point myb ==8 do_raise(); // raises an exception myb = int_func (2); // should never be called. If not here, the bug does not reproduce } catch (System.Exception) { System.Console.WriteLine (myb); // prints 4 !!! should have printed 8 ! System.Console.WriteLine ("above should be 8"); } } Attached is the full example Reproducible: Always Steps to Reproduce: 1. gmcs test.cs (you can also compile from the microsoft's C# compiler) 2. mono ./test.exe 3. The printed value is incorrect $ mono --version Mono JIT compiler version 20091121 -- Configure bugmail: http://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
