mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
[3.14] gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613) (#135739)
gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613) Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
This commit is contained in:
parent
203753b4bb
commit
60fc42c169
5 changed files with 48 additions and 2 deletions
|
@ -103,6 +103,10 @@ convert_global_to_const(_PyUOpInstruction *inst, PyObject *obj, bool pop)
|
|||
if ((int)index >= dict->ma_keys->dk_nentries) {
|
||||
return NULL;
|
||||
}
|
||||
PyDictKeysObject *keys = dict->ma_keys;
|
||||
if (keys->dk_version != inst->operand0) {
|
||||
return NULL;
|
||||
}
|
||||
PyObject *res = entries[index].me_value;
|
||||
if (res == NULL) {
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue