Dynamic race detection for C++11
File(s)paper.pdf (544.93 KB)
Accepted version
Author(s)
Lidbury, C
Donaldson, AF
Type
Conference Paper
Abstract
The intricate rules for memory ordering and synchronisation associated with the C/C++11 memory model mean that data races can be difficult to eliminate from concurrent programs. Dynamic data race analysis can pinpoint races in large and complex applications, but the state-of-the-art ThreadSanitizer (tsan) tool for C/C++ considers only sequentially consistent program executions, and does not correctly model synchronisation between C/C++11 atomic operations. We present a scalable dynamic data race analysis for C/C++11 that correctly captures C/C++11 synchronisation, and uses instrumentation to support exploration of a class of non sequentially consistent executions. We concisely define the memory model fragment captured by our instrumentation via a restricted axiomatic semantics, and show that the axiomatic semantics permits exactly those executions explored by our instrumentation. We have implemented our analysis in tsan, and evaluate its effectiveness on benchmark programs, enabling a comparison with the CDSChecker tool, and on two large and highly concurrent applications: the Firefox and Chromium web browsers. Our results show that our method can detect races that are beyond the scope of the original tsan tool, and that the overhead associated with applying our enhanced instrumentation to large applications is tolerable.
Date Issued
2017-01-01
Date Acceptance
2016-10-03
Citation
POPL 2017: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming, 2017
ISBN
9781450346603
Publisher
ACM
Journal / Book Title
POPL 2017: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming
Copyright Statement
© 2017 ACM. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in POPL 2017: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming, (Jan 2017), https://dl.acm.org/doi/10.1145/3009837.3009857
Source
ACM SIGPLAN Symposium on Principles of Programming Languages
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
data races
concurrency
C++11
memory models
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
data races
concurrency
C++11
memory models
PROGRAMS
Software Engineering
Publication Status
Published
Start Date
2017-01-15
Finish Date
2017-01-21
Coverage Spatial
Paris