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 — codeobject.c: co_tlbc NULL deref + replacement_locations leak · Issue #150546 · python/cpython

codeobject.c: co_tlbc NULL deref + replacement_locations leak #150546

New issue
Copy link
New issue
Copy link
Closed
Closed
codeobject.c: co_tlbc NULL deref + replacement_locations leak#150546
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@lpyu001
lpyu001
opened on May 28, 2026
Issue body actions

Bug report

Bug description:

Summary

1.code_dealloc (line 2550, Py_GIL_DISABLED only): co->co_tlbc->size accessed without NULL check when init_code fails on _PyCodeArray_New → segfault.
2._PyCode_New (line 741-743): replacement_locations not DECREF'd when init_code fails.

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

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

  • gh-150546:Fix cleanup for replacement_locations in _PyCode_New() #150549

Activity

  1. lpyu001
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 28, 2026
  2. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on May 29, 2026
  3. StanFromIreland
    added a parent issue on May 29, 2026
    • Umbrella issue: bugs found using cpython-review-toolkit #146102
  4. serhiy-storchaka
    added
    topic-free-threading
    on Jul 3, 2026
  5. kumaraditya303
    added a commit that references this issue on Jul 24, 2026

    gh-150546: Fix cleanup for replacement_locations in _PyCode_New() (#1…

    a096314
  6. kumaraditya303
    closed this as completedon Jul 24, 2026
  7. mbeijen
    added a commit that references this issue on Aug 14, 2026

    pythongh-150546: Fix cleanup for replacement_locations in _PyCode_New…

    291ab4d
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)topic-free-threadingtype-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.