mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Changes: * Add _PyObject_AssertFailed() function. * Add _PyObject_ASSERT() and _PyObject_ASSERT_WITH_MSG() macros. * gc_decref(): replace assert() with _PyObject_ASSERT_WITH_MSG() to dump the faulty object if the assertion fails. _PyObject_AssertFailed() calls: * _PyMem_DumpTraceback(): try to log the traceback where the object memory has been allocated if tracemalloc is enabled. * _PyObject_Dump(): log repr(obj). * Py_FatalError(): log the current Python traceback. _PyObject_AssertFailed() uses _PyObject_IsFreed() heuristic to check if the object memory has been freed by a debug hook on Python memory allocators. Initial patch written by David Malcolm. Co-Authored-By: David Malcolm <dmalcolm@redhat.com> |
||
|---|---|---|
| .. | ||
| clinic | ||
| stringlib | ||
| abstract.c | ||
| accu.c | ||
| boolobject.c | ||
| bytearrayobject.c | ||
| bytes_methods.c | ||
| bytesobject.c | ||
| call.c | ||
| capsule.c | ||
| cellobject.c | ||
| classobject.c | ||
| codeobject.c | ||
| complexobject.c | ||
| descrobject.c | ||
| dict-common.h | ||
| dictnotes.txt | ||
| dictobject.c | ||
| enumobject.c | ||
| exceptions.c | ||
| fileobject.c | ||
| floatobject.c | ||
| frameobject.c | ||
| funcobject.c | ||
| genobject.c | ||
| iterobject.c | ||
| listobject.c | ||
| listsort.txt | ||
| lnotab_notes.txt | ||
| longobject.c | ||
| memoryobject.c | ||
| methodobject.c | ||
| moduleobject.c | ||
| namespaceobject.c | ||
| object.c | ||
| obmalloc.c | ||
| odictobject.c | ||
| rangeobject.c | ||
| README | ||
| setobject.c | ||
| sliceobject.c | ||
| structseq.c | ||
| tupleobject.c | ||
| typeobject.c | ||
| typeslots.inc | ||
| typeslots.py | ||
| unicodectype.c | ||
| unicodeobject.c | ||
| unicodetype_db.h | ||
| weakrefobject.c | ||
Source files for various builtin objects