Skip to content

_PyCode_VerifyStateless(): Assert Fails If a Name Is Both a Global And an Attr #135437

Closed

Description

@ericsnowcurrently

Crash report

Bug description:

For example, the following function will trigger the problem:

import pprint

def spam():
    pprint.pprint([])

Crash in test_code (on a debug build):

python: Objects/codeobject.c:1944: _PyCode_SetUnboundVarCounts: Assertion `unbound.total <= counts->unbound.total' failed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    type-crashA hard crash of the interpreter, possibly with a core dump
    3.14bugs and security fixes
    3.15bugs and security fixes
    on Jun 12, 2025
  2. added a commit that references this issue on Jun 13, 2025
  3. added a commit that references this issue on Jun 13, 2025
  4. added a commit that references this issue on Jun 13, 2025
  5. added a commit that references this issue on Jun 19, 2025
  6. added a commit that references this issue on Jul 12, 2025
  7. added a commit that references this issue on Aug 4, 2025
  8. added a commit that references this issue on Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.14bugs and security fixes3.15bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA 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