The Design and Implementation of Static Memory Leak Detection Model
- Author
- KePing
- Advisor
- ChenJunLiang
- School
- Beijing University of Posts and Telecommunications
- Major
- Computer Science and Technology
- Classification
- TP311.52 Software Development
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 163
- Citations
- 4
Abstract
It is the most difficult issue to detect memory errors in software of C. As the C language has the advantage of flexibility and efficiency, from its born until now, it is the main programming language which has been widely used. C language allows users to control the use of memory resources directly, which is very important for high-performance or hign utilization of computer resources. But the flexible memory management may lead to memory leaks and other memory errors. In C programs memory leak is very danger, it is difficult to be observed. However, with the accumulation of failures, the program’s performance will be lower, and finally it will lead to serious crash or unexpectedly quit. Therefore memory leak detection is crucial!First of all, this paper researches on the memory leak detection technology, and analyzes the methods of memory leak detection, including static testing, dynamic testing, and compare their advantages and disadvantages. Then the author built the static testing tools DTSC, realized its syntax analysis, lexical analysis, symbol table and control flow graph, base on these, the author added the interval analysis of each variable to improve the accuracy of the analysis. After that the author built up a static testing platform on basis of state machine with strong expansion. And then by studying and summarizing the C languge codes which will generate memory leak fault, design and implement memory leak mode for DTSC, and use it to test C programs. Finally, this paper compares the test results with foreign static testing tools, analyze the strengths and weaknesses of DTSC memory leak model, and gives suggestions to improve DTSC platform and memory leak mode.
Table of contents
Abstract 4-5
ABSTRACT 5-9
first chapter 9-13
1.1 memory leak and static test 9 -10
1.2 topics sources and background 10-11
1.3 focus 11
1.4 papers arrangement 11-13
second Chapter memory leak 13-19
2.1 memory leak concept 13
2.2 memory leak causes 13-15
2.3 generation mode memory leaks classification 15-16
2.4 memory leak detection significance 16-17
2.5 research status 17-19
Chapter static test 19-23
3.1 the concept of the static test 19
3.2 static test and dynamic test comparison 19
3.3 static detection technology 19-23
Chapter DTSC static detection tool design and implementation 23-48
4.1 DTSC introduction 23-26
4.1.1 DTSC framework 23-26
4.2 DTSC features and advantages 26-27
4.3 DTSC design and Implementation 27-48
4.3.1 DTSC 's abstract syntax tree generation unit 27-30
4.3.2 DTSC 's control flow graph generation unit 30-33
4.3.3 DTSC 's symbol table generation unit 33-38
4.3.4 DTSC interval arithmetic unit 38-44
4.3.5 DTSC defect mode state machine calculation unit 44-47
4.3.6 DTSC database access unit 47-48
memory leak Chapter DTSC model design and implementation 48-54
5.1 memory leak modes are summarized 48-51
5.2 alias analysis 51-52
5.3 memory Leak model Design and realization 52-54
Chapter DTSC model memory leaks detection 54-58
6.1 test case design and test 54-56
6.2 comparison of test results with K8 56-58
first seven chapters summarize 58-60
7.1 summarizes research 58-59
7.2 Prospects for further work 59-60
Appendix 60-63
Appendix 1 BNF for C.jj 60-63
References 63-65
Thanks 65-66
master's degree has been hired during the academic situation 66
Related dissertations
- Research on Automatic Test Technology and Constrain Satisfaction Based on Defect Model
- Design of Circuit Testing System of Vehicle Fuse Box Based on LabVIEW
- Design and implementation of the system of brake machine control system based on QT
- Design and Development of All Electric Injection Molding Machine Control System
- The Design of CAN Controller Based on the ISO2.0Full Standard Protocol
- Embedded Software Static Testing Based on Rules
- The Design of an Automatically Variable Modulus ADPLL
- The Research on the Design of Vehicle Mounting Systems Based on Uncertainty Analysis
- Research on Traffic Demand Forecast with Uncertain Trip Generation
- The Interval Research on Backfill Layer Rigidity of All Levels Surrounding Rock
- Research and Implementation of High Reliability and Real-time Perfomance for High-speed Train's Wireless Data Transmission
- Research on Test Technologies of Embedded Software Used for Safety-related System
- The Design and Research of the Logging While Drilling Sonic Caliper Control System
- Research of Injection Unit and Ejection Unit Control Technology of All-electrical Injection Molding Machine
- Research and Development of Marine Self-contained Temperature-depth Data Logger
- Spatial Vector Soliton in Photorefractive Materials and Localized Surface Waves
- The Study of Tunable Properties of Liquid Crystal Photonic Crystals Resonant Cavity
- Research to the Improved Damage Tolerance Fatigue Theory Based on Interval Analysis and Its Application
- Research on the New Method of VaR about Financial Market Risk Management Based on Interval Analysis
- Design of a High-speed Reconfigurable Serial Field Bus and Its Appl Ication