We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45089bc commit dbde843Copy full SHA for dbde843
src/weak_memory.rs
@@ -182,10 +182,15 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
182
true
183
})
184
.filter(|&store_elem| {
185
- // Skip over all but the last SC store
186
- let include = !(store_elem.is_seqcst && found_sc);
187
- found_sc |= store_elem.is_seqcst;
188
- include
+ if is_seqcst {
+ // An SC load needs to ignore all but last store maked SC (stores not marked SC are not
+ // affected)
+ let include = !(store_elem.is_seqcst && found_sc);
189
+ found_sc |= store_elem.is_seqcst;
190
+ include
191
+ } else {
192
+ true
193
+ }
194
});
195
196
candidates.choose(rng)
0 commit comments