Title: Crash when inspecting frame of generator · Issue #94262 · python/cpython · GitHub
Open Graph Title: Crash when inspecting frame of generator · Issue #94262 · python/cpython
X Title: Crash when inspecting frame of generator · Issue #94262 · python/cpython
Description: Crash report This was discovered in an asyncio program when interrupted with CTRL - C. Minimal Reproducer: import gc import inspect gc.set_threshold(1, 0, 0) f = [] def cb(*args): f.append(inspect.stack()) gc.callbacks.append(cb) def gen...
Open Graph Description: Crash report This was discovered in an asyncio program when interrupted with CTRL - C. Minimal Reproducer: import gc import inspect gc.set_threshold(1, 0, 0) f = [] def cb(*args): f.append(inspect....
X Description: Crash report This was discovered in an asyncio program when interrupted with CTRL - C. Minimal Reproducer: import gc import inspect gc.set_threshold(1, 0, 0) f = [] def cb(*args): f.append(inspect....
Opengraph URL: https://github.com/python/cpython/issues/94262
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash when inspecting frame of generator","articleBody":"\u003c!--\r\n Use this template for hard crashes of the interpreter, segmentation faults, failed C-level assertions, and similar.\r\n Do not submit this form if you encounter an exception being unexpectedly raised from a Python function.\r\n Most of the time, these should be filed as bugs, rather than crashes.\r\n\r\n The CPython interpreter is itself written in a different programming language, C.\r\n For CPython, a \"crash\" is when Python itself fails, leading to a traceback in the C stack.\r\n--\u003e\r\n\r\n**Crash report**\r\n\r\nThis was discovered in an `asyncio` program when interrupted with CTRL - C.\r\nMinimal Reproducer:\r\n```py\r\nimport gc\r\nimport inspect\r\n\r\ngc.set_threshold(1, 0, 0)\r\nf = []\r\n\r\ndef cb(*args):\r\n f.append(inspect.stack())\r\n\r\ngc.callbacks.append(cb)\r\n\r\ndef gen():\r\n yield 1\r\n\r\ng = gen()\r\ng.__next__()\r\n```\r\n\r\n**Error messages**\r\n\r\n```console\r\npython: Python/ceval.c:5436: _PyEval_EvalFrameDefault: Assertion `frame-\u003eframe_obj == NULL' failed.\r\nAborted (core dumped)\r\n```\r\n\r\n**Your environment**\r\n\r\n\u003c!-- Include as many relevant details as possible about the environment you experienced the bug in --\u003e\r\n\r\n- CPython versions tested on: Python 3.12.0a0 51fd4de101, Python 3.11.0b3+ 41e4b426ce\r\n- Operating system and architecture: Linux 5.4.0-1074-azure\r\n\r\n\u003c!--\r\nYou can freely edit this text. Remove any lines you believe are unnecessary.\r\n--\u003e\r\ncc @markshannon @pablogsal ","author":{"url":"https://github.com/kumaraditya303","@type":"Person","name":"kumaraditya303"},"datePublished":"2022-06-25T10:42:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/94262/cpython/issues/94262"}
| 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:59f4e80e-ca00-a1e3-de4d-54ae41cbc902 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D674:145B07:EF8958:14EAF5E:696A3CFD |
| html-safe-nonce | 029eb6f4b3f733c6d69112234b10710a369a226382f6dd75b24c76b365a25e4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjc0OjE0NUIwNzpFRjg5NTg6MTRFQUY1RTo2OTZBM0NGRCIsInZpc2l0b3JfaWQiOiI0NDk2MTY2Mjc3NzAwMjcxMzU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 65facc1922968b41cc74d0537c11b5f4ce68cc6fb9d206b4788d6746ba83f77c |
| hovercard-subject-tag | issue:1284544626 |
| 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/94262/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f5360f8a8fdb6f0c9f0426bb5511db20f294b895b691476d274482a1d8dd28b/python/cpython/issues/94262 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f5360f8a8fdb6f0c9f0426bb5511db20f294b895b691476d274482a1d8dd28b/python/cpython/issues/94262 |
| og:image:alt | Crash report This was discovered in an asyncio program when interrupted with CTRL - C. Minimal Reproducer: import gc import inspect gc.set_threshold(1, 0, 0) f = [] def cb(*args): f.append(inspect.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kumaraditya303 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| 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 | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width