Please sign in to comment.
_PyObject_DebugReallocApi() now calls Py_FatalError() if realloc() fails to shrink a memory block. Call Py_FatalError() because _PyObject_DebugReallocApi() erased freed bytes *before* realloc(), expecting that realloc() *cannot* fail to shrink a memory block.
- Loading branch information
Showing with 16 additions and 7 deletions.
|@@ -0,0 +1,3 @@|
|When Python is built in debug mode, the memory debug hooks now fail with a|
|fatal error if realloc() fails to shrink a memory block, because the debug|
|hook just erased freed bytes without keeping a copy of them.|