Title: `LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented. · Issue #128685 · python/cpython · GitHub
Open Graph Title: `LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented. · Issue #128685 · python/cpython
X Title: `LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented. · Issue #128685 · python/cpython
Description: Bug report Bug description: When instrumenting, instructions are first de-optimized to their base instruction. When instrumentation is removed we assume that specialization will restore the specialized instruction. However, that doesn't ...
Open Graph Description: Bug report Bug description: When instrumenting, instructions are first de-optimized to their base instruction. When instrumentation is removed we assume that specialization will restore the special...
X Description: Bug report Bug description: When instrumenting, instructions are first de-optimized to their base instruction. When instrumentation is removed we assume that specialization will restore the special...
Opengraph URL: https://github.com/python/cpython/issues/128685
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented.","articleBody":"# Bug report\n\n### Bug description:\n\nWhen instrumenting, instructions are first de-optimized to their base instruction.\nWhen instrumentation is removed we assume that specialization will restore the specialized instruction.\nHowever, that doesn't happen for `LOAD_CONST_IMMORTAL` because `LOAD_CONST_IMMORTAL` isn't a specialization form of `LOAD_CONST`, but a quickened form of it.\n\nThe fix should be simple. Instead of quickening `LOAD_CONST` to `LOAD_CONST_IMMORTAL`, we add a `LOAD_CONST_MORTAL` and have `LOAD_CONST` specialize (rather than quicken) to either `LOAD_CONST_MORTAL` or `LOAD_CONST_IMMORTAL`.\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128708\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-01-09T18:23:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/128685/cpython/issues/128685"}
| 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:fa262aaa-b449-a041-c116-b4191f539c72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCA2:33585E:1CF7FA6:2A2B5E2:6A563BCE |
| html-safe-nonce | ce0694ed830a46625c0a5a214091ba5a23fab52764590dc8467050435e56c7a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0EyOjMzNTg1RToxQ0Y3RkE2OjJBMkI1RTI6NkE1NjNCQ0UiLCJ2aXNpdG9yX2lkIjoiNzgyMzM2NjI2NjY5ODQ4MDU5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 18134745e7c8fa50962774054f23129098a5cacac4c961476b4494156250aee7 |
| hovercard-subject-tag | issue:2778499091 |
| 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/128685/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ccca4025e7286c235da01e66fe28c64fb4207db1856dd2c65cf9249e29f3b0c/python/cpython/issues/128685 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ccca4025e7286c235da01e66fe28c64fb4207db1856dd2c65cf9249e29f3b0c/python/cpython/issues/128685 |
| og:image:alt | Bug report Bug description: When instrumenting, instructions are first de-optimized to their base instruction. When instrumentation is removed we assume that specialization will restore the special... |
| 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 | 96d96c6ad1e3234907759a5e634942d2ca0aded8a6ec1693a59d0f2c59c0dac9 |
| 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 | ec50befe6b611eee09bfe878347d87b8d5d2443f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width