3 ms·
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 fals
by gpderetta 7y ago
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.
- chrisseaton 7y agoData races are. Race conditions are not.
- gpderetta 7y agoTrue.