Title: _tracemalloc__get_object_traceback doesn't handle objects with pre-headers correctly · Issue #101430 · python/cpython · GitHub
Open Graph Title: _tracemalloc__get_object_traceback doesn't handle objects with pre-headers correctly · Issue #101430 · python/cpython
X Title: _tracemalloc__get_object_traceback doesn't handle objects with pre-headers correctly · Issue #101430 · python/cpython
Description: 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 type = Py_TYPE(obj); if (PyType_IS_GC(type)) { ptr = (void *)((...
Open Graph Description: 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 type = Py_TYPE(obj); if...
X Description: 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 type = Py_TYPE(obj)...
Opengraph URL: https://github.com/python/cpython/issues/101430
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_tracemalloc__get_object_traceback doesn't handle objects with pre-headers correctly","articleBody":"In the main branch, the function `_tracemalloc__get_object_traceback` doesn't account for objects with preheaders:\r\n\r\nhttps://github.com/python/cpython/blob/ea232716d3de1675478db3a302629ba43194c967/Modules/_tracemalloc.c#L1406-L1414\r\n\r\nThis means that when running with tracemalloc some allocation tracebacks are missing:\r\n\r\n```python\r\nimport warnings\r\n\r\nclass MyClass:\r\n def __del__(self):\r\n warnings.warn(\"Uh oh\", ResourceWarning, source=self)\r\n\r\ndef func():\r\n m = MyClass()\r\n\r\nfunc()\r\n```\r\n\r\n```\r\npython3 -Wd -X tracemalloc=2 example.py\r\n```\r\n\r\ncc @markshannon \n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101745\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2023-01-30T18:04:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/101430/cpython/issues/101430"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d594de80-f6cb-3383-b125-1f91d394d064 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA2E:8619D:24F5B1:30B07A:69697964 |
| html-safe-nonce | 0f5e8093242fee8ca72294c67eb345803a1dda82ed083c705706d80f40180d2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTJFOjg2MTlEOjI0RjVCMTozMEIwN0E6Njk2OTc5NjQiLCJ2aXNpdG9yX2lkIjoiNjE4MzUyODIxNTI2MzkzNDgyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7a7e1b16e5bd48f463a90ad44d71cb540f3749e0e09b26bb5c079757d61d699a |
| hovercard-subject-tag | issue:1562925003 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/101430/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd1aee761ebd43da9a2d1d42b452b25e6bdffea1b8fbb92f6c903371d914b38f/python/cpython/issues/101430 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd1aee761ebd43da9a2d1d42b452b25e6bdffea1b8fbb92f6c903371d914b38f/python/cpython/issues/101430 |
| og:image:alt | 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 type = Py_TYPE(obj); if... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | colesbury |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width