[Mono-bugs] [Bug 82056][Nor] New - mono crashes when calling a dll function

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 10 09:28:03 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 noix at sphere.pl.


--- shadow/82056	2007-07-10 09:28:03.000000000 -0400
+++ shadow/82056.tmp.31505	2007-07-10 09:28:03.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 82056
+Product: Mono: Runtime
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Debian GNU/Linux SID
+Status: NEW   
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: noix at sphere.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: mono crashes when calling a dll function
+Description of Problem:
+I'm using mono to run a program compiled with Visual Studio C# Express.
+I'm not using any unsupported classes or methods and I tracked it down to a
+short testcase:
+--- Program.cs ---
+class Program {
+    static void Main(string[] args) {
+        Class1.Foo();
+    }
+--- end ---
+--- Class1.cs ---
+public enum TestEnum : sbyte {
+    None
+public class Class1 {
+    public static bool var = true;
+    public static TestEnum Foo() {
+        if (var) {
+            return TestEnum.None;
+        }
+        return TestEnum.None;
+    }
+--- end ---
+The problem does _not_ exist under mono 1.2.2. But is _does_ exist under
+mono 1.2.4.
+The sources have to be compiled under VS to trigger the problem, so I'm
+attaching both .cs sources and VS-compiled .exe/.dll.
+Steps to reproduce the problem:
+1. (optional) compile attached Class1.cs and Program.cs under VisualStudio
+(Class1 to .dll, Program.exe should use Class1.dll),
+2. run the compiled program under mono 1.2.4 (you can also use attached
+.dll/.exe if you didn't compile the sources yourself)
+Actual Results:
+Mono SIGABRT ("mini.c: line 10045 (mini_select_instructions): should not be
+Full stacktrace in attached "mono.log".
+Expected Results:
+Clear exit from the program (no output).
+How often does this happen? 
+Every time.
+Additional information:
+I wasn't able to make the testcase any shorter.
+Even removing ": sbyte" from enum declaration made it _not_ crash.

More information about the mono-bugs mailing list