News for hackers. Stuff that matters.
Re:Data races in Python, despite the Global Interpreter Lock by hedora on Monday February 21, 2022 @10:05PM (#30423594)
I don't think that program can cause the value to decrease below its initial value with any current C compiler on any modern architecture. (Ignoring overflow, and also cases where the integer is misaligned. Misaligned accesses are a bus error on some architectures, so it's so far into undefined behavior that the race isn't very interesting in my book.)

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...)

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.
Re:Data races in Python, despite the Global Interpreter Lock by shaklee3 on Tuesday February 22, 2022 @01:13AM (#30424548)
what about alpha?