Skip to content

Conversation

tony-iqlusion
Copy link
Member

Per @RalfJung:

#214 (comment)

AFAIK atomic fences only really prevent reordering of atomic accesses.
Non-atomic accesses can still be reordered. The interaction of this
with volatile accesses is entirely unclear -- technically, they are
non-atomic, but in practice it seems unlikely that the compiler would
perform such reorderings.
[...]
A compiler fence seems like a reasonable precaution and also helps
make sure the side-effects happens near where the programmer might
expect it, but a CPU fence to me sounds more like cargo cult.

Per @RalfJung:

#214 (comment)

> AFAIK atomic fences only really prevent reordering of atomic accesses.
> Non-atomic accesses can still be reordered. The interaction of this
> with volatile accesses is entirely unclear -- technically, they are
> non-atomic, but in practice it seems unlikely that the compiler would
> perform such reorderings.
> [...]
> A compiler fence seems like a reasonable precaution and also helps
> make sure the side-effects happens near where the programmer might
> expect it, but a CPU fence to me sounds more like cargo cult.
@tony-iqlusion tony-iqlusion merged commit 7dc75e1 into develop Jun 4, 2019
@tony-iqlusion tony-iqlusion deleted the zeroize/remove-cpu-fences branch June 4, 2019 21:44
@tony-iqlusion tony-iqlusion mentioned this pull request Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant