cpython/Modules
Victor Stinner 626bff8568
bpo-9263: Dump Python object on GC assertion failure (GH-10062)
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>
2018-10-25 17:31:10 +02:00
..
_blake2 Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
_ctypes bpo-29843: raise AttributeError if given negative _length_ (GH-10029) 2018-10-22 18:33:10 +03:00
_decimal bpo-34762: Update PyContext* to PyObject* in asyncio and decimal (GH-9609) 2018-09-27 14:55:55 -04:00
_io bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842) 2018-10-20 02:22:31 +02:00
_multiprocessing
_sha3 bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) 2018-10-11 07:41:00 +03:00
_sqlite bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426) 2018-09-20 14:14:33 +03:00
_xxtestfuzz
cjkcodecs
clinic bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
expat bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) 2018-10-17 18:10:46 -07:00
README
Setup bpo-25711: Rewrite zipimport in pure Python. (GH-6809) 2018-09-18 22:22:29 +03:00
_abc.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
_asynciomodule.c Fix a compiler warning added in bpo-34872. (GH-9722) 2018-10-05 21:20:02 +03:00
_bisectmodule.c bpo-34925: Optimize common case for bisect() argument parsing (#9753) 2018-10-08 08:02:41 -07:00
_bz2module.c bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) 2018-06-23 10:35:23 +02:00
_codecsmodule.c
_collectionsmodule.c Minor performance tweak for deque.index() with a start argument (GH-9440) 2018-09-21 01:46:41 -07:00
_contextvarsmodule.c bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) 2018-09-21 15:33:56 -04:00
_cryptmodule.c
_csv.c bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) 2018-08-16 07:27:50 +03:00
_curses_panel.c
_cursesmodule.c suppress compiler warnings in _cursesmodule.c (#7860) 2018-06-23 12:29:30 +08:00
_datetimemodule.c bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959) 2018-10-22 18:32:52 +02:00
_dbmmodule.c bpo-34248: Add filename to error raised in {gnu,ndbm}.open() (GH-8590) 2018-09-27 22:54:34 +03:00
_elementtree.c Fix error handling bugs in _elementtree.c. (GH-10060) 2018-10-23 22:28:06 +03:00
_functoolsmodule.c
_gdbmmodule.c bpo-34248: Add filename to error raised in {gnu,ndbm}.open() (GH-8590) 2018-09-27 22:54:34 +03:00
_hashopenssl.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
_heapqmodule.c bpo-34797: Convert heapq to the argument clinic (GH-9560) 2018-09-28 12:39:43 -07:00
_json.c bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225) 2018-09-13 00:05:20 +03:00
_localemodule.c bpo-34485: Enhance init_sys_streams() (GH-8978) 2018-08-28 23:26:33 +02:00
_lsprof.c Fix docstring of Profiler class (GH-8651) 2018-08-03 18:09:57 +09:00
_lzmamodule.c bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) 2018-06-23 10:35:23 +02:00
_math.c
_math.h
_opcode.c bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610) 2018-09-18 09:54:26 +03:00
_operator.c
_pickle.c Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630) 2018-09-29 08:48:46 +03:00
_posixsubprocess.c bpo-34651: Only allow the main interpreter to fork. (gh-9279) 2018-09-14 14:17:20 -07:00
_queuemodule.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
_randommodule.c
_scproxy.c closes bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178) 2018-09-11 16:14:00 -07:00
_sre.c Simplified implementation of _sre.ascii_iscased(). (GH-9097) 2018-09-12 15:49:09 +03:00
_ssl.c bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) 2018-10-06 10:41:45 -07:00
_ssl_data.h
_stat.c
_struct.c
_testbuffer.c bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. (GH-8414) 2018-07-26 13:23:03 +03:00
_testcapimodule.c bpo-35059: Add Py_STATIC_INLINE() macro (GH-10093) 2018-10-25 17:28:11 +02:00
_testimportmultiple.c
_testmultiphase.c Make two PyModuleDef_Slot symbols static in _testmultiphase. (GH-8147) 2018-07-06 21:05:51 -07:00
_threadmodule.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
_tkinter.c bpo-34794: Fix a leak in Tkinter. (GH-10025) 2018-10-23 22:40:54 +03:00
_tracemalloc.c bpo-9263: Dump Python object on GC assertion failure (GH-10062) 2018-10-25 17:31:10 +02:00
_uuidmodule.c bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099) 2018-05-25 00:45:09 +02:00
_weakref.c
_winapi.c bpo-34563: Fix for invalid assert on big output of multiprocessing.Process (GH-9027) 2018-09-04 18:10:28 +02:00
_xxsubinterpretersmodule.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
addrinfo.h
arraymodule.c
atexitmodule.c
audioop.c bpo-33781: audioop: enhance rounding double as int (GH-7447) 2018-06-06 15:50:50 +02:00
binascii.c bpo-34736: improve error message for invalid length b64decode inputs (GH-9563) 2018-09-27 22:57:22 -07:00
cmathmodule.c
config.c.in
errnomodule.c
faulthandler.c
fcntlmodule.c
gc_weakref.txt
gcmodule.c bpo-9263: Dump Python object on GC assertion failure (GH-10062) 2018-10-25 17:31:10 +02:00
getaddrinfo.c
getbuildinfo.c
getnameinfo.c
getpath.c bpo-28441: Ensure `.exe` suffix in `sys.executable` on MinGW and Cygwin (GH-4348) 2018-10-05 20:38:50 +09:00
grpmodule.c bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) 2018-09-07 19:10:39 +02:00
hashlib.h
hashtable.c
hashtable.h
itertoolsmodule.c bpo-34659: Adds initial kwarg to itertools.accumulate() (GH-9345) 2018-09-23 17:34:59 -07:00
ld_so_aix.in
main.c Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430) 2018-09-19 14:56:36 -07:00
makesetup bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229) 2018-07-16 19:03:03 +02:00
makexp_aix
mathmodule.c Speed-up math.dist() by 30% (GH-9628) 2018-09-29 14:30:38 -07:00
md5module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
mmapmodule.c Fix misleading mentions of tp_size in comments (GH-9093) 2018-09-10 09:46:08 -07:00
nismodule.c
ossaudiodev.c bpo-34740: Get rid of tp_getattro in ossaudiodev.oss_audio_device. (GH-9421) 2018-10-04 10:42:06 +03:00
overlapped.c
parsermodule.c
posixmodule.c bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784) 2018-10-20 02:28:22 +02:00
posixmodule.h
pwdmodule.c bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) 2018-09-07 19:10:39 +02:00
pyexpat.c bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422) 2018-10-19 18:00:51 +03:00
readline.c bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915) 2018-05-17 02:45:10 -04:00
resource.c bpo-34674: Assume unistd.h exists on Unix. (GH-9290) 2018-09-13 21:57:31 -07:00
rotatingtree.c
rotatingtree.h
selectmodule.c bpo-29386: Pass -1 to epoll_wait() when timeout is < -1 (GH-9040) 2018-09-11 20:29:48 +03:00
sha1module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
sha256module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
sha512module.c bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
signalmodule.c bpo-34412: Make signal.strsignal() work on HP-UX (GH-8786) 2018-08-23 16:27:19 +03:00
socketmodule.c bpo-31425: Expose AF_QIPCRTR in socket module (GH-3706) 2018-09-26 16:47:52 +03:00
socketmodule.h bpo-31425: Expose AF_QIPCRTR in socket module (GH-3706) 2018-09-26 16:47:52 +03:00
spwdmodule.c
sre.h
sre_constants.h
sre_lib.h
symtablemodule.c bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872) 2018-10-20 01:46:00 +01:00
syslogmodule.c
termios.c
testcapi_long.h
timemodule.c closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) 2018-10-20 17:07:54 -07:00
tkappinit.c
tkinter.h
unicodedata.c bpo-29456: Fix bugs in unicodedata.normalize: u1176, u11a7 and u11c3 (GH-1958) 2018-06-15 20:03:14 +08:00
unicodedata_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) 2018-06-06 20:14:28 -07:00
unicodename_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) 2018-06-06 20:14:28 -07:00
winreparse.h
xxlimited.c bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) 2018-05-26 10:51:58 +03:00
xxmodule.c
xxsubtype.c
zlibmodule.c bpo-25007: Add copy protocol support to zlib compressors and decompressors (GH-7940) 2018-06-27 21:04:51 +03:00

README

Source files for standard library extension modules,
and former extension modules that are now builtin modules.