In the main branch, the function `_tracemalloc__get_object_traceback` doesn't account for objects with preheaders: https://github.com/python/cpython/blob/ea232716d3de1675478db3a302629ba43194c967/Modules/_tracemalloc.c#L1406-L1414 This means that when running with tracemalloc some allocation tracebacks are missing: ```python import warnings class MyClass: def __del__(self): warnings.warn("Uh oh", ResourceWarning, source=self) def func(): m = MyClass() func() ``` ``` python3 -Wd -X tracemalloc=2 example.py ``` cc @markshannon <!-- gh-linked-prs --> ### Linked PRs * gh-101745 <!-- /gh-linked-prs -->