Thread overview
[Issue 11646] [snn] `malloc` is unstable for large allocations
Aug 29, 2020
Walter Bright
Aug 31, 2020
Walter Bright
Aug 31, 2020
Walter Bright
Aug 31, 2020
Walter Bright
August 29, 2020
https://issues.dlang.org/show_bug.cgi?id=11646

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |backend
                 CC|                            |bugzilla@digitalmars.com

--
August 31, 2020
https://issues.dlang.org/show_bug.cgi?id=11646

--- Comment #1 from Walter Bright <bugzilla@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.

--
August 31, 2020
https://issues.dlang.org/show_bug.cgi?id=11646

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
Fixed: https://github.com/DigitalMars/dmc/commit/1ba0e41c66d8c7a266b55e5b7b19ed9476ca7726

--
August 31, 2020
https://issues.dlang.org/show_bug.cgi?id=11646

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
I've updated the dmc.zip and dm857c.zip downloads.

--