Computer Science ›› 2019, Vol. 46 ›› Issue (11A): 517-523.

• Interdiscipline & Application • Previous Articles     Next Articles

Source Code Memory Leak Static Detection Based on Complex Control Flow

JI Xiu-juan1, SUN Xiao-hui2, XU Jing3   

  1. (Binhai College,Nankai University,Tainjin 300270,China)1;
    (Jingdong Digital Technology,Beijing 100176,China)2;
    (College of Artificial Intelligence,Nankai University,Tianjin 300350,China)3
  • Online:2019-11-10 Published:2019-11-20

Abstract: C/C++ source code has a lot of memory leaks because of its manual allocation of heap memory space.Regarding complex control flow with multiple branches in the control flow graph,it is more difficult to detect memory leaks because of the uncertainty of memory allocating and releasing.A memory leak classification method was defined based on path abstraction in complex control flow.A projection-based model detection based on the analysis algorithm was proposed,where the original control flow graph is projected,thus simplifying and regulating the control flow graph.Meanwhile,in the inter-procedural analysis,by combining Cloning Expands the ICFG approach and Expanded Super-graph approach,a Inter-procedural Memory def-use Control Flow Graph(IMCFG) was built.At last,this algorithm is proved to be effective and precise by experiments.

Key words: C/C++, Complex control flow, Memory leak, Projection, Static detection

CLC Number: 

  • TP311
[1]United States Computer Emergency Readiness Team(US-CERT)[OL].https://www.us-cert.gov/ 2016,7,5
[2]cmm5定义bug等级[OL].http://www.docin.com/p-1535244861.html.
[3]LEAK M.[OL].http://www.baike.com/wiki/%E5%86%85%E5%AD %98%E6%B3%84%E6%BC%8F.
[4]王喆.C/C++代码内存泄漏缺陷检测方法研究[D].大连:大连理工大学,2012.
[5]LI M C,CHEN Y J,WANG L Z,et al.Dynamically validating static memory leak warnings[C]∥International Symposium on Software Testing and Analysis Conference.Lugano,Switzerland,2013:112-122
[6]LEE S H,JUNG C H,RAMAN E,et al.Automated memory leak detection for production use[C]∥International Conference on Software Engineering.Hyderabad,India,2014:825-836.
[7]杨宇,张健.程序静态分析技术与工具[J].计算机科学,2004,31(2):171-174.
[8]SOR V,TREIER T,Srirama S N.Improving statistical approach for memory leak detection using machine learning[C]∥International Conference on Software Maintenance.Eindhoven,Netherlands,2013:22-28.
[9]SUI Y L,YE D,XUE J L.Detecting Memory Leakd Statically with Full-Sparse Value-Flow Analysis[J].IEEE Transactions on Software Engineering,2014,40(2):107-122.
[10]LIM W,PARK S,HAN H.Memory leak detection with context awareness[C]∥Reliable and Autonomous ComputationalScie-nce Conference.San Antonio,USA,2012:276-281.
[11]JOY M M,MUELLER W,RAMMIG F J.Source code annotated memory leak detection for soft real time embedded systems with resource constraints[C]∥International Conference on Dependable,Autonomic and Secure Computing.Dalian,China,2014:166-172.
[12]KANVAR V,KHEDKER U P.Heap abstractions for staticanalysis[J].ACM Computing Surveys,2016,49(2):1-29.
[13]付晓毓,朱利,顾伟.基于模型检测的内存泄露静态测试方法[J].微电子学与计算机,2010,27(10):170-173.
[14]XU Z B,ZHANG J,XU Z X.Memory leak detection based on memory state transition Graph[C]∥Asia-Pacific Software Engineering Conference.Ho Chi Minh,Vietnam,2011:33-40.
[15]张仕金.基于Cppcheck软件缺陷模式的研究与定位[D].重庆:重庆大学,2014.
[16]侯洛明.程序静态分析的通用方法[J].计算机学报,1987,2:74-81.
[17]ALT M,MARTIN F.Lecture Notes in Computer Science[M].US,Berlin:Springer,2005.
[18]李平华.过程间数据流分析技术研究[D].南京:东南大学,2004.
[19]CppCheck[OL].trac.cppcheck.net/wiki.
[20]Splint[OL].http://www.splint.org/.
[21]姬秀娟.资源泄漏故障静态分析的关键技术的研究[D].天津:南开大学计算机与控制工程学院,2014.
[22]Standard Performance Evaluation Corporation(SPEC)[OL].http://www.spec.org/cpu/.
[1] YANG Hong-xin, SONG Bao-yan, LIU Ting-ting, DU Yue-feng, LI Xiao-guang. Tensor Completion Method Based on Coupled Random Projection [J]. Computer Science, 2021, 48(8): 66-71.
[2] HU Xin-tong, SHA Chao-feng, LIU Yan-jun. Post-processing Network Embedding Algorithm with Random Projection and Principal Component Analysis [J]. Computer Science, 2021, 48(5): 124-129.
[3] LIU Shan-shan, ZHU Hai-long, HAN Xiao-xia, MU Quan-qi, HE Wei. Enterprise Risk Assessment Model Based on Principal Component Regression and HierarchicalBelief Rule Base [J]. Computer Science, 2021, 48(11A): 570-575.
[4] DAI Hong-liang, LIANG Chu-xin. Meta-learning Algorithm Based on Trend Promote Price Tracing Online Portfolio Strategy [J]. Computer Science, 2021, 48(11A): 608-615.
[5] GAO Shuai, XIA Liang-bin, SHENG Liang, DU Hong-liang, YUAN Yuan, HAN He-tong. Spatial Cylinder Fitting Based on Projection Roundness and Genetic Algorithm [J]. Computer Science, 2021, 48(11A): 166-169.
[6] LI Yin, LI Bi-xin. Memory Leak Test Acceleration Based on Script Prediction and Reconstruction [J]. Computer Science, 2020, 47(9): 31-39.
[7] ZHANG Shan-bin, YUAN Jin-zhao, CHEN Hui, WANG Yu-rong, WANG Jie, TU Chang-he. Vehicle Self-localization Based on Standard Road Sign [J]. Computer Science, 2020, 47(7): 97-102.
[8] XING Yu-hua, LI Ming-xing. Robust Low Rank Subspace Clustering Algorithm Based on Projection [J]. Computer Science, 2020, 47(6): 92-97.
[9] NING Ze-xi, QIN Xu-jia, CHEN Jia-zhou. Video Fusion Method Based on 3D Scene [J]. Computer Science, 2020, 47(11A): 281-285.
[10] GUO Lan-ying, HAN Rui-zhi, CHENG Xin. Digital Instrument Identification Method Based on Deformable Convolutional Neural Network [J]. Computer Science, 2020, 47(10): 187-193.
[11] ZHANG Zhuang, LI Lin-lin, YU Hong-feng, FAN Bao-qing. Effectiveness Evaluation of Command and Control System Based on Improved Projection Pursuit and Grey Correlation Method [J]. Computer Science, 2019, 46(9): 298-302.
[12] LI De-quan, DONG Qiao, ZHOU Yue-jin. Distributed Online Conditional Gradient Optimization Algorithm [J]. Computer Science, 2019, 46(3): 332-337.
[13] ZHANG Zong-mei, GUI Sheng-lin, REN Fei. Android Malware Detection Based on N-gram [J]. Computer Science, 2019, 46(2): 145-151.
[14] YUE Chuan, PENG Xiao-hong. Evaluation Model of Software Quality with Interval Data [J]. Computer Science, 2019, 46(10): 209-214.
[15] FU Tai,YANG Li, WANG Bin. Projection Image Library Design Method for Aircraft CAD Model with Accurate Pose [J]. Computer Science, 2018, 45(6A): 244-246.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!