[Mono-bugs] [Bug 580189] sizeof IL instruction return wrong results

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 16 15:41:21 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=580189

http://bugzilla.novell.com/show_bug.cgi?id=580189#c2


--- Comment #2 from Florian George <fgeo at hotmail.com> 2010-02-16 20:41:20 UTC ---
(In reply to comment #0)

The result for sizeof(int8) was wrong due to an error in the test code.
sizeof(int8) is corrected reported as 1.

Therefore the bug is only present when sizeof is used with a generic type
(sizeof(T)).

Last two paragraphs of bug description shall be ignored.


Here is the corrected output:

Mono 2.6.1 amd64 on Ubuntu x86/64 built from sources tarball (all default):

sizeof(int8): 1
sizeof(int32): 4
sizeof(int64): 8

sizeof(T) with T=int8: 8
sizeof(T) with T=int32: 8
sizeof(T) with T=int64: 8

&a[1] - &a[0] with int8[]: 1
&a[1] - &a[0] with int32[]: 4
&a[1] - &a[0] with int64[]: 8

---------------------

Mono 2.6.1 x86 on Windows 7 x64 (downloaded setup):

sizeof(int8): 1
sizeof(int32): 4
sizeof(int64): 8

sizeof(T) with T=int8: 4
sizeof(T) with T=int32: 4
sizeof(T) with T=int64: 4

&a[1] - &a[0] with int8[]: 1
&a[1] - &a[0] with int32[]: 4
&a[1] - &a[0] with int64[]: 8

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