Re:Data races in Python, despite the Global Interpreter Lock
by oefrha on Tuesday February 22, 2022 @02:12AM
(#30424874)
Iām not sure if you can read a corrupted value from a word-sized (or smaller) int with a modern C compiler, but Python int is arbitrary precision. You can easily corrupt a gmp int with concurrent read & write.
I'd be interested to see a concrete example of how it could actually happen on a real currently-deployed system. (I'm not saying people should normally write such code, but things do need to ground out in a concrete machine model at some point, even if it's just for the sake of implementing higher level language semantics.)
(Edit: replied to you with similar comment in sibling thread...)