[Mono-bugs] [Bug 51702][Maj] New - returns inside a case statement will abort mono

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 4 Dec 2003 11:16:32 -0500 (EST)


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 ximian@aksi.mdamt.net.

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

--- shadow/51702	2003-12-04 11:16:32.000000000 -0500
+++ shadow/51702.tmp.10460	2003-12-04 11:16:32.000000000 -0500
@@ -0,0 +1,113 @@
+Bug#: 51702
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ximian@aksi.mdamt.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: returns inside a case statement will abort mono
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The attached file can be compiled by mcs, but the jit will abort with
+message as described below. However it can be run by mint.
+
+config: mono+mcs from cvs today
+
+[mdamt@gordon tmp]$ mcs test.cs
+Compilation succeeded
+[mdamt@gordon tmp]$ mint test.exe
+Sada
+[mdamt@gordon tmp]$ mono test.exe
+ 
+** ERROR **: Invalid IL code at IL0020 in
+Weirdo.Weirdo:ProblematicSwitch (string): IL_0020: br        IL_005c
+ 
+ 
+aborting...
+Aborted
+
+and this is the il codes:
+    // method line 2
+    .method private
+           instance default string 'ProblematicSwitch' (string 'param') 
+cil managed
+    {
+        .param [1]
+        // Method begins at RVA 0x20f4
+        // Code size 92 (0x5c)
+        .maxstack 5
+        .locals init (
+                string  V_0)
+        IL_0000:  ldarg.1
+        IL_0001:  stloc.0
+        IL_0002:  ldloc.0
+        IL_0003:  brfalse IL_0051
+ 
+        IL_0008:  ldloc.0
+        IL_0009:  call string valuetype
+[mscorlib]'System.String'::'IsInterned'(string)
+        IL_000e:  stloc.0
+        IL_000f:  ldloc.0
+        IL_0010:  ldstr "sada"
+        IL_0015:  bne.un IL_0025
+ 
+        IL_001a:  ldstr "Sada"
+        IL_001f:  ret
+        IL_0020:  br IL_005c
+ 
+        IL_0025:  ldloc.0
+        IL_0026:  ldstr "dua"
+        IL_002b:  bne.un IL_003b
+ 
+        IL_0030:  ldstr "Dua"
+        IL_0035:  ret
+        IL_0036:  br IL_005c
+ 
+        IL_003b:  ldloc.0
+        IL_003c:  ldstr "tolu"
+        IL_0041:  bne.un IL_0051
+ 
+        IL_0046:  ldstr "Tolu"
+        IL_004b:  ret
+        IL_004c:  br IL_005c
+ 
+        IL_0051:  ldstr ""
+        IL_0056:  ret
+        IL_0057:  br IL_005c
+ 
+    } // end of method Weirdo::instance default string
+'ProblematicSwitch' (string 'param')
+
+
+
+Steps to reproduce the problem:
+1. 
+2. 
+3. 
+
+Actual Results:
+[mdamt@gordon tmp]$ mono test.exe
+ 
+** ERROR **: Invalid IL code at IL0020 in
+Weirdo.Weirdo:ProblematicSwitch (string): IL_0020: br        IL_005c
+
+
+Expected Results:
+[mdamt@gordon tmp]$ mint test.exe
+Sada
+
+How often does this happen? 
+always
+
+Additional Information: