Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strengthen reference stores to give release/consume semantics #45484

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented May 27, 2022

Followup to #36507; see the discussion there.

Also slightly weakens non-atomic pointer modification, since we
generally don't need DRF swap guarantees at all (even monotonic), only
the atomic-release property. This would correspond to atomic-unordered
failure order in many cases, but the LLVM LangRef says that this case is
"uninteresting", and thus declares it is invalid.

n.b. this still does not cover embedded references inside inlined structs

Followup to #36507; see the discussion there.

Also slightly weakens non-atomic pointer modification, since we
generally don't need DRF swap guarantees at all (even monotonic), only
the atomic-release property. This would correspond to atomic-unordered
failure order in many cases, but the LLVM LangRef says that this case is
"uninteresting", and thus declares it is invalid.

n.b. this still does not cover embedded references inside inlined structs
@vtjnash vtjnash requested a review from tkf May 27, 2022 17:38
@vtjnash vtjnash merged commit 46135df into master Jun 9, 2022
@vtjnash vtjnash deleted the jn/release-refs branch June 9, 2022 20:03
@vtjnash vtjnash added the multithreading Base.Threads and related functionality label Jun 9, 2022
vtjnash added a commit that referenced this pull request Nov 29, 2022
In looking at a TSAN report recently, I noticed that globals were
getting stored as atomic-unordered (since c92ab5e #44182), instead
of atomic-release as intended (since
46135df #45484).
vtjnash added a commit that referenced this pull request Nov 29, 2022
In looking at a TSAN report recently, I noticed that globals were
getting stored as atomic-unordered (since c92ab5e #44182), instead
of atomic-release as intended (since
46135df #45484).
vtjnash added a commit that referenced this pull request Nov 30, 2022
In looking at a TSAN report recently, I noticed that globals were
getting stored as atomic-unordered (since c92ab5e #44182), instead
of atomic-release as intended (since
46135df #45484).
KristofferC pushed a commit that referenced this pull request Dec 8, 2022
In looking at a TSAN report recently, I noticed that globals were
getting stored as atomic-unordered (since c92ab5e #44182), instead
of atomic-release as intended (since
46135df #45484).

(cherry picked from commit f4534d1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant