Skip to content

Commit 75d9a53

Browse files
committed
Fix race in specialize_dict_access_inline().
Use provided value of `tp_version` to store in cache.
1 parent 6fb6e4a commit 75d9a53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/specialize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ specialize_dict_access_inline(
981981
return 0;
982982
}
983983
cache->index = (uint16_t)offset;
984-
write_u32(cache->version, type->tp_version_tag);
984+
write_u32(cache->version, tp_version);
985985
specialize(instr, values_op);
986986
return 1;
987987
}

0 commit comments

Comments
 (0)