Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented May 8, 2025

This fixes a crash in _PyObject_TryGetInstanceAttribute due to the use of _PyDictKeys_StringLookup on an unlocked dictionary that may be concurrently modified.

The underlying bug was already fixed in 3.14 and the main branch.

(partially cherry picked from commit 1b15c89)

This fixes a crash in `_PyObject_TryGetInstanceAttribute` due to the use
of `_PyDictKeys_StringLookup` on an unlocked dictionary that may be
concurrently modified.

The underlying bug was already fixed in 3.14 and the main branch.

(partially cherry picked from commit 1b15c89)
#endif

static Py_ssize_t
unicodekeys_lookup_split(PyDictKeysObject* dk, PyObject *key, Py_hash_t hash)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the dictobject.c changes are taken verbatim from main

@hawkinsp
Copy link
Contributor

hawkinsp commented May 8, 2025

Thanks @colesbury !

@hawkinsp
Copy link
Contributor

Looks like this still needs merging?

@methane methane merged commit e1cc789 into python:3.13 May 14, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants