Bug 389848

Summary: GMCS miscompiles huge source file
Product: [Mono] Mono: Runtime Reporter: Rodrigo Kumpera <rkumpera>
Component: miscAssignee: Mono Bugs <mono-bugs>
Status: RESOLVED INVALID QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_vxPDddArjq
Version: SVN   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: test file

Description Rodrigo Kumpera 2008-05-13 15:05:16 UTC
GMCS miscompiles a file with a huge number of methods (40001).

It might be either gmcs or SRE fault.
Comment 1 Rodrigo Kumpera 2008-05-13 15:07:22 UTC
Created attachment 214823 [details]
test file

The attached cs file has 400001 methods and gmcs miscompiles it.
Comment 2 Marek Safar 2008-05-13 15:16:03 UTC
Can you better classify "miscompiles" 
Comment 3 Rodrigo Kumpera 2008-05-13 15:35:35 UTC
By miscompilation I mean it generates an invalid assembly. The runtime fail to load it with:

** (tst.exe:22885): CRITICAL **: mono_metadata_string_heap: assertion `index < meta->heap_strings.size' failed


Compiling with csc maked everything work just fine.
Comment 4 Rodrigo Kumpera 2008-05-13 15:36:30 UTC
Marek,

Let me confirm is this is not a SRE bug first.
Comment 5 Rodrigo Kumpera 2008-05-13 17:50:58 UTC
Generating similar code directly with SRE doesn't cause any crash.
Comment 6 Marek Safar 2008-05-14 08:38:27 UTC
gmcs running on .NET compiles this code correctly.

-> runtime
Comment 7 Forgotten User vxPDddArjq 2008-05-14 17:45:32 UTC
I can't repro this using a runtime built from svn. You might be running gmcs
on the installed runtime, which doesn't contain the table size bugfix.
Comment 8 Rodrigo Kumpera 2008-05-14 18:55:21 UTC
My bad, running gmcs with old mono was causing it.