[Mono-bugs] [Bug 504791] New: NRE in FileSystem.FileOpen due to compiler problem
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 18 11:09:23 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=504791
Summary: NRE in FileSystem.FileOpen due to compiler problem
Classification: Mono
Product: Mono: Compilers
Version: 2.4.x
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basic
AssignedTo: rkvinge at novell.com
ReportedBy: andyhume32 at yahoo.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648;
NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Calling FileSystem.FileOpen on the Mono Runtime fails with a fault in the Mono
VBRuntime.
[[
Class UseVbrtFileSystemFileOpen
Shared Sub Main
FileSystem.FileOpen(1, "foo.txt", OpenMode.Append)
End Sub
End Class
]]
Fails with:
[[
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at Microsoft.VisualBasic.FileSystem.FileOpen (Int32 FileNumber, System.String
FileName, OpenMode Mode, OpenAccess Access, OpenShare Share, Int32
RecordLength) [0x00000]
at UseVbrtFileSystemFileOpen.Main () [0x00000]
]]
Inspecting the runtime library code shows that incorrect IL has been generated,
the first If statement in the FileOpen method being badly mangled, with some
clauses having their conditions reversed, and other clauses skipped.
I can't see any workaround. (One would need to make m_OpenFiles non-null, but
it is only assigned by that method).
Reproducible: Always
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list