Closed spacejam closed 7 years ago
I've locally fixed this by finding this useful environment variable:
export TSAN_OPTIONS="suppressions=blacklist.txt"
where the contents of blacklist.txt follow the syntax as described https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
I believe the thing tsan is complaining about is a false positive (although I'm relatively new to reasoning about memory barriers, and I may be wrong), so I'm closing this.
evidence:
story:
basically, tsan doesn't see any relationship between the memory barriers in exhibits 2 & 3 and the dereferenced variable in
lazy_static
'sget()
in exhibit 1.Making sure that
get
uses proper memory barriers on the specific addresses calms its nerves.It would be nice if I could use
lazy_static
in multithreaded systems that I'm working on, and require passing tsan!