| With the rapid development of computer technology,the structure of software has become more and more complex,and how to ensure the reliability of software has gradually become the focus of research in the computer field.Software failure is an important factor affecting software reliability.The detection results of existing static detection tools often contain a large number of false positives,and the confirmation of false positives requires more manpower and time.Dynamic testing can ensure the authenticity of fault detection results by executing the program,but the detection results of traditional dynamic testing tools have many false negatives,and the ability to identify faults is very limited.Aiming at the above problems,this thesis proposes an execution framework that supports dynamic detection of software faults.This framework is a part of dynamic testing.It tries to automatically identify the faults triggered in the program when the program is running by executing the program dynamically,so as to avoid the problem of false positives.This thesis mainly conducts the following researches around this framework:(1)The dynamic testing process based on program instrumentation is studied,eight common fault modes in C/C++programs are analyzed,and eight probe functions for fault detection are expanded in the instrumentation function support library that supports coverage analysis.Probes collect runtime information related to faults to identify and locate faults while the program is running.(2)Aiming at the compatibility requirements of the framework,a dynamic execution method of multi-platform adaptation is proposed.The adapter design pattern is used in the dynamic execution part to improve the expansibility and reusability of the framework.(3)A program instrumentation method based on fault characteristics is proposed.By analyzing the fault characteristics corresponding to eight failure modes,based on the abstract syntax tree of the program,the fault monitoring position is searched and the fault monitoring probe is instrumented.Finally,by introducing interval operations,the set of fault monitoring probe insertion points is reduced.Based on the above research content,this thesis implements a fault dynamic detection system based on the code testing system in the laboratory.The experimental results show that the system functions as expected. |