cpp2w: exclude NORETURN from tecotsb target endpoint#9
Closed
lukeg101 wants to merge 1 commit into
Closed
Conversation
Models the non-returning atomic reduction atomic_store_add_explicit from P3111R0 (Atomic Reduction Operations): https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3111r0.html A non-returning RMW (tagged NORETURN) should not anchor the tecotsb ordering edge the way a value-returning RMW does. Excluding NORETURN from the target [A] endpoint lets a release store_add not establish message-passing synchronization, so the stale-read outcome {r0=0, y=2} becomes observable. Adds tests/mp/mp-store-add.litmus and mp-fetch-add.litmus: under the patched cpp2w, store_add -> 4 states (incl. {r0=0,y=2}); fetch_add -> 3 states (forbids it). The other models (cpp11, cpp17, rc11, rc17) already support store_add (same 4-state weak behaviour); they have no tecotsb relation, so a non-returning RMW never over-synchronizes there. cpp2w was the sole outlier. herd7 does not support store_add (its CSem is a stub), so no .litmus.expected can be generated; reproduced/validated with dartagnan (Dat3M exploration_mode branch, commit b360545), see hernanponcedeleon/Dat3M#984. Co-authored-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Author
|
Discussed with Simon and Gonzalo, cpp2w is already too strong, cpp17 correctly models store_add using Dartagnan already. so I will close this PR, add the tests from this PR to PR #8, and use cpp17 for testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Models the non-returning atomic reduction atomic_store_add_explicit from P3111R0 (Atomic Reduction Operations):
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3111r0.html
A non-returning RMW (tagged NORETURN) should not anchor the tecotsb ordering edge the way a value-returning RMW does. Excluding NORETURN from the target [A] endpoint lets a release store_add not establish message-passing synchronization, so the stale-read outcome {r0=0, y=2} becomes observable.
Adds tests/mp/mp-store-add.litmus and mp-fetch-add.litmus: under the patched cpp2w, store_add -> 4 states (incl. {r0=0,y=2}); fetch_add -> 3 states (forbids it).
The other models (cpp11, cpp17, rc11, rc17) already support store_add (same 4-state weak behaviour); they have no tecotsb relation, so a non-returning RMW never over-synchronizes there. cpp2w was the sole outlier.
herd7 does not support store_add (its CSem is a stub), so no .litmus.expected can be generated; reproduced/validated with dartagnan (Dat3M exploration_mode branch, commit b360545), see
hernanponcedeleon/Dat3M#984.