[Mono-bugs] [Bug 387162] mono aborts on unverifiable IL that runs on .net

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 6 17:24:55 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=387162

User rkumpera at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387162#c4





--- Comment #4 from Rodrigo Kumpera <rkumpera at novell.com>  2008-05-06 15:24:54 MST ---
I have fixed the issues with the verifier and now --verify-all works as
expected.

Besides that, we have some bugs on mini. Unsafe/unverifiable code can expect
that implicit casts are placed were needed.

This means that the sequence:

ldloca.s 1
call instance !0 valuetype [mscorlib]System.Nullable`1<float64>::get_Value()
ldloca.s 2
call instance !0 valuetype [mscorlib]System.Nullable`1<float64>::get_Value()
ceq 
newobj instance void valuetype
[mscorlib]System.Nullable`1<float64>::'.ctor'(!0)


Should be JITed as it was:
ldloca.s 1
call instance !0 valuetype [mscorlib]System.Nullable`1<float64>::get_Value()
ldloca.s 2
call instance !0 valuetype [mscorlib]System.Nullable`1<float64>::get_Value()
ceq 
conv.r8 //<-- 
newobj instance void valuetype
[mscorlib]System.Nullable`1<float64>::'.ctor'(!0)


But if I apply this change to the test case I get a NRE instead of the expected
result:

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at System.String.memcpy4 (System.Byte* dest, System.Byte* src, Int32 size)
[0x00000] 
  at System.String.memcpy (System.Byte* dest, System.Byte* src, Int32 size)
[0x00000] 
  at Test.AreEqual (Nullable`1 A_1, Nullable`1 A_2) [0x00000] 
  at Test.Main () [0x00000] 


I don't see a point in fixing the code beyond the implicit conversion issue as
the code is badly broken due a stack merge with incompatible types.


-- 
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