[Mono-bugs] [Bug 82641][Wis] New - Certain complex combination of code causes JIT crash

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 30 16:04:02 EDT 2007

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 mlg at pleiades.ca.


--- shadow/82641	2007-08-30 16:04:02.000000000 -0400
+++ shadow/82641.tmp.21715	2007-08-30 16:04:02.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 82641
+Product: Mono: Runtime
+Version: 1.2
+OS: other
+OS Details: Linux 2.6.19, Debian unstable
+Status: NEW   
+Priority: Wishlist
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: mlg at pleiades.ca               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Certain complex combination of code causes JIT crash
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+In Mono on Linux or OS X, if code contains a very specific set of
+steps, the JIT crashes when the code is called. Specifically, it needs to
+be a function called from a delegate, there needs to be more than one
+function reference chained to the delegate, the function called needs to
+contain a switch/case block, the code after at least one case statement has
+to be a return, and it has to be switching on an enum. Changing any one of
+these things causes the bug to not manifest.
+Steps to reproduce the problem:
+1. Download the attached code and compile to an exe with gmcs.
+2. Run the exe with the Mono runtime.
+Actual Results:
+A stack trace, as follows:
+$ mono --debug callbacktest2.exe
+** (callbacktest2.exe:3351): WARNING **: unable to label tree 0x1852b74
+ (stind.i1 regoffset[-0x9(%ebp)] (ldind.i1 regvar[%esi]))
+** ERROR **: file mini.c: line 10045 (mini_select_instructions): should not
+be reached
+  at Test.Class1.CreateItem (string) [0x00019] in /Users/fx/callbacktest2.cs:45
+  at Test.Class1.CreateItem (string) [0x00000] in /Users/fx/callbacktest2.cs:42
+  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_string
+(string) <0xffffffff>
+  at Test.Class1.Main (string[]) [0x0002b] in /Users/fx/callbacktest2.cs:29
+  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[]
+(object,intptr,intptr,intptr) <0xffffffff>
+Abort trap
+Expected Results:
+Program should print:
+How often does this happen? 
+Every time any code of the format described above is JIT-compiled.
+Additional Information:
+Note that the attached program doesn't do anything useful. The bug was
+originally triggered by a larger project (libsecondlife) and the repro
+attached is minimal code designed to demonstrate the problem.
+That the code runs fine in the .Net 2.0 runtime.

More information about the mono-bugs mailing list