[Mono-bugs] [Bug 448558] New: gmcs emits unverifiable generic code
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Nov 25 05:12:21 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=448558
Summary: gmcs emits unverifiable generic code
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: rkvinge at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Test sample:
class T {
public P GetService <P> () where P : class
{
return null;
}
}
gmcs il:
method public hidebysig instance !!P GetService<class P>() cil managed
{
.maxstack 8
L_0000: ldnull
L_0001: ret
}
csc il:
method public hidebysig instance !!P GetService<class P>() cil managed
{
.maxstack 1
.locals init (
[0] !!P local)
L_0000: ldloca.s local
L_0002: initobj !!P
L_0008: ldloc.0
L_0009: ret
}
peverify says (out gmcs):
[IL]: Error: [test.dll : T::GetService[P]][offset 0x00000001][found Nullobjref
'NullReference'][expected (unboxed) 'P'] Unexpected type on the stack.
1 Error(s) Verifying test.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.
More information about the mono-bugs
mailing list