Skip to content

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

Merged
methane merged 1 commit into
python:3.13from
colesbury:gh-132869-3.13
May 14, 2025
Merged

[3.13] gh-132869: Fix crash in _PyObject_TryGetInstanceAttribute#133700
methane merged 1 commit into
python:3.13from
colesbury:gh-132869-3.13

Conversation

@colesbury

@colesbury colesbury commented May 8, 2025

Copy link
Copy Markdown
Contributor

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)
Comment thread Objects/dictobject.c
#endif

static Py_ssize_t
unicodekeys_lookup_split(PyDictKeysObject* dk, PyObject *key, Py_hash_t hash)

Copy link
Copy Markdown
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

hawkinsp commented May 8, 2025

Copy link
Copy Markdown
Contributor

Thanks @colesbury !

@hawkinsp

Copy link
Copy Markdown
Contributor

Looks like this still needs merging?

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