Semantics-based memory leak detection for C programs

Zhiqiang Liu, Bo Xu, Dong Liang, Chang Liu, Zejun Jiang, Chenglie Du

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

2 Scopus citations

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.

Original languageEnglish
Title of host publication2015 12th International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2015
EditorsZhuo Tang, Jiayi Du, Shu Yin, Renfa Li, Ligang He
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages2283-2287
Number of pages5
ISBN (Electronic)9781467376822
DOIs
StatePublished - 13 Jan 2016
Event12th International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2015 - Zhangjiajie, China
Duration: 15 Aug 201517 Aug 2015

Publication series

Name2015 12th International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2015

Conference

Conference12th International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2015
Country/TerritoryChina
CityZhangjiajie
Period15/08/1517/08/15

Keywords

  • Formalization
  • Memory Leak
  • Programming Language
  • Semantic

Fingerprint

Dive into the research topics of 'Semantics-based memory leak detection for C programs'. Together they form a unique fingerprint.

Cite this