FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.6] bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) by vstinner · Pull Request #10663 · python/cpython · GitHub

Repository navigation

[3.6] bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) - #10663

Merged
vstinner merged 1 commit into
python:3.6from
vstinner:object_dump36
Nov 22, 2018
Merged

vstinner merged 1 commit into
python:3.6from
vstinner:object_dump36

Conversation

vstinner commented Nov 22, 2018 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

_PyObject_Dump() now uses an heuristic to check if the object memory
has been freed: log "" 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 82af0b6)

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 2cf5d32)
(cherry picked from commit 95036ea)

https://bugs.python.org/issue9263

…10662)

* 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 82af0b6)

* 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 2cf5d32)
(cherry picked from commit 95036ea)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL