[Mono-bugs] [Bug 530861] IntPtr (long value) does not overflow on 32bit machines

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Nov 21 13:21:10 EST 2010


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

https://bugzilla.novell.com/show_bug.cgi?id=530861#c4


--- Comment #4 from Marek Safar <msafar at novell.com> 2010-11-21 18:21:10 UTC ---
Repro

using System;

class A
{
    public static void Main ()
    {
        long l = 2147483648;
        var r = new IntPtr (l);
        Console.WriteLine (r);
    }
}

Mono (32b)

-2147483648

Expected

Unhandled Exception: System.OverflowException: Arithmetic operation resulted in
an overflow.

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