http://bugzilla.novell.com/show_bug.cgi?id=575941
http://bugzilla.novell.com/show_bug.cgi?id=575941#c0 Summary: Mono crashes (assert) when compiling generic code in F# Interactive Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: PC OS/Version: Windows 7 Status: NEW Severity: Major Priority: P5 - None Component: misc AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Third Party Developer/Partner Blocker: Yes Description of Problem: The Mono runtime asserts when emiting somewhat exotic generic code in the F# interactive window. ERROR:class.c:2884:mono_class_setup_vtable: assertion failed: (inflated) Steps to reproduce the problem: 1. Download the latest F# CTP http://www.microsoft.com/downloads/details.aspx?FamilyID=b55f0532-ac3c-4106-918c-5586a953a7da&displaylang=en 2. Run FSI.exe through Mono 3. Enter the following code: ------------- type IFoo<'a> = abstract InterfaceMethod<'b> : 'a -> 'b type Foo<'a, 'b>() = interface IFoo<'a> with override this.InterfaceMethod (x : 'a) = (Array.zeroCreate 1).[0] override this.ToString() = "Foo" let test = new Foo<string, float>();; --------------- Actual Results: ERROR:class.c:2884:mono_class_setup_vtable: assertion failed: (inflated) 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: The code to compile successfully. (FSI.exe prints "val test : Foo<string, float>") How often does this happen? Every time. Additional Information: The code compiles and JITS just fine when using the F# compiler (fsc.exe). This only repros when using F# Interactive. (Which would indicate the issue might have something to do with Reflection.Emit.) Here is a full console session showing the bug: ------------------------ C:\Program Files (x86)\FSharp-1.9.7.8\bin>type repro.fs type IFoo<'a> = abstract InterfaceMethod<'b> : 'a -> 'b type Foo<'a, 'b>() = interface IFoo<'a> with override this.InterfaceMethod (x : 'a) = (Array.zeroCreate 1).[0] override this.ToString() = "Foo" let test = new Foo<string, float>() printfn "Test passed successfully" exit 0 C:\Program Files (x86)\FSharp-1.9.7.8\bin>echo Compiling and testing JIT Compiling and testing JIT C:\Program Files (x86)\FSharp-1.9.7.8\bin>mono fsc repro.fs Cannot open assembly 'fsc': Result too large. C:\Program Files (x86)\FSharp-1.9.7.8\bin>mono fsc.exe repro.fs Microsoft F# Compiler, (c) Microsoft Corporation, All Rights Reserved F# Version 1.9.7.8, compiling for .NET Framework Version v2.0.50727 C:\Program Files (x86)\FSharp-1.9.7.8\bin>mono repro.exe Test passed successfully C:\Program Files (x86)\FSharp-1.9.7.8\bin>echo Using Reflection.Emit in the FSI Using Reflection.Emit in the FSI C:\Program Files (x86)\FSharp-1.9.7.8\bin>mono fsi.exe Microsoft F# Interactive, (c) Microsoft Corporation, All Rights Reserved F# Version 1.9.7.8, compiling for .NET Framework Version v2.0.50727 For help type #help;; > type IFoo<'a> = abstract InterfaceMethod<'b> : 'a -> 'b type Foo<'a, 'b>() = interface IFoo<'a> with override this.InterfaceMethod (x : 'a) = (Array.zeroCreate 1).[0] override this.ToString() = "Foo" let test = new Foo<string, float>();; ** ERROR:class.c:2884:mono_class_setup_vtable: assertion failed: (inflated) This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
