SIGN IN SIGN UP

[3.14] gh-144295: Fix data race in dict method lookup and global load (gh-144312) (#144346)

In `_Py_dict_lookup_threadsafe_stackref`, call `ensure_shared_on_read()` to
prevent a race between the lookup and concurrent dict resizes, which may free
the PyDictKeysObject (i.e., it ensures that the resize uses QSBR).

(cherry picked from commit e666a01ef42939f77f4c22ca47a610df5ef8b7ab)
S
Sam Gross committed
06f9c8ca1cb9abe92507108a299a65ee868d07e3
Parent: 49ce23f
Committed by GitHub <noreply@github.com> on 1/30/2026, 5:15:47 PM