[PATCH] D56534: [Verifier] Add verification of unaligned atomic load/store
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 12:21:11 PST 2019
efriedma added a comment.
> The contract for the atomic library is that it _MUST_ do a lock-free operation on an object on which _any_ compiler in use on the system may have emitted a lock-free operation for.
That's not really relevant. The question is what happens if, one on thread, I perform a 4-byte operation at address p, and then on another thread, I perform a 4-byte atomic operation on address p+2.
> Can you cite this please?
The C standard bit follows from the strict aliasing rule (6.5p7). (Yes, it would be nice if it were stated a bit more explicitly in the actual description of atomics, but it's pretty clearly the intent; the description of modification orders for atomic objects doesn't make sense if they could overlap.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56534/new/
https://reviews.llvm.org/D56534
More information about the llvm-commits
mailing list