Staging
v0.8.1
https://github.com/python/cpython
Revision 95036ea25d47f0081bda2ba96ea327f3375cb6a4 authored by Victor Stinner on 22 November 2018, 16:15:37 UTC, committed by GitHub on 22 November 2018, 16:15:37 UTC
* bpo-9263: _PyObject_Dump() detects freed memory (GH-10061)

_PyObject_Dump() now uses an heuristic to check if the object memory
has been freed: log "<freed object>" in that case.

The heuristic rely on the debug hooks on Python memory allocators
which fills the memory with DEADBYTE (0xDB) when memory is
deallocated. Use PYTHONMALLOC=debug to always enable these debug
hooks.

(cherry picked from commit 82af0b63b07aa8d92b50098e382b458143cfc677)

* bpo-9263: Fix _PyObject_Dump() for freed object (#10661)

If _PyObject_Dump() detects that the object is freed, don't try to
dump it (exit immediately).

Enhance also _PyObject_IsFreed(): it now detects if the pointer
itself looks like freed memory.

(cherry picked from commit 2cf5d32fd9e61488e8b0be55a2e92a752ba8b06b)
1 parent a519411
History
Tip revision: 95036ea25d47f0081bda2ba96ea327f3375cb6a4 authored by Victor Stinner on 22 November 2018, 16:15:37 UTC
[3.7] bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662)
Tip revision: 95036ea
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.5 KB
.gitignore -rw-r--r-- 1.5 KB
.travis.yml -rw-r--r-- 6.0 KB
CODE_OF_CONDUCT.rst -rw-r--r-- 631 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 61.1 KB
README.rst -rw-r--r-- 9.9 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 488.5 KB
configure.ac -rw-r--r-- 163.3 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 42.1 KB
setup.py -rw-r--r-- 99.5 KB

README.rst

back to top