Title: Micro-ops that have side-exits are sometimes marked as "escaping", when they should not be. · Issue #137276 · python/cpython · GitHub
Open Graph Title: Micro-ops that have side-exits are sometimes marked as "escaping", when they should not be. · Issue #137276 · python/cpython
X Title: Micro-ops that have side-exits are sometimes marked as "escaping", when they should not be. · Issue #137276 · python/cpython
Description: We tag micro-ops as "escaping", using HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world. However, if that call only happens on an exit branch, then there is no escape if execution stays on trace....
Open Graph Description: We tag micro-ops as "escaping", using HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world. However, if that call only happens on an exit branch, then there i...
X Description: We tag micro-ops as "escaping", using HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world. However, if that call only happens on an exit branch, th...
Opengraph URL: https://github.com/python/cpython/issues/137276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Micro-ops that have side-exits are sometimes marked as \"escaping\", when they should not be.","articleBody":"We tag micro-ops as \"escaping\", using `HAS_ESCAPES_FLAG`, when they call out to a function that might change the state of the world.\n\nHowever, if that call only happens on an exit branch, then there is no escape if execution stays on trace.\nIn those cases we should not mark the micro-op as escaping.\n\nFor example: `_GUARD_IS_NONE_POP` is defined as follows:\n```C\n int is_none = PyStackRef_IsNone(val);\n if (!is_none) {\n PyStackRef_CLOSE(val);\n SYNC_SP();\n EXIT_IF(1);\n }\n DEAD(val);\n```\nThe call to `PyStackRef_CLOSE` only occurs on the exit branch. So, if execution continues past `_GUARD_IS_NONE_POP` then no escaping call has been made. Therefore we shouldn't mark `_GUARD_IS_NONE_POP` as escaping.\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-137277\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-07-31T11:38:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/137276/cpython/issues/137276"}
| 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:2ff1463e-fe80-0895-f95d-279f15af9572 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A25C:196973:C21709:103532E:6A5570B9 |
| html-safe-nonce | 1b7b1f7f510bda8d985fefa467abe32778f71b6c5d7540cf050c405978f47062 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjVDOjE5Njk3MzpDMjE3MDk6MTAzNTMyRTo2QTU1NzBCOSIsInZpc2l0b3JfaWQiOiI1MTAwMDk4NzI3NDcxMDUwOTM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 31076f9161a12b1bbcb2a9ac0414f137dbcd6717058869c2d98a3a13aab6489a |
| hovercard-subject-tag | issue:3280134344 |
| 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/137276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4da5e3cf2a742f48615342116ec328de1e351b1aa6ba4896c80fa2599844c96/python/cpython/issues/137276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4da5e3cf2a742f48615342116ec328de1e351b1aa6ba4896c80fa2599844c96/python/cpython/issues/137276 |
| og:image:alt | We tag micro-ops as "escaping", using HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world. However, if that call only happens on an exit branch, then there i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markshannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | a90bd2a4a25feb75544d06b89350dcf95d9c46e0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width