Skip to content

Crash on _PyDict_CheckConsistency with an empty instance dict #121860

@pablogsal

Description

@pablogsal

When running a complicated application that involves Cython I am getting the following crash:

Objects/dictobject.c:716: _PyDict_CheckConsistency: Assertion failed: mp->ma_values->valid == 1 Enable tracemalloc to get the memory block allocation traceback object address : 0x21bbd30 object refcount : 1 object type : 0x9cb9e0 object type name: dict object repr : {} Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: finalizing (tstate=0x0000000000a522b8) Current thread 0x00007ffff7fe2740 (most recent call first): Garbage-collecting <no Python frame> Extension modules: xxx._ext, xxx._ext, xxx._tcp_impl (total: 3) Thread 1 "python" received signal SIGABRT, Aborted. 

I am trying to get a smaller reproducer that doesn't involve the entire world out of the application, but it may take me a while.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesrelease-blockertype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions