[Mono-bugs] [Bug 321615] C# compiler should use unsigned arithmetic and should support overflow check on pointers

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 3 10:26:25 EDT 2008


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

User gert.driesen at pandora.be added comment
https://bugzilla.novell.com/show_bug.cgi?id=321615#c5


Gert Driesen <gert.driesen at pandora.be> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |gert.driesen at pandora.be
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |




--- Comment #5 from Gert Driesen <gert.driesen at pandora.be>  2008-07-03 08:26:24 MDT ---
This is still not fixed:

using System;

class Program
{
        static unsafe int Main ()
        {
                return Test ((sbyte*) (-1));
        }

        static unsafe int Test (sbyte* x)
        {
                if ((x + 1) < x) {
                        Console.WriteLine ("OK");
                        return 0;
                } else {
                        Console.WriteLine ("BAD");
                        return 1;
                }
        }
}

Expected result:

OK (exitcode 0)

Actual result:

BAD (exitcode 1)


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