-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_tracemalloc__get_object_traceback doesn't handle objects with pre-headers correctly #101430
Comments
colesbury
added
type-bug
An unexpected behavior, bug, or error
3.12
bugs and security fixes
labels
Jan 30, 2023
Also cpython/Modules/_tracemalloc.c Lines 1726 to 1733 in 28db978
|
corona10
added a commit
to corona10/cpython
that referenced
this issue
Feb 9, 2023
corona10
added a commit
to corona10/cpython
that referenced
this issue
Feb 9, 2023
corona10
added a commit
that referenced
this issue
Feb 9, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Feb 10, 2023
* main: Fix some typos in asdl_c.py (pythonGH-101757) pythongh-101747: Fix refleak in new `OrderedDict` repr (pythonGH-101748) pythongh-101430: Update tracemalloc to handle presize properly. (pythongh-101745) pythonGH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (python#101227) Fix typo in `test_fstring.py` (python#101600) pythongh-101726: Update the OpenSSL version to 1.1.1t (pythonGH-101727) pythongh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (pythonGH-101728) LibFFI build requires x64 Cygwin, and skip the ARM build (pythonGH-101743)
If someone is motivated, it would be nice to add an unit test to test_tracemalloc for this case. |
zhuyifei1999
added a commit
to zhuyifei1999/guppy3
that referenced
this issue
May 13, 2023
Python added _PyType_PreHeaderSize for the preheader and it's no longer just sizeof(PyGC_Head) See python/cpython#101430 For #41
zhuyifei1999
added a commit
to zhuyifei1999/guppy3
that referenced
this issue
May 13, 2023
Python added _PyType_PreHeaderSize for the preheader and it's no longer just sizeof(PyGC_Head) See python/cpython#101430 For #41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the main branch, the function
_tracemalloc__get_object_traceback
doesn't account for objects with preheaders:cpython/Modules/_tracemalloc.c
Lines 1406 to 1414 in ea23271
This means that when running with tracemalloc some allocation tracebacks are missing:
cc @markshannon
Linked PRs
The text was updated successfully, but these errors were encountered: