A Static Analysis for Automatic Detection of Atomicity Violations in Java Programs

msra(2010)

引用 23|浏览22
暂无评分
摘要
Multithreaded programs can have subtle errors that result from un- desired interleavings of concurrent threads. A common technique to prevent these errors is to ensure that certain blocks of code are atomic. A block of code is atomic if every execution is equivalent to a serial execution in which no other thread's instructions are in- terleaved with the code. Atomic blocks of code are amenable to sequential reasoning and therefore significantly simpler to analyze and verify. This paper presents a system for automatically detecting atom- icity violations without requiring any specifications. This requires inferring which blocks of code must be atomic as well as detect- ing atomicity violations. The paper first describes a synchronization pattern in programs that is likely to indicate a violation of atomicity. The paper then presents a static analysis for detecting occurrences of this pattern. We tested our system on about half a million lines of popu- lar open source programs, and categorized the resulting atomicity warnings. Our experience demonstrates that our system is effective at detecting problems, including several previously unknown atom- icity errors. Additionally, our system detects needless synchroniza- tion and stylistic problems.
更多
查看译文
关键词
s,static analysis
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要