From 7d96e7d4ccebe8fd69082f4ada5ee1af436922ed Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sun, 12 Apr 2020 13:40:24 -0400 Subject: [PATCH] Track location for atomic new 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. --- src/rt/atomic.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rt/atomic.rs b/src/rt/atomic.rs index 0c60f798..cc3a97ca 100644 --- a/src/rt/atomic.rs +++ b/src/rt/atomic.rs @@ -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