Abstract

Data races, i.e. the uncoordinated read/write access of threads to a shared variable resulting in unexpected program behaviour, in parallel shared memory programs occur highly dependent on the timing and scheduling of threads during execution. This makes data races hard to detect manually and automatically. Corresponding tools typically suspect too many code locations to cause data races and miss critical ones as the observed execution and timing did not raise them. We present methods and a tool chain for C/C++ codes with POSIX threads to detect data races and verify their harmfulness. We use automatic instrumentation and repeated test-case execution using a user-space thread scheduler overriding the kernel-space scheduler to intentionally generate specific thread interleavings. As the thread scheduling becomes deterministic and independent from the system in use, targeted testing of thread schedules can reveal and verify otherwise hard to find data races. For each data race we classify its harmfulness based on well-defined attributes and can in most cases identify and report its root cause, i.e. the data race which, when fixed, protects the program from crashing. This and a low false positive rate in the reports greatly reduces the overhead in fixing data races for developers.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.