aisk · GitHub

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

Read the original on github.com ↗