Re:Google Is Uncovering Hundreds of Race Conditions Within t...
by gpderetta on Thursday October 03, 2019 @12:17PM
(#21148678)
by definition data races in C and C++ are UB. Even if you believe that the compiler cannot not possibly miscompile your code [1], a large quantity of these false positives will make data race detection tools (like the one used by G) less useful. Just mark your shared memory locations as atomic, you can always use relaxed ordering and non-atomic RMW operations if you worry about the cost of the extra synchronization.
[1] these sort of assumptions of course tend not to age well.
[1] these sort of assumptions of course tend not to age well.