[Issue 2819] New: array.sort segfaults if array length >=0x8F_FFFF

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 7 11:17:27 PDT 2009


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

           Summary: array.sort segfaults if array length >=0x8F_FFFF
           Product: D
           Version: 1.042
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


void main() {
  auto a = new uint[0x8F_FFFF]; // smallest size that fails
  a.sort;
}

It's caused by the hard-coded
  byte*[40] stack;              // stack

in
extern (C) long _adSort(Array a, TypeInfo ti)
in qsort.d.

Affects both D1 and D2.
This is just another reason for the built-in .sort to be deprecated.


-- 



More information about the Digitalmars-d-bugs mailing list