[Mono-bugs] [Bug 469742] System.NullReferenceException when generics used

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 27 10:16:06 EST 2009


User mprobst at novell.com added comment

--- Comment #2 from Mark Probst <mprobst at novell.com>  2009-01-27 08:16:05 MST ---
Created an attachment (id=267946)
 --> (https://bugzilla.novell.com/attachment.cgi?id=267946)
Proposed patch.

The problem is the sequence

        IL_0000:  ldnull 
        IL_0001:  unbox.any !!0
        IL_0006:  stloc.0 

The code which generates the code for unbox.any just emits a check and then
leaves the variable on the stack that ldnull generated.  emit_stloc_ir()
doesn't take into account that that variable might be in use somewhere else and
just destroys it, so the generated code doesn't check NULL but uninitialized

Configure bugmail: https://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