[Issue 11646] [snn] `malloc` is unstable for large allocations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 31 02:04:33 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=11646

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
The malloc code in snn.lib is:

  void *malloc (size_t m_size)
  {
    /* The +2 is because there's a buffer overflow somewhere in stlport.
     * It is triggered by stltutorial\ex13-01.cpp
     */
    return HeapAlloc(_default_heap, 0, m_size + 2);
  }

https://github.com/DigitalMars/dmc/blob/master/src/HEAP32/MALLOC.C

HeapAlloc() is a Windows system function, i.e. bugs in it are Windows bugs.

--


More information about the Digitalmars-d-bugs mailing list