[Issue 1180] New: the GC failes to handle large allocation requests propperly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 23 11:01:29 PDT 2007


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

           Summary: the GC failes to handle large allocation requests
                    propperly
           Product: D
           Version: 1.012
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P3
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn


Due to the size calculation used in all array length related GC functions 
excessive allocation requests like

long[] l = new long[size_t.max];

allocate  "(element_size * element_count) & 0xFFFF_FFFF" bytes and not 
"element_size * element_count" bytes.

Even non-excessive requests like

byte[] b = new byte[size_t.max / 3];

fail with a segfault because bigAlloc uses "assert (0)" instead of 
"_d_OutOfMemory".


-- 



More information about the Digitalmars-d-bugs mailing list