https://bugzilla.novell.com/show_bug.cgi?id=409500
Summary: Using -nostdlib with a reference to mscorlib crashes
compiler
Product: Mono: Compilers
Version: 1.9.0
Platform: x86
OS/Version: Debian Woody
Status: NEW
Severity: Minor
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: Third Party Developer/Partner
Description of Problem:
When gmcs/smcs/mcs is given a command line like the following:
gmcs -nostdlib -reference:/usr/lib/mono/2.0/mscorlib.dll HelloWorld.cs
the compiler then fails with the following error:
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object
at Mono.CSharp.RootContext.ResolveCore () [0x00000]
at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
That is, the built-in system types do not seem to be resolved correctly.
Steps to reproduce the problem:
1. Compile any .cs file with gmcs -nostdlib
-reference:/usr/lib/mono/2.0/mscorlib.dll HelloWorld.cs
2. Observe error
Actual Results:
Compilation fails.
Expected Results:
Compilation should succeed.
How often does this happen?
Every time.
Additional Information:
This problem surfaced when I tried using xbuild to compile a .csproj file and
xbuild called gmcs with a command line with both -nostdlib and a reference to
mscorlib.dll.
--
Configure bugmail: https://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