Font Size: a A A

Research Of Thread-Summary-Based Datarace Static Analysis For C/C++

Posted on:2012-01-30Degree:MasterType:Thesis
Country:ChinaCandidate:X H YaoFull Text:PDF
GTID:2178330335460727Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Concurrent programs are notoriously difficult to write and debug, it's a problem that is becoming acute with the recent shift in hardware from uniprocessors to multi-core processors. A fundamental concurrency bug is a race:a condition in a shared-memory multithreaded program in which a pair of threads may access the same memory location without any ordering enforced between the accesses, and at least one of the accesses is a write. How to detect Data Race has always been a hot research field in computer science. Despite thirty years of research on data race detection, today's concurrent programs are still riddled with harmful racesThis paper presents an algorithm of static analysis Data Race for C/C++. We present four sufficient conditions on which a given pairs of two threads would be race-free and four statistic analyses algorithms, such as alias analysis, escape analysis, lock-set analysis and concurrent analysis for the four conditions. We implemented the Data Race Detection framework on the basis of DTS CPP framework. The Data Race Detection framework is based-on abstract interpretation theory. It uses thread summary to abstract the run-time behavior and characteristics of the threads. Every concurrent program would be transferred into a model constructed by some thread-serials after thread summary calculation. Then we use Cartesian-Product to get all the access-pairs that may happen in Data Race state based-on the model, and eliminate the access-pairs in safe state according to the four conditions to get the final ones which may happen in Data Race state.This paper detects some examples by the algorithm above and analyzes the experiment data at last. The experiment data shows that the algorithm is effective.
Keywords/Search Tags:static analysis, data race, function-summary, thread-summary
PDF Full Text Request
Related items