Memory leak detection using Heap Object Flow Graph (HOFG)

Haritha Madhav C, Unnikrishnan Cheramangalath
{"title":"Memory leak detection using Heap Object Flow Graph (HOFG)","authors":"Haritha Madhav C, Unnikrishnan Cheramangalath","doi":"10.1145/3578527.3578528","DOIUrl":null,"url":null,"abstract":"Unsafe programming languages like C/C++ lack efficient memory management module. A programmer is privileged to do explicit allocation and deallocation of heap memory blocks in C/C++ programming languages. Memory errors related to heap memory are difficult to capture using software testing in such programming languages. Program analysis can improve the reliability of software by identifying and repairing bugs related to dynamic memory management. An efficient static analyzer needs to look at the control flow graph of the whole program binary. Capturing context, path, and flow sensitivity is challenging using abstract interpretation and can lead to over approximated results. We propose Heap Object Flow Graph (HOFG), a program representation that eases program analysis to detect memory errors using static program analysis. An efficient program analysis on HOFG called HOFG-Analyser is defined, to capture memory leaks. We were able to detect memory leaks on different benchmarks written in C/C++ programming language with sizes up to 521K Lines of Code (LoC) with minimal false positive rates. Our experimental evaluation show that HOFG-Analyser is efficient and effective than an existing static analysis tool, INFER. In many cases, more number of leaks and less false positive rate is achieved by the HOFG-Analyser.","PeriodicalId":326318,"journal":{"name":"Proceedings of the 16th Innovations in Software Engineering Conference","volume":"38 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-02-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 16th Innovations in Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3578527.3578528","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Unsafe programming languages like C/C++ lack efficient memory management module. A programmer is privileged to do explicit allocation and deallocation of heap memory blocks in C/C++ programming languages. Memory errors related to heap memory are difficult to capture using software testing in such programming languages. Program analysis can improve the reliability of software by identifying and repairing bugs related to dynamic memory management. An efficient static analyzer needs to look at the control flow graph of the whole program binary. Capturing context, path, and flow sensitivity is challenging using abstract interpretation and can lead to over approximated results. We propose Heap Object Flow Graph (HOFG), a program representation that eases program analysis to detect memory errors using static program analysis. An efficient program analysis on HOFG called HOFG-Analyser is defined, to capture memory leaks. We were able to detect memory leaks on different benchmarks written in C/C++ programming language with sizes up to 521K Lines of Code (LoC) with minimal false positive rates. Our experimental evaluation show that HOFG-Analyser is efficient and effective than an existing static analysis tool, INFER. In many cases, more number of leaks and less false positive rate is achieved by the HOFG-Analyser.
使用堆对象流图(HOFG)进行内存泄漏检测
不安全的编程语言如C/ c++缺乏高效的内存管理模块。程序员有权在C/ c++编程语言中显式地分配和释放堆内存块。在这种编程语言中使用软件测试很难捕获与堆内存相关的内存错误。程序分析可以通过识别和修复与动态内存管理相关的错误来提高软件的可靠性。一个高效的静态分析器需要查看整个程序二进制的控制流图。使用抽象解释捕获上下文、路径和流敏感性是具有挑战性的,并且可能导致过度近似的结果。我们提出了堆对象流图(HOFG),这是一种简化程序分析的程序表示,可以使用静态程序分析来检测内存错误。定义了一个高效的HOFG程序分析,称为HOFG分析器,用于捕获内存泄漏。我们能够在用C/ c++编程语言编写的不同基准测试中检测内存泄漏,其大小可达521K代码行(LoC),并具有最小的误报率。我们的实验评估表明,HOFG-Analyser比现有的静态分析工具INFER更高效。在许多情况下,hhog分析仪可以实现更多的泄漏数量和更少的误报率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信