Bug 324208 (MONO81530) - [PATCH] S.R.Emit.TypeBuilder creates unverifiable classes that doesn't extend System.Objectt
Summary: [PATCH] S.R.Emit.TypeBuilder creates unverifiable classes that doesn't extend...
Status: RESOLVED FIXED
Alias: MONO81530
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-05 15:43 UTC by Dominic Marks
Modified: 2007-09-15 21:24 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
ModuleBuilder.diff (3.92 KB, patch)
2007-05-05 21:12 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:37:33 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".