]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-31626: Fix _PyObject_DebugReallocApi() (#4310)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 24 Nov 2017 01:13:26 +0000 (02:13 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Nov 2017 01:13:26 +0000 (02:13 +0100)
commited4743a2f2bb8d88f7f1aa9307794be9a44f1e0f
tree360e8ce9ba66cdae3d0c8194ce4dceb508cf1ca5
parent35d99830f1878867e3964577741d9a2d5a7fc8f7
bpo-31626: Fix _PyObject_DebugReallocApi() (#4310)

_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.
Misc/NEWS.d/next/C API/2017-11-07-11-59-44.bpo-31626.LP-CoD.rst [new file with mode: 0644]
Objects/obmalloc.c