Skip to content

Commit d6ea4f1

Browse files
committed
Fix race in specialize_dict_access_inline().
Use provided value of `tp_version` to store in cache.
1 parent 047dc87 commit d6ea4f1

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
@@ -969,7 +969,7 @@ specialize_dict_access_inline(
969969
return 0;
970970
}
971971
cache->index = (uint16_t)offset;
972-
write_u32(cache->version, type->tp_version_tag);
972+
write_u32(cache->version, tp_version);
973973
specialize(instr, values_op);
974974
return 1;
975975
}

0 commit comments

Comments
 (0)