]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #65097 - tmiasko:arc, r=Amanieu
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 21 Mar 2020 04:33:13 +0000 (05:33 +0100)
committerGitHub <noreply@github.com>
Sat, 21 Mar 2020 04:33:13 +0000 (05:33 +0100)
Make std::sync::Arc compatible with ThreadSanitizer

The memory fences used previously in Arc implementation are not properly
understood by thread sanitizer as synchronization primitives. This had
unfortunate effect where running any non-trivial program compiled with
`-Z sanitizer=thread` would result in numerous false positives.

Replace acquire fences with acquire loads to address the issue.

Fixes #39608.


Trivial merge