The Designment of C/C++Source Code Static Detecting System
- Author
- RaoKun
- Advisor
- PengSiWei
- School
- Beijing University of Chemical Technology
- Major
- Applied Computer Technology
- Classification
- TP311.11 Programming method
- Degree
- Master's thesis
- Year
- 2012
- Downloads
- 136
- Citations
- 0
Abstract
With the quick development of computer technology and the internet, the traditional method of amending codes is inefficient and time-consuming, and cannot meet the current demand. So many universities begin to develop Online Judge System (OJ System) in order to provide a good atmosphere for students. However, domestic systems have some problems about security and stability. So it is necessary to detect the source codes which students submit through OJ System.This article design an C Static Detecting System (CSTS), which will detect and check C source codes that are submitted by customers of my university’s online judge system through Internet. The system will detect whether there exist array bounds, the error of String function, Buffer bound and so on. These errors are difficult to find by compiler. It will cause heavy harm to OJ system, when the error programs run on the OJ system of our college. The system even will collapse if situation is deteriorated.CSTS uses static analysis technique and symbolic execution technique. The system uses static analysis to C source codes in order to get the static analysis tree of these source codes. The symbolic execution of CSTS is based on static analysis trees. The system is able to detect errors through symbolic execution technique. The system is not executing program, but use the symbolic value to take place of the variable value, and then simulate program running according to path scheduling policy. In the meanwhile, it is starting symbolic computation, getting path condition and adding security constraints. At last CSTS adopt constraint solver to compute with constraint condition, so it can judge whether there are some errors such as array bounds, the error of String function, Buffer bound in program.
Table of contents
Summary 4-6
ABSTRACT 6-14
first chapter 14-28
1.1 traditional manual review mode 14 Overview
1.2 source code online evaluation system development 14-15
1.2.1 source code online evaluation system 14-15
1.2.2 source code online evaluation system has security problems 15
1.3 C / C source code common error 15-19
1.3.1 storage bounds 15-16
1.3.2 dynamic memory allocation problem 16-18
1.3.3 memory leak 18-19
1.4 symbolic execution techniques 19-25 <br / > basic Concepts 1.4.1 symbolic execution of process 19-21
1.4.2 symbolic execution of 21-23
1.4.3 symbolic execution system framework related issues 23-25 ??
1.4.4 symbolic execution of meaning 25
1.5 topics 25-28
Chapter II system architecture 28 - 34
2.1 C / C source code static detection system overview process of symbolic execution 28
2.2 system 28-31
2.3 CSTS architecture 31 -34
2.3.1 CSTS the main structure 31-32
2.3.2 CSTS modular design 32-34
the third chapter tree generates static analysis and traverse static analysis 34-38
3.1 system 34
3.2 static analysis tree 34-38
tree structure 3.2.1 static Analysis 35-37
3.2.2 static Analysis tree traversal 37-38
Chapter static analysis based on symbolic execution tree 38-58 <br / > path scheduling policy nbsp 4.1 CSTS system ; 38-40
4.2 CSTS symbolic computation 40-45
4.2.1 data Structure 40
4.2 .2 symbolic computation 40-42
4.2.3 examples of symbolic computation analysis 42-45
4.3 call processing functions 45-47
4.3 .1 related data structures 45-46
4.3.2 process 46-47
4.4 lazy symbolic execution 47-49
4.4. a lazy symbolic execution semantics handle 47-49
4.5 string manipulation functions 49
4.5.1 symbolic buffer length 49
handle dynamic memory allocation functions 4.6 variable 49-52
4.6.1 release detection dynamic non-dynamic applications correctly paired 50
4.6.2 detect memory allocation and deallocation functions 50-51
4.6.3 release detection repeat the same memory 51
4.6.4 release sequence error detection contiguous memory space 51
4.6. 5 detect unreleased memory 51-52
4.7 constraint solving 52
4.8 program testing analysis 52-58
Chapter V system testing 58-64
5.1 test environment 58
5.2 functional Test 58-64
5.2.1 test a 58-60
5.2.2 test two 60-64
sixth chapter summarizes 64-66
6.1 This article summarizes 64
6.2 required improvement 64-66
References 66-68
Thanks 68-70
research and published papers 70-72
author and instructors 72-73
Appendix 73-74
Related dissertations
- Incremental Detection Method for Memory Access Overrun in Multi-loop Programs
- Design and Development of a High-speed Heavy-load Palletizing Robot
- The Design and Analysis of Octahedral Module Deployable Mast
- Research on Mechanical Properties Of the Elastic Body of a Six-Axis Force Sensor Based on Strain Gauge
- Compiler-directed Static Analysis and Code Transformation
- Static Security Detection of C Applications
- The Research of Exploiting Software Security Vulnerabilities Based on Android Platforms
- The Finite Element Analysis and Optimization of the Key Components of FP2500A Type Stack-Turning Machine for Organic Fertilizer
- Design and Analysis of PF1In-cryostat-feeder Support for ITER Poloidal Field
- Research on Steel Structure Optimization and Dynamic Characteristics of HZS240Concrete Mixing Station
- Mechanical Performance Analysis of Semi-rigid Steel Frames Filled Profild Steel Plate Wall
- Large Steel Structure Natural Draft Cooling Tower of Force Analysis
- The Wind Resistance Study of the Steel Frame Structural Main Factory Building of Large Thermal Power Plant
- The Analysis of the Structure Stability of Zhongding International Mansion
- Research on the Mechanical Behaviors of Concrete-filled Double Skin Steel Tubular Column
- The Analysis and Comparison for Different Forms of T Fence in the Wiggins Gas Holder
- The Research on the Use of Composite Structure in Three-dimensional Garage
- Static Analysis of the Ground-supported Flat-bottomed Cylindrical Steel-concrete Composite Silo
- Mechanical Behavior Analysis of Large Silos Storage for High Temperature Stored Materials
- Structure Performance Analysis and Optimization on a Bus Frame