DeAI Research
Source ·

ThreadSanitizer

2009Konstantin Serebryany; Timur Iskhodzhanov

cid 7c152b92720e2573d585820d7144d8b89935b9259090a4fe9d4543324261af1e · original · via openalex

Title: ThreadSanitizer
Authors: Konstantin Serebryany; Timur Iskhodzhanov
Venue: 
Year: 2009
Canonical: doi:10.1145/1791194.1791203
URL: https://doi.org/10.1145/1791194.1791203
Collector: openalex
OA: false

ABSTRACT
Data races are a particularly unpleasant kind of threading bugs. They are hard to find and reproduce -- you may not observe a bug during the entire testing cycle and will only see it in production as rare unexplainable failures. This paper presents ThreadSanitizer -- a dynamic detector of data races. We describe the hybrid algorithm (based on happens-before and locksets) used in the detector. We introduce what we call dynamic annotations -- a sort of race detection API that allows a user to inform the detector about any tricky synchronization in the user program. Various practical aspects of using ThreadSanitizer for testing multithreaded C++ code at Google are also discussed.