The invention discloses a static
pointer analysis-combined detection acceleration method and medium during memory
safe operation, and the method comprises the steps: carrying out the preprocessing and analysis of a
source code of a to-be-detected program through a
compiler, collecting the
metadata of an array variable, carrying out the intra-process
alias analysis and the inter-process
alias analysis, and obtaining a to-be-detected program; inserting code snippets used for transmitting
metadata in a cross-process manner,
rewriting array subscript expressions in codes, inserting code snippets used for
border crossing detection, inserting runtime detection codes, compiling and linking instrumented source codes by using a
compiler and a
linker, and generating an
executable file; and running the
executable file, and outputting a detection result during safe running of the memory. According to the method, lightweight
Boolean expression calculation is used for replacing heavy-weight runtime detection, the
time overhead of a runtime detection tool can be effectively reduced on the premise that existing codes are not changed, missing report and false report are not introduced, and the
time sequence of report errors and memory errors is guaranteed, and the method has practical application value.