[Mono-bugs] [Bug 79871][Blo] New - Trivial Program Crashes Mono
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Nov 8 20:06:40 EST 2006
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 bbjamey at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79871
--- shadow/79871 2006-11-08 20:06:40.000000000 -0500
+++ shadow/79871.tmp.16163 2006-11-08 20:06:40.000000000 -0500
@@ -0,0 +1,192 @@
+Bug#: 79871
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: bbjamey at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Trivial Program Crashes Mono
+
+Description of Problem:
+
+The following simple VB program crashes Mono. It looks like a problem
+with Filter blocks. The same problem consistenly crashes F# code, which
+also generates filter blocks.
+
+Steps to reproduce the problem:
+
+Compile and run the following VB program. An IL code repro that also
+crashes is included further below.
+
+Module MainModule
+ Sub Main()
+ F("abc")
+
+ End Sub
+
+ Function MyFilterMethod() As Boolean
+ Return True
+ End Function
+ Function F(ByVal str As String) As Char
+ Dim res As Char
+ Try
+ res = str.Chars(0)
+ Catch e As System.IO.FileNotFoundException When MyFilterMethod()
+ System.Console.WriteLine(2)
+ End Try
+ Return res
+
+
+ End Function
+
+End Module
+
+
+Actual Results:
+
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+=================================================================
+
+Stacktrace:
+
+ at MainModule.Main () <0xffffffff>
+ at MainModule.Main () <0x0000d>
+ at (wrapper runtime-invoke) System.Object.runtime_invoke_void
+(object,intptr,i
+ntptr,intptr) <0xffffffff>
+
+This application has requested the Runtime to terminate it in an unusual
+way.
+Please contact the application's support team for more information.
+
+
+Expected Results:
+
+Normal exit
+
+How often does this happen?
+
+Always on Mono 1.1.18
+
+
+
+Additional Information:
+
+
+IL code repro:
+
+
+// Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50727.42
+// Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+// Metadata version: v2.0.50727
+.assembly extern mscorlib
+{
+ .publickeytoken = (B7 7A 5C 56 19 34 E0
+89 ) // .z\V.4..
+ .ver 2:0:0:0
+}
+.assembly bug
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module 'bug-module'
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003 // WINDOWS_CUI
+.corflags 0x00000001 // ILONLY
+
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi
+beforefieldinit '<PrivateImplementationDetails$bug>'
+ extends [mscorlib]System.Object
+{
+} // end of class '<PrivateImplementationDetails$bug>'
+
+.class public auto ansi beforefieldinit Bug
+ extends [mscorlib]System.Object
+{
+ .method public static char get(string str,int32 i) cil managed
+ {
+ // Code size 61 (0x3d)
+ .maxstack 4
+ .locals init (char V_0,
+ class [mscorlib]System.Exception V_1,
+ class [mscorlib]System.Exception V_2)
+ IL_0000: ldarg.0
+ IL_0001: ldarg.1
+ IL_0002:
+
+ call instance char [mscorlib]System.String::get_Chars
+(int32)
+ // Strangely this doesn't cause a crash
+ //call instance int32 [mscorlib]System.String::IndexOf
+(char)
+
+ stloc.0
+
+ IL_0008: leave.s IL_003b
+ IL_000a: pop
+ ldc.i4.1
+ endfilter
+
+
+ IL_001e: throw
+ IL_003b: ldloc.0
+ .try IL_0000 to IL_000a filter IL_000a handler IL_001e to IL_003b
+ IL_003c: ret
+ } // end of method Bug::get
+
+ .method public static bool capture(int32 i) cil managed
+ {
+ // Code size 16 (0x10)
+ .maxstack 4
+ IL_0000: ldstr "Testing\n"
+ IL_0005: ldarg.0
+ IL_0006: call char Bug::get(string,int32)
+ IL_000b: ldc.i4.s 37
+ IL_000d: ceq
+ IL_000f: ret
+ } // end of method Bug::capture
+
+} // end of class Bug
+
+.class public auto ansi beforefieldinit '<StartupCode>'.Bug
+ extends [mscorlib]System.Object
+{
+ .method public static void _main() cil managed
+ {
+ .entrypoint
+ // Code size 8 (0x8)
+ .maxstack 3
+ .locals init (bool V_0)
+ IL_0000: ldc.i4.0
+ IL_0001: call bool Bug::capture(int32)
+ IL_0006: stloc.0
+ IL_0007: ret
+ } // end of method Bug::_main
+
+} // end of class '<StartupCode>'.Bug
+
+
+// =============================================================
+
+// *********** DISASSEMBLY COMPLETE ***********************
More information about the mono-bugs
mailing list