cpython-tracerefs % ../../cpython/configure -C --with-trace-refs --with-pydebug
[...]
cpython-tracerefs % make
[...]
cpython-tracerefs % ./python -m test test_int
0:00:00 load avg: 2.79 Run tests sequentially
0:00:00 load avg: 2.79 [1/1] test_int
== Tests result: SUCCESS ==
1 test OK.
Total duration: 477 ms
Tests result: SUCCESS
../../cpython/Objects/object.c:2234: _Py_ForgetReference: Assertion failed: invalid object chain
Enable tracemalloc to get the memory block allocation traceback
object address : 0x7ff86d998050
object refcount : 0
object type : 0x55fbc49aba60
object type name: dict
object repr : <refcnt 0 at 0x7ff86d998050>
Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: finalizing (tstate=0x000055fbc4b27e88)
Current thread 0x00007ff86daec740 (most recent call first):
<no Python frame>
Aborted
In a
--with-trace-refs --with-pydebugbuild of 3.12 and main, even a simple test liketest_inttriggers an assertion error in the refchain handling. I expect it's caused by @ericsnowcurrently's PR #107567.Linked PRs