[PATCH] D56534: [Verifier] Add verification of unaligned atomic load/store
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 12:37:15 PST 2019
jyknight added a comment.
In D56534#1362115 <https://reviews.llvm.org/D56534#1362115>, @efriedma wrote:
> > 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.
OK. Certainly no guarantees can be made in such a case.
But, relatedly -- and more subtly -- I also expect there'll be no guarantee of correct behavior if you mix 2-byte and 4-byte naturally-aligned accesses to some address p.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56534/new/
https://reviews.llvm.org/D56534
More information about the llvm-commits
mailing list