HomePhabricator

sanitizer_common: add thread safety annotations

Authored by dvyukov on Jul 9 2021, 10:29 AM.

Description

sanitizer_common: add thread safety annotations

Enable clang Thread Safety Analysis for sanitizers:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

Thread Safety Analysis can detect inconsistent locking,
deadlocks and data races. Without GUARDED_BY annotations
it has limited value. But this does all the heavy lifting
to enable analysis and allows to add GUARDED_BY incrementally.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D105716

Details

Committed
dvyukovJul 12 2021, 2:46 AM
Reviewer
melver
Differential Revision
D105716: sanitizer_common: add thread safety annotations
Parents
rG41ba96f53127: sanitizer_common: rename Mutex to MutexState
Branches
Unknown
Tags
Unknown