News for hackers. Stuff that matters.
Re:When you see a Heisenbug in C, change your compiler's opt... by johnbender on Saturday March 01, 2014 @07:20PM (#7326957)
Isn't it often the case that the optimizations throw out sequential consistency guarantees?

That would introduce non-determinism in concurrent executions that might have nothing to do with the semantics of the program.

For example, I'm under the impression that the most recent C++ standard basically says "if you have no data races then all will be well" even though they may be benign data races like dual assignments of the same value.

Re:When you see a Heisenbug in C, change your compiler's opt... by Dylan16807 on Saturday March 01, 2014 @11:31PM (#7327706)
C doesn't have any sequential consistency. Even without any compiler optimizations, the hardware will reorder things across cores. Subtly on x86, massively on Alpha. You can't use multiprocessing without some kind of external guarantees.