http://bugzilla.novell.com/show_bug.cgi?id=576342
http://bugzilla.novell.com/show_bug.cgi?id=576342#c0 Summary: Code involving type instantiation in attributes throws at runtime Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: PC OS/Version: Windows 7 Status: NEW Severity: Normal Priority: P5 - None Component: JIT AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=340341) --> (http://bugzilla.novell.com/attachment.cgi?id=340341) Source file to cause Mono runtime crash User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; MS-RTC LM 8) It apperas that attributes which contain complex, generic type instantiations crash at runtime. Reproducible: Always Steps to Reproduce: Install the latest F# CTP at: http://www.microsoft.com/downloads/details.aspx?FamilyID=b55f0532-ac3c-4106-918c-5586a953a7da&displaylang=en Compile the given source code and run it under Mono. Actual Results: Runtime crash Expected Results: Work just fine The following console session shows the repro in action: ------------------------------- D:\FSharp\Oct 2009 CTP\bin>type repro6279.fs open System open System.Diagnostics module TestTypeInstantiationsInAttributes = type ListProxy<'a>(l:List<'a>) = member this.Items = Array.ofList l type C1 = A | B [<DebuggerTypeProxyAttribute(typeof<ListProxy<int>>, Target=typeof<List<C1>>)>] type C2 = A | B let attrs2 = typeof<C2>.GetCustomAttributes(typeof<System.Diagnostics.Debugg erTypeProxyAttribute>,false) ; D:\FSharp\Oct 2009 CTP\bin>mono fsc.exe repro6279.fs Microsoft F# Compiler, (c) Microsoft Corporation, All Rights Reserved F# Version 1.9.7.8, compiling for .NET Framework Version v2.0.50727 D:\FSharp\Oct 2009 CTP\bin>repro6279.exe D:\FSharp\Oct 2009 CTP\bin>mono repro6279.exe ** (repro6279.exe:6320): WARNING **: Cannot load type 'Microsoft.FSharp.Collecti ons.FSharpList`1[[Repro6279+TestTypeInstantiationsInAttributes+C1]], FSharp.Core , Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at System.Diagnostics.DebuggerTypeProxyAttribute.set_Target (System.Type value ) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInter nal (System.Reflection.ICustomAttributeProvider,System.Type,bool) at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider ob j, System.Type attributeType) [0x00000] in <filename unknown>:0 at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, S ystem.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 at System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inh erit) [0x00000] in <filename unknown>:0 at <StartupCode$repro6279>.$Repro6279.main@ () [0x00000] in <filename unknown> :0 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
