DocumentCode
3730709
Title
Semantics-based memory leak detection for C programs
Author
Zhiqiang Liu; Bo Xu; Dong Liang; Chang Liu; Zejun Jiang; Chenglie Du
Author_Institution
School of Software and Microelectronic, Northwest Polytechnicial University, Xi´an, China
fYear
2015
Firstpage
2283
Lastpage
2287
Abstract
Memory leak detection for C programs is a significant while difficult research field. Based on executable formal semantics of C programming language, a new method is proposed in this paper for memory leak detection. By extending and modifying state Configuration and rules of memory manipulation and pointer manipulation in semantics, this method can employ the powerful expression and executive capacity of rewriting logic to describe both behaviors of memory operation such as malloc, free, pointer and unit of scope, and memory leak pattern of C programs in executable semantics. Because the modified state Configuration and rules are executable, the memory leak flaws can be matched and detected automatically by execution. Three typical memory leak flaws, namely unreleased allocated-memory, pointer reassigning and inconsistency between allocated space and released space, are tested with some code segments containing them to verify the method. The results and testing time show that the semantics-based method can detect memory leak flaws in C programs effectively.
Keywords
"Semantics","Computer languages","Leak detection","Mathematical model","Testing","Syntactics","Computers"
Publisher
ieee
Conference_Titel
Fuzzy Systems and Knowledge Discovery (FSKD), 2015 12th International Conference on
Type
conf
DOI
10.1109/FSKD.2015.7382308
Filename
7382308
Link To Document