大规模源代码增量式资源泄漏检测方法
作者:
作者单位:

作者简介:

高志伟(1991-),男,山西阳泉人,硕士,CCF学生会员,主要研究领域为软件分析与可靠性;高玉金(1974-),男,博士,讲师,主要研究领域为并行程序设计,计算机体系结构;计卫星(1980-),男,博士,副教授,CCF专业会员,主要研究领域为计算机系统结构,并行计算与高性能计算,程序分析与优化;廖心怡(1993-),女,硕士,CCF学生会员,主要研究领域为高性能计算;石剑君(1991-),女,博士生,主要研究领域为软件分析与可靠性;罗辉(1991-),男,硕士生,CCF学生会员,主要研究领域为静态代码检测;王一拙(1979-),男,博士,讲师,CCF专业会员,主要研究领域为计算机系统结构,并行编程模型;石峰(1961-),男,博士,教授,博士生导师,主要研究领域为多核处理器体系结构,并行与分布式计算.

通讯作者:

计卫星,E-mail:jwx@bit.edu.cn

中图分类号:

基金项目:

国家自然科学基金(61300010);国家重点研发计划(2016YFB1000801)


Incremental Resource Leak Detection for Large Scale Source Code
Author:
Affiliation:

Fund Project:

National Natural Science Foundation of China (61300010); National Key Research and Development Program of China (2016YFB1000801)

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

    资源泄漏是影响软件质量和可靠性的一种重要软件缺陷,存在资源泄漏的程序长时间运行会由于资源耗尽而发生异常甚至崩溃.静态代码分析是进行资源泄漏检测的一种有效的技术手段,能够基于源代码或者二进制代码有效地发现程序中潜在的资源泄漏问题.然而,精确的资源泄漏检测算法的复杂性会随着程序规模的增加呈指数级增长,无法满足生产中即时对缺陷进行分析检测的实际应用需求.面向大规模源代码提出了一种增量式的静态资源泄漏检测方法,该方法支持过程间流敏感的资源泄漏检测,在用户编辑代码的过程中,从变更的函数入手,通过资源闭包、指向分析过滤等多种技术手段缩小资源泄漏检测范围,进而实现了大规模代码的即时缺陷分析与报告.实验结果表明:该方法在保证准确率的前提下,90%的增量检测实验可以在10s内完成,能够满足在用户编辑程序过程中对缺陷进行即时检测和报告的实际应用需求.

    Abstract:

    Resource leak is an important software defect that affects the quality and reliability of software and may cause program abnormality or even system crash.Static analysis is an effective defect detection method which can identify potential resource leaks in source code or executable binary.However,as the scale of programs increases,the complexity of accurate resource leak detection rises exponentially,thereby making it difficult to meet the demand of just-in-time defect detection for large practical applications.In this paper,an incremental static resource leak detection algorithm is proposed for large-scale source code projects.The algorithm supports inter-procedural flow sensitive resource leak detection that allows developers to observe the impact of their changes immediately.Starting from the modified functions,this approach narrows down the scope of resource leak detection by generating method closures and performing points-to analysis to analyze hundreds of thousands of lines of source code in seconds.Experimental results show that the algorithm completes defect detection within 10s with a high accuracy on more than 90% of the tests,which makes it possible for just-in-time resource leak detection for practical applications.

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

高志伟,计卫星,石剑君,王一拙,高玉金,廖心怡,罗辉,石峰.大规模源代码增量式资源泄漏检测方法.软件学报,2018,29(5):1244-1257

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

京公网安备 11040202500063号