Title: Error handling for some instructions is incorrect · Issue #99298 · python/cpython · GitHub
Open Graph Title: Error handling for some instructions is incorrect · Issue #99298 · python/cpython
X Title: Error handling for some instructions is incorrect · Issue #99298 · python/cpython
Description: In several places, we have goto error; branches in bytecode instructions that occur after modifying the next_instr pointer. This is incorrect, since the error branch will behave as if the error occurred in the new location (most often an...
Open Graph Description: In several places, we have goto error; branches in bytecode instructions that occur after modifying the next_instr pointer. This is incorrect, since the error branch will behave as if the error occ...
X Description: In several places, we have goto error; branches in bytecode instructions that occur after modifying the next_instr pointer. This is incorrect, since the error branch will behave as if the error occ...
Opengraph URL: https://github.com/python/cpython/issues/99298
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error handling for some instructions is incorrect","articleBody":"In several places, we have `goto error;` branches in bytecode instructions that occur *after* modifying the `next_instr` pointer. This is incorrect, since the error branch will behave as if the error occurred in the *new* location (most often an adjacent instruction). The result could be as benign as an incorrect location in a traceback, or as problematic as incorrect control flow in or near a `try`/`except` block.\r\n\r\nI tried for a bit to make the compiler emit code that did the wrong thing here, and I wasn't able to. So this is mostly a theoretical concern (but still worth fixing).\n\n\u003c!-- gh-pr-number: gh-99299 --\u003e\n* PR: gh-99299\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-99343 --\u003e\n* PR: gh-99343\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-99398 --\u003e\n* PR: gh-99398\n\u003c!-- /gh-pr-number --\u003e\n","author":{"url":"https://github.com/brandtbucher","@type":"Person","name":"brandtbucher"},"datePublished":"2022-11-09T20:07:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/99298/cpython/issues/99298"}
| 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:6b161722-54c6-15ec-7f0e-83ca80fa3c30 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD5C:24B668:22D2C2:2F6FDE:69696740 |
| html-safe-nonce | c8f95220de4e6067d13bcd92085ef9cd0c4c1144a286b7b29718cc452555883d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDVDOjI0QjY2ODoyMkQyQzI6MkY2RkRFOjY5Njk2NzQwIiwidmlzaXRvcl9pZCI6IjQ2Nzg2ODE2ODYwMzc4NDk5MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e5408412578b0673d73e393dd83cef965c9a7fc717795149523aa7f517de1fdd |
| hovercard-subject-tag | issue:1442681029 |
| 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/99298/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c4136ae7af433670e7c19f1201998e6ec14a14cd95424d378fe6570f23e3083/python/cpython/issues/99298 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c4136ae7af433670e7c19f1201998e6ec14a14cd95424d378fe6570f23e3083/python/cpython/issues/99298 |
| og:image:alt | In several places, we have goto error; branches in bytecode instructions that occur after modifying the next_instr pointer. This is incorrect, since the error branch will behave as if the error occ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandtbucher |
| 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 | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width