Skip to content

Commit

Permalink
Track location for atomic new
Browse files Browse the repository at this point in the history
This doesn't _really_ add any information, since the mut location is the
same as the "crated" location. However, when presented with an error
with no `mut` location, the user may erroneously believe that there's
some mutation they haven't been told about, when the race is really
on the construction of the item.
  • Loading branch information
jonhoo committed Apr 12, 2020
1 parent adc8fab commit 7d96e7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rt/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ impl State {
};

// All subsequent accesses must happen-after.
state.unsync_mut_locations.track(location, &threads);
state.track_unsync_mut(threads);

// Store the initial thread
Expand Down

0 comments on commit 7d96e7d

Please sign in to comment.