Skip to content

Umbrella issue: bugs found using cpython-review-toolkit #146102

Description

@devdanzin

Bug report

What happened?

This is an umbrella issue for 50 select bugs found using cpython-review-toolkit, distributed across ~350K lines of CPython C code (Modules/, Objects/, Python/).

Feel free to work on any report, opening an issue if one doesn't exist yet. Comment with the issue and respective gist/bug here and I'll update the table. If you find an issue listed below that is a duplicate of an existing report, let me know and I'll also mark it in the table.

Modules/ (18 gists)

GistDescriptionCPython Issue
gist_ssl.c: Py_DECREF(NULL) in SNI callback#146080 FIXED
gist_sqlite: collation assertion + missing PyErr_NoMemory#146090 FIXED
gistfunctools partial PyDict_Contains -1 as truthy#146075 FIXED
gist_csv.c: _set_str missing NULL check#146093 FIXED
gist_zoneinfo: SEGV in get_weak_cache#146076 FIXED
gist_zoneinfo: missing PyErr_NoMemory in load_data#146092 FIXED
gisttermios: NULL to PyLong_AsLong#146091 FIXED
gist_struct: segfault/assertion on uninitialized StructFixed in 515ae40
gistpyexpat: ExternalEntityParserCreate crashFixed in e6b9a14
gist_interpqueuesmodule: use-after-free dangling last#146427
gistselectmodule: errno < 0 always false#146205 FIXED
gist_lsprof: exception clobbering#153068 FIXED
gistdeque.copy() ref corruption on OOM#152017
gistreadline: begidx NULL on OOM#154385
gistzlibmodule: PyErr_NewException uncheckedfalse alarm
gistsocketmodule: audit hook ref/buffer leaks#146245 FIXED
gist_interpchannelsmodule: missing PyErr_NoMemory#150213 FIXED
gist_interpretersmodule: SEGV on create under OOMFixed in d06113c

Objects/ (13 gists)

GistDescriptionCPython Issue
gistExceptionGroup repr OOB — 3-line segfault#146096 FIXED
gistSyntaxError.__init__ ref leaks on re-init#146250 FIXED
gistcodeobject: code_richcompare swallows errors#146199 FIXED
gistcodeobject: co_tlbc NULL + replacement_locations leak
gistweakref WRAP_BINARY ref leak (~20 operators)#153058
gistFrameLocalsProxy swallows/overwrites errors
gisttypeobject: missing return -1 in type_readycommit c398490
gisttypeobject: buffer leak in slot_bf_getbuffer#151346 FIXED
gistobject.c: PyObject_Print missing LeaveRecursiveCallcommit e2fa10e
giststructseq: get_type_attr_as_size NULL deref#148119 FIXED
gistgenericaliasobject: two NULL dereference bugs#148226 FIXED
gistodictobject: spurious PyErr_Clear#151347 FIXED
gistunicode_format: wrong return + PY_SSIZE_T_MIN UB#151845#151847

Python/ (16 gists)

GistDescriptionCPython Issue
gistimport.c: wrong interpreter + double lock release#150454#150374 FIXED
gistinstrumentation.c: PyLong leak per monitoring call#150379 FIXED
gistinstrumentation.c: use-after-Py_DECREF comparison#151524
gistceval.c: missing PyErr_NoMemory + PyEval_GetLocals NULL#153205 FIXED
gistbltinmodule: __lazy_import__ NULL deref#151510 FIXED
gistcrossinterp: UAF + leaked exception + shadowed var
gistcompiler pipeline: 6 ref leaks and error bugs#146442 FIXED
gistmarshal: 8 refs leaked on corrupt TYPE_CODE#148418 FIXED
gistpylifecycle: 5 init/fini cleanup bugs
gistinitconfig: SET_ITEM macro leaks dict#146244 FIXED
gistast.c: LEAVE_RECURSIVE missing on 30 paths
gisthamt.c: sub_node leaked in bitmap ops#150178
gistpythonrun: main_module ref leak#146355 FIXED
gistmodsupport: missing va_end (UB)#146386 FIXED
gistlegacy_tracing: unchecked PyLong_AsInt#153622
gistoptimizer_symbols: make_bottom NULL deref#146388 FIXED

Duplicates (3 gists — same bugs uploaded from different runs)

GistDuplicate of
gistExceptionGroup repr (dup of dceaa8b7)
gistsqlite collation (dup of 69aff7ff)
gistSSL SNI (dup of 50f98806)

These issues were found with Claude Opus 4.6, using the /cpython-review-toolkit:explore [file or directory] all deep command.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.15.0a7+ (heads/main:e0f7c1097e1, Mar 17 2026, 18:10:52) [Clang 21.1.2 (2ubuntu6)]

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errortype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions