Bugzilla – Bug 324208
[PATCH] S.R.Emit.TypeBuilder creates unverifiable classes that doesn't extend System.Objectt
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by dom@goodforbusiness.co.uk 2007-05-05 08:43:39 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Loading a recently emitted type causes mono to core dump Steps to reproduce the problem: 1. See this file http://www.goodforbusiness.co.uk/~dom/E.cs 2. 3. Actual Results: Mono dumps core at Type.GetType() Expected Results: The program exits cleanly How often does this happen? Everytime Additional Information: Works ok on the Microsoft runtime. ---- Additional Comments From robertj@gmx.net 2007-05-05 14:11:44 MST ---- [Subject changed] The runtime aborts because TypeBuilder lTypeBuilder = lModuleBuilder.DefineType("Dummy." + lAssemblyName.Name, lAttributes, null); defines a class that doesn't extend any type. This leads to a non-verifiable assembly. If the line is changed to TypeBuilder lTypeBuilder = lModuleBuilder.DefineType("Dummy." + lAssemblyName.Name, lAttributes); the generated assembly is OK. MS.NET seems to catch null base types, as the attached patch does. ---- Additional Comments From robertj@gmx.net 2007-05-05 14:12:17 MST ---- Created an attachment (id=171911) ModuleBuilder.diff ---- Additional Comments From vargaz@gmail.com 2007-05-05 19:26:45 MST ---- Fixed in SVN. Imported an attachment (id=171911) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>FreeBSD 6.2-RELEASE</cf_op_sys_details> Unknown operating system other. Setting to default OS "Other".