GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented. · Issue #128685 · python/cpython

LOAD_CONST_IMMORTAL doesn't survive being instrumented and de-instrumented. #128685

New issue
Copy link
New issue
Copy link
Closed
Closed
LOAD_CONST_IMMORTAL doesn't survive being instrumented and de-instrumented.#128685
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@markshannon
markshannon
opened on Jan 9, 2025
Issue body actions

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 happen for LOAD_CONST_IMMORTAL because LOAD_CONST_IMMORTAL isn't a specialization form of LOAD_CONST, but a quickened form of it.

The 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.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • GH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONST_[IM]MORTAL #128708

Activity

  1. markshannon
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jan 9, 2025
  2. markshannon
    changed the title [-]`LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instruemented.[/-] [+]`LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented.[/+] on Jan 9, 2025
  3. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Jan 10, 2025
  4. markshannon
    added a commit that references this issue on Jan 13, 2025

    GH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONS…

    ddd9599
  5. brandtbucher
    closed this as completedon Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.