Skip to content

Calling _imp.is_lazy_imports_enabled in a thread hits an assert(0) #147

@devdanzin

Description

@devdanzin

It's possible to hit an assert(0) in PyImport_IsLazyImportsEnabled by calling _imp.is_lazy_imports_enabled in a thread:

from threading import Thread
import _imp

Thread(target=_imp.is_lazy_imports_enabled, args=()).start()

Abort message:

python: Python/import.c:4640: PyImport_IsLazyImportsEnabled: Assertion `0' failed.
Aborted

I'm not sure this is relevant, but since it's the only fuzzing hit that happened in Cinder but not CPython, thought it better to report.

python -VV:

Python 3.12.4+meta (heads/meta/3.12:55b50e149d4, Dec  3 2024, 21:56:02) [GCC 11.4.0]

Found using fusil by @vstinner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions