[Issue 1089] New: Unsafe pointer comparison in TypeInfo_Pointer.compare

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 1 09:56:54 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1089

           Summary: Unsafe pointer comparison in TypeInfo_Pointer.compare
           Product: DGCC aka GDC
           Version: 0.23
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Phobos
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: madou at madou.org


in phobos/internal/object.d, line 412, the following code will fail miserably
for p1 - p2 > int.max

    int compare(void *p1, void *p2)
    {
        return *cast(void* *)p1 - *cast(void* *)p2;
    }


-- 



More information about the D.gnu mailing list