Font Size: a A A

Study Of Statically Detecting Resource Leak In C/C++ Program

Posted on:2007-07-14Degree:MasterType:Thesis
Country:ChinaCandidate:H G MaFull Text:PDF
GTID:2178360212983819Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Statically detect resource leak in C/C++ program is studied in this paper. In order to find out safety flaws in C/C++ program and improve the safety performance of software, a method to statically detect resource leak is designed and implemented. Based on analyzing intermediate representation files generated by GCC compiler after semantic analyzer, according to the safety rules by record the resource application and release, resource leak vulnerabilities are detected.First, the representations of resource leak are classified. The syntax directed translation method is adopted to construct safety rules. Second, pointer node and resource node is designed to record the usage of resource. Flow-sensitive analysis is used to treat with conditional statements, with which the dynamic execution of program is simulated. The bottom up analysis is adopted by interprocedural check. Finally, combined with specific nodes of abstract syntax tree, safety analysis algorithms are described and the statically detection tool is implemented. The method proposed in this paper was implemented in XDCHECK, a statically checking tool for C/C++ program, experimental results illustrate that this method is effective.
Keywords/Search Tags:resource leak, static checking, safety flaws, safety pattern
PDF Full Text Request
Related items