Google’s Chromium team has redesigned the ThreadSanitizer runtime data race detector, which identifies threading errors, to better report data races in C++ and Go, as well as synchronization issues.
Google Chromium team software engineer Alexander Potapenko announced ThreadSanitizer v2 in a blog post detailing the tool’s new features such as reporting issues with deadlocks, unjoined threads, destroying locked mutexes, and using of asynchronous-signal-unsafe code in signal handlers. The new version also recognizes atomic operations and has the ability to find bugs in lock-free algorithms, improving bug reproducibility.
“In 2010, we started experimenting with compiler-based instrumentation instead of binary translation, and once the approach had proven itself, our team redesigned ThreadSanitizer from scratch, focusing on compile-time instrumentation for greater speed and accuracy,” Potapenko wrote.
The original ThreadSanitizer tool (TSan), based on binary translation, was developed in 2009 and has been used to detect nearly 180 bugs in Google’s Chromium open-source browser. Potapenko claimed that TSan v2 has detected close to 100 bugs in the past six months.
ThreadSanitizer is available on Google Code.