X Tutup
Skip to content

SystemError on __classdict__/__conditional_annotations__ in class-scope inlined comprehensions #145701

@StanFromIreland

Description

@StanFromIreland

Bug report

Bug description:

Found by OSS Fuzz in #491105000.

>>> class i: [__classdict__ for x in y]
SystemError: _PyST_GetScope(name='__classdict__') failed: unknown scope in unit <module> (93973616364240); symbols: {'i': 4098}; locals: {}; globals: {}
>>> class i: [__conditional_annotations__ for x in y]
SystemError: _PyST_GetScope(name='__conditional_annotations__') failed: unknown scope in unit <module> (94200568314576); symbols: {'i': 4098}; locals: {}; globals: {}

We need to expand the fix for __class__ (fedbf77), I will open a PR shortly.

CPython versions tested on:

3.14, CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup