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 — bltinmodule.c: lazy_import NULL deref without Python frame · Issue #151510 · python/cpython

bltinmodule.c: lazy_import NULL deref without Python frame #151510

New issue
Copy link
New issue
Copy link
Closed
Closed
bltinmodule.c: lazy_import NULL deref without Python frame#151510
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-lazy-importstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

Description

@aisk
aisk
opened on Jun 15, 2026
Issue body actions

Crash report

What happened?

Original gist: https://gist.github.com/devdanzin/cc84f43d7a5c774b47551060c061391f. A PR is on the way.

Summary

builtin___lazy_import___impl (line 321): When globals=NULL and PyEval_GetGlobals() returns NULL (no Python frame), PyDict_Check(globals) dereferences NULL → segfault. Reachable from embedded interpreters.

Fix

Add NULL check for globals after PyEval_GetGlobals().

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Output from running 'python -VV' on the command line:

No response

Linked PRs

  • gh-151510: Fix __lazy_import__ without frame #151511
  • [3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) #151610

Activity

  1. aisk
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
    topic-lazy-imports
    on Jun 15, 2026
  2. aisk
    added a parent issue on Jun 15, 2026
    • Umbrella issue: bugs found using cpython-review-toolkit #146102
  3. pablogsal
    added a commit that references this issue on Jun 17, 2026

    gh-151510: Fix __lazy_import__ without frame (#151511)

    eff805b
  4. pablogsal
    closed this as completedon Jun 17, 2026
  5. pablogsal
    added a commit that references this issue on Jun 17, 2026

    [3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610

    8fe5897
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-lazy-importstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

    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.