Computer Engineering & Science
Previous Articles Next Articles
CHEN Bei1,XU Qingguo1,2
Received:
Revised:
Online:
Published:
Abstract:
C++ is a very popular computer programming language and memory leakage is one of the most hardtofind common error in C++ programs. We design a static analyzer that can detect memory leakage for C++ programs. Firstly, we extract the control flow graph from the abstract syntax tree generated from C++ source via g++. Secondly, we build some new control flow graphs by connecting the control flow graphs of memory functions for the same class. Finally, we design and implement an algorithm to analyze the new control flow graphs to report all possible errors. Experiment results, for some examined examples, show that our method is effective.
Key words: memory leakage, static testing, abstract syntax tree, control flow graph
CHEN Bei1,XU Qingguo1,2.
0 / / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: http://joces.nudt.edu.cn/EN/
http://joces.nudt.edu.cn/EN/Y2017/V39/I01/118