Title: Jumping before comprehensions yields SIGSEGV · Issue #92311 · python/cpython · GitHub
Open Graph Title: Jumping before comprehensions yields SIGSEGV · Issue #92311 · python/cpython
X Title: Jumping before comprehensions yields SIGSEGV · Issue #92311 · python/cpython
Description: Full reproducer: import sys def fun(): a = 1 # <---- jump location x = [i for i in range(10)] c = 3 # current location def trace(frame, event, arg): if event == "line" and frame.f_lineno == 9: frame.f_lineno = 4 return trace sys.settrace...
Open Graph Description: Full reproducer: import sys def fun(): a = 1 # <---- jump location x = [i for i in range(10)] c = 3 # current location def trace(frame, event, arg): if event == "line" and frame.f_lineno == 9: fram...
X Description: Full reproducer: import sys def fun(): a = 1 # <---- jump location x = [i for i in range(10)] c = 3 # current location def trace(frame, event, arg): if event == "line" and frame.f_line...
Opengraph URL: https://github.com/python/cpython/issues/92311
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Jumping before comprehensions yields SIGSEGV","articleBody":"Full reproducer:\r\n```\r\nimport sys\r\n\r\n\r\ndef fun():\r\n a = 1 # \u003c---- jump location\r\n\r\n x = [i for i in range(10)]\r\n\r\n c = 3 # current location\r\n\r\n\r\ndef trace(frame, event, arg):\r\n if event == \"line\" and frame.f_lineno == 9:\r\n frame.f_lineno = 4\r\n\r\n return trace\r\n\r\n\r\nsys.settrace(trace)\r\n\r\nif __name__ == \"__main__\":\r\n fun()\r\n```\r\nJumping from line `current location` to `jump location` yields SIGSEGV\r\n\r\n**Error messages**\r\n\r\n```\r\n.venv/bin/python \u003ccwd\u003e/cakeshop.py\r\nFatal Python error: Segmentation fault\r\n\r\nCurrent thread 0x00007f16eaae5280 (most recent call first):\r\n File \"\u003ccwd\u003e/cakeshop.py\", line 14 in trace\r\n File \"\u003ccwd\u003e/cakeshop.py\", line 9 in fun\r\n File \"\u003ccwd\u003e/cakeshop.py\", line 22 in \u003cmodule\u003e\r\n\r\nProcess finished with exit code 139 (interrupted by signal 11: SIGSEGV)\r\n\r\n```\r\n**Your environment**\r\n\r\n- CPython versions tested on: 3.9.11, 3.10.1 (3.11.x works as expected same as \u003c3.9)\r\n- Operating system and architecture: Linux q 5.4.0-42-generic x64\r\n","author":{"url":"https://github.com/dkrystki","@type":"Person","name":"dkrystki"},"datePublished":"2022-05-04T16:16:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/92311/cpython/issues/92311"}
| 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:7263ae94-a84b-269f-2369-022f09c9874d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1F2:309720:EF5CC6:14BA31B:696A941F |
| html-safe-nonce | 6f9fce9cbabb2d675fd4aa169965341b5761a345675cb1b649ec2732c670780a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUYyOjMwOTcyMDpFRjVDQzY6MTRCQTMxQjo2OTZBOTQxRiIsInZpc2l0b3JfaWQiOiIxMjkyNjYwNDc0OTYzOTg5NTM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 769cc34b64d940cc6631788a54bc74f8af0b43d57c9d6a4e73ad5d0a0e3122fd |
| hovercard-subject-tag | issue:1225595396 |
| 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/92311/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d22809346bde0213fcd094e51def52b0299b7c26647f077489a70eb0473818a4/python/cpython/issues/92311 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d22809346bde0213fcd094e51def52b0299b7c26647f077489a70eb0473818a4/python/cpython/issues/92311 |
| og:image:alt | Full reproducer: import sys def fun(): a = 1 # <---- jump location x = [i for i in range(10)] c = 3 # current location def trace(frame, event, arg): if event == "line" and frame.f_lineno == 9: fram... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dkrystki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4dd496afc954da9c207b2d9fbe86e3074619f565754aa1d9274aec30d9e5b8d7 |
| 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 | 31496a13b80a2f6ad77d6c617ee2255a3545b539 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width