{"title":"使用堆对象流图(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":"{\"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}","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}
Memory leak detection using Heap Object Flow Graph (HOFG)
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.