节点文献

高精度的大规模程序数据竞争检测方法

High-precision Data Race Detection Method for Large Scale Programs

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 高凤娟王豫周金果徐安孜王林章吴荣鑫张川苏振东

【Author】 GAO Feng-Juan;WANG Yu;ZHOU Jin-Guo;XU An-Zi;WANG Lin-Zhang;WU Rong-Xin;ZHANG Charles;SU Zhen-Dong;State Key Laboratory for Novel Software Technology(Nanjing University);ANT Group;School of Informatics, National Demonstrative Software School(Xiamen University);Department of Computer Science and Engineering, The Hongkong University of Science and Technology;Department of Computer Science(ETH Zurich);

【通讯作者】 王林章;

【机构】 计算机软件新技术国家重点实验室(南京大学)蚂蚁集团厦门大学信息学院Department of Computer Science and Engineering, The Hongkong University of Science and TechnologyDepartment of Computer Science(ETH Zurich)

【摘要】 随着技术的不断发展,软件系统的非确定性(uncertainty)不断增强,数据竞争是并发系统这一类典型的非确定性软件系统中常见的缺陷.尽管数据竞争静态检测近年来取得了巨大进展,但其面临的重要问题仍然存在.先前的静态技术要么以分析精度为代价达到高扩展性,要么由于高精度分析而导致可扩展性问题.提出一种解决上述矛盾的分段分析方法——GUARD.它首先基于程序值流进行轻量级上下文敏感的数据访问分析,以识别出候选的数据竞争子路径而非完整的程序路径.接下来,进行可能并行执行(may-happen-in-parallel,即MHP)分析来确定程序中的两个数据访问操作是否可能会同时执行.MHP分析基于线程流图(TFG)将线程信息进行编码以便于高效地查询各个子路径之间的并发关系.最后,对于每条存在MHP数据访问的子路径,进行重量级路径敏感分析以确定数据竞争路径的可行性.针对12个开源项目的实验评估显示,GUARD能够在1 870s内完成对130万行代码的工业规模项目的检测,且平均误报率为16.0%.此外,GUARD的分析速度更快,比现有的前沿技术平均快了6.08倍,并且显著降低了误报率.除此之外,GUARD在其中还发现了12个数据竞争漏洞.将它们全部报告给了开发者,其中8个已得到了确认.

【Abstract】 With the development of techniques, the uncertainty in software systems is continuously increasing. Data race is a typical bug in current programs, which is a classic type of uncertainty programs. Despite significant progress in recent years, the important problem of practical static race detection remains open. Previous static techniques either suffer from a high false positive rate due to the compromise of precision, or scalability issues caused by a highly precise analysis. This paper presents GUARD, a staged approach to resolve this paradox. First, it performs a lightweight context-sensitive data access analysis, based on the value flow of a program, to identify the candidate data race subpaths instead of the whole program paths. Second, may-happen-in-parallel(MHP) analysis is employedto identify whether two data accesses in a program may execute concurrently. This stage is scalable, due to the design of the thread flow graph(TFG), which encodes thread information to query MHP relationship of the subpaths. Finally, for each subpath whose two data accesses are MHP, the heavyweight path-sensitive analysis is appliedto verify the feasibility of the data races. The evaluation demonstrates that GUARD can finish checking industrial-sized projects, up to 1.3MLoC, in 1 870s with an average false positive rate of 16.0%. Moreover, GUARD is faster than the state-of-the-art techniques with the average speedup 6.08X and significantly fewer false positives. Besides, GUARD has found 12 new race bugs in real-world programs. All of them are reportedtothe developers and 8 of them have been confirmed.

【关键词】 数据竞争MHP分析静态分析
【Key words】 data raceMHP analysisstatic analysis
【基金】 国家自然科学基金(62032010)~~
  • 【文献出处】 软件学报 ,Journal of Software , 编辑部邮箱 ,2021年07期
  • 【分类号】TP311.5
  • 【下载频次】134
节点文献中: 

本文链接的文献网络图示:

本文的引文网络