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 — instrumentation.c: Use-after-Py_DECREF comparison in call_one_instrument · Issue #151524 · python/cpython

instrumentation.c: Use-after-Py_DECREF comparison in call_one_instrument #151524

New issue
Copy link
New issue
Copy link
Closed
Closed
instrumentation.c: Use-after-Py_DECREF comparison in call_one_instrument#151524
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

@lpyu001
lpyu001
opened on Jun 16, 2026
Issue body actions

Bug report

Bug description:

Summary

At line 992-993, Py_DECREF(res) then res compared to &_PyInstrumentation_DISABLE. Using a potentially-freed pointer in comparison is UB per C standard.

This is a sub-issue of #146102 with gist details

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-151524: Avoid using instrumentation callback result after Py_DECREF #151525
  • [3.14] gh-151524: Make it clearer that _PyInstrumentation_DISABLE is immortal in the code (GH-151525) #155349
  • [3.15] gh-151524: Make it clearer that _PyInstrumentation_DISABLE is immortal in the code (GH-151525) #155350
  • [3.13] gh-151524: Make it clearer that _PyInstrumentation_DISABLE is immortal in the code (GH-151525) #155351

Activity

  1. lpyu001
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 16, 2026
  2. lpyu001
    added a commit that references this issue on Jun 16, 2026

    pythongh-151524: Avoid using instrumentation callback result after Py…

    a4cc0af
  3. StanFromIreland
    added a parent issue on Jun 16, 2026
    • Umbrella issue: bugs found using cpython-review-toolkit #146102
  4. StanFromIreland
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Jun 16, 2026
  5. ZeroIntensity
    added a commit that references this issue on Aug 7, 2026

    gh-151524: Make it clearer that `_PyInstrumentation_DISABLE` is immor…

    52bed26
  6. ZeroIntensity
    closed this as completedon Aug 7, 2026
  7. ZeroIntensity
    added 2 commits that reference this issue on Aug 7, 2026

    [3.13] gh-151524: Make it clearer that `_PyInstrumentation_DISABLE` i…

    2e19855

    [3.14] gh-151524: Make it clearer that `_PyInstrumentation_DISABLE` i…

    87bacf1
  8. hugovk
    added a commit that references this issue on Aug 8, 2026

    [3.15] gh-151524: Make it clearer that `_PyInstrumentation_DISABLE` i…

    a8a3b24
  9. mbeijen
    added a commit that references this issue on Aug 14, 2026

    pythongh-151524: Make it clearer that `_PyInstrumentation_DISABLE` is…

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