期刊文献+

Fortran内存泄漏静态检测方法研究

Research on Static Detection Method of Fortran Memory Leak
下载PDF
导出
摘要 内存泄漏在没有垃圾回收机制的语言中是常见的问题,虽然Fortran95引入ALLOCATABLE数组解决了部分泄漏问题,但是通过指针申请内存资源仍然会造成泄漏,现有研究对Fortran内存泄漏的检测流程适配度不高且面向Fortran内存状态分析的效率和精确度上仍存在优化空间.针对这一问题,本文提出了一种面向Fortran指针引发的内存泄漏静态检测方法.首先引入指针引用控制流图(PR-CFG,Pointer Reference-Control Flow Graph)来精简程序模型,并符号化程序节点的内存状态信息,依据数据流生成路径敏感的符号化函数摘要作用于过程间分析,最终通过PR-CFG节点上由抽象内存状态计算得到的内存状态集进行故障模式状态机的状态转化来实现内存泄漏的检测.实验表明,本方法提高了Fortran指针引发内存泄漏的检测精度和效率,降低了检测的误报率. Memory leak is a common problem in languages without garbage collection mechanisms.Although Fortran95 introduced ALLOCATABLE arrays to solve some of the leaks,applying for memory resources through pointers will still cause leaks.Existing research is not well adapted to the detection process of Fortran memory leaks,and there is still room for optimization in terms of efficiency and accuracy of Fortran memory state analysis.To solve this problem,this paper proposes a static detection method for memory leaks caused by pointers in Fortran programs.Firstly,the Pointer Reference-Control Flow Graph(PR-CFG)is introduced to simplify the program model,and symbolize the memory state information of program nodes,and generate a path-sensitive symbolic function summary based on the data flow for inter-procedural analysis,and performs the state transition of the fault mode state machine according to the memory state set obtained by the abstract memory state calculation on the node of the PR-CFG graph to realize the detection of memory leaks.Experiments show that this method improves the detection accuracy and efficiency of memory leaks caused by Fortran pointers,and reduces the false positive rate of detection.
作者 罗坤 金大海 宫云战 LUO Kun;JIN Dahai;GONG Yunzhan(State Key Laboratory of Networking and Switching Technology,Beijing University of Posts and Telecommunication,Beijing 100876,China)
出处 《小型微型计算机系统》 CSCD 北大核心 2024年第7期1778-1786,共9页 Journal of Chinese Computer Systems
基金 国家自然科学基金项目(U1736110)资助.
关键词 Fortran指针 内存泄漏检测 PR-CFG 符号化函数摘要 抽象内存状态计算 fortran pointer memory leak detection PR-CFG symbolic function summary abstract memory state calculation
  • 相关文献

参考文献3

二级参考文献11

  • 1Ball T, Bounimova E, Cook B, et al. Thorough static analysis of device drivers [ C ]//2006 EuroSys Conference. New York: Association for Computing Machinery, 2006 : 73-85.
  • 2Yang Junfeng, Sar Can, Engler Dawson. Explode: a lightweight, general system for finding serious storage system errors[C]//Tth USENIX Symposium on Operating Systems Design and Implementation. [ S. l. ]: USENIX ASSOC, 2006: 131-146.
  • 3Engler D, Chelf B, Chou A, et al. Checking system rules using system-specific, programmer-written compiler extensions [C]//Proceedings of the 4th Conference on Symposium on Operating System Design & Implementation. [S.l. ] : USENIX Association, 2000: 1-16.
  • 4Ashcraft K, Engler D. Using programmer-written compiler extensions to catch security holes[C]//2002 Symposium on Security and Privacy. [S. l. ] : Institute of Electrical and Electronics Engineers Inc, 2002: 143-159.
  • 5Hovemeyer D, Pugh W. Finding bugs is easy[J]. ACM SIGPLAN Notices, 2004, 39(12) : 92-106.
  • 6Hovemeyer D, Pugh W. Finding more null pointer hugs, but not too many[C]//Proceedings of the 7th ACM SIGPLAN-SlGSOFT Workshop on Program Analysis for Software Tools and Engineering. New York: ACM Press, 2007: 9-14.
  • 7Klocwork Inc. Klocwork trail version [ EB/OL]. [ S. l. ] : Klocwork Inc. 2008. http://www, kiocwork, com/freetrial.
  • 8李梦君,李舟军,陈火旺.基于抽象解释理论的程序验证技术[J].软件学报,2008,19(1):17-26. 被引量:30
  • 9杨朝红,宫云战,肖庆,王雅文.基于缺陷模式的软件测试中的区间运算应用[J].计算机辅助设计与图形学学报,2008,20(12):1630-1635. 被引量:14
  • 10王雅文,宫云战,肖庆,杨朝红.基于抽象解释的变量值范围分析及应用[J].电子学报,2011,39(2):296-303. 被引量:16

共引文献48

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部