高精度的大规模程序数据竞争检测方法
作者:
作者单位:

作者简介:

高凤娟(1991-),女,学士,主要研究领域为软件工程,程序语言,软件安全.
王林章(1973-),男,博士,教授,博士生导师,CCF杰出会员,主要研究领域为软件工程,软件安全.
王豫(1991-),男,学士,主要研究领域为软件工程,程序语言,软件安全.
吴荣鑫(1987-),男,博士,CCF专业会员,主要研究领域为软件工程.
周金果(1988-),男,博士,主要研究领域为软件工程,静态分析.
张川(1974-),男,博士,主要研究领域为程序分析,质量保障.
徐安孜(1997-),男,学士,CCF学生会员,主要研究领域为软件工程,软件安全.
苏振东(1970-),男,博士,博士生导师,主要研究领域为程序语言,程序分析.

通讯作者:

王林章,E-mail:lzwang@nju.edu.cn

中图分类号:

基金项目:

国家自然科学基金(62032010)


High-precision Data Race Detection Method for Large Scale Programs
Author:
Affiliation:

Fund Project:

National Natural Science Foundation of China (62032010)

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    随着技术的不断发展,软件系统的非确定性(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.

    参考文献
    相似文献
    引证文献
引用本文

高凤娟,王豫,周金果,徐安孜,王林章,吴荣鑫,张川,苏振东.高精度的大规模程序数据竞争检测方法.软件学报,2021,32(7):2039-2055

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2020-09-05
  • 最后修改日期:2020-10-26
  • 录用日期:
  • 在线发布日期: 2021-01-22
  • 出版日期: 2021-07-06
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号