[Mono-bugs] [Bug 75739][Maj] Changed - [Runtime] Exception filtering at IL level is wrong (Was [VB]: on error resume next is ignored)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 9 13:05:02 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rafaelteixeirabr at hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75739

--- shadow/75739	2005-08-08 13:46:26.000000000 -0400
+++ shadow/75739.tmp.18423	2005-08-09 13:05:02.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 75739
-Product: Mono: Compilers
+Product: Mono: Runtime
 Version: 1.1
 OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Major
-Component: Basic
+Component: JIT
 AssignedTo: rafaelteixeirabr at hotmail.com                            
 ReportedBy: smeegoan at yahoo.com.br               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: on error resume next is ignored
+Summary: [Runtime] Exception filtering at IL level is wrong (Was [VB]: on error resume next is ignored)
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 
 
@@ -145,6 +145,38 @@
       if (num2 != 0)
       {
             ProjectData.ClearProjectError();
       }
 }
 
+
+------- Additional Comments From rafaelteixeirabr at hotmail.com  2005-08-09 13:05 -------
+Well look at the attached disassembly of the original vbc-compiled
+program (a bit complemented with console messages) to see what someone
+pays for using the dreadly "On Error Resume [Next]" construct. 
+Oh, Horror!!!
+
+But to the point, this part pinpoints the problem
+...
+filter {
+  IL_002f:  isinst [mscorlib]System.Exception
+...
+
+This assumes the thrown exception is at the stack top upon entering
+the filtering section, and Mono doesn't behave like that. As shown here:
+
+$ ilasm /exe ConsoleApplication4.il
+Assembling 'ConsoleApplication4.il' , no listing file, to exe -->
+'ConsoleApplication4.exe'
+
+Operation completed successfully
+$ mono ConsoleApplication4.exe
+Before 'Kill'
+Entering filter - check Exception
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an objectin <0x000a4>
+ConsoleApplication4.Module1:Main ()
+$ echo "dummy" > fdddsfds
+$ mono ConsoleApplication4.exe
+Before 'Kill'
+After 'Kill'


More information about the mono-bugs mailing list