Skip to content

[3.13] gh-132869: Fix crash in _PyObject_TryGetInstanceAttribute #133700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.13
Choose a base branch
from

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment