Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Assembly program control flow path detection method and device

An assembler and detection method technology, which is applied in the field of assembler control flow path detection of domestic platforms, can solve the problems of weak pertinence, difficult adjustment and maintenance, and high difficulty of domestic platforms, and is easy to modify and maintain, conducive to optimization, and targeted at strong effect

Active Publication Date: 2021-01-05
PLA STRATEGIC SUPPORT FORCE INFORMATION ENG UNIV PLA SSF IEU
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, the testing and optimization of these core system software is very important, but the current domestic platform testing tools are not complete enough
Because the mainstream control flow analysis tools IDA Pro and Intel Pin at home and abroad are too large and have complex programs, it is very difficult to transplant to domestic platforms. Therefore, the domestic platforms are not very targeted and difficult to adjust and maintain.
In addition, Intel Pin's dynamic C and C++ program instrumentation probe feedback method is good for single-run programs, but it is difficult to collect and sort out the feedback results of programs that need to calculate tens of millions of test data, and cannot reflect them well. One-to-one correspondence between the outbound control flow and the input test data
In addition to the above-mentioned two most widely used code analysis tools on non-domestic platforms, code analysis tools such as PLC program control flow analysis, Klocwork code static analysis tool and LDRA Testbed coding rule detection tool are also not friendly enough to domestic platforms. work will be very difficult

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Assembly program control flow path detection method and device
  • Assembly program control flow path detection method and device
  • Assembly program control flow path detection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0058] Such as Figure 5 Shown, a kind of assembly program control flow path detection method of the present invention, the steps are as follows:

[0059] Step 101: preprocessing the assembly program, that is, traversing the assembly program, deleting the comments of the code segment in the assembly program, renaming the integer register, storing the content of the non-code segment in the assembly program and recording its position in the assembly program.

[0060] The code segment in the assembler includes comment information, which starts with the symbol "#". In practice, the integer registers of instruction operands use both register aliases and application binary interface names (ABIName), such as Shenwei integer registers. In order to facilitate subsequent processing, the present invention renames the integer registers, that is, uniformly replaces them with application program binary interface names. Store the contents of non-code segments and record where they are loca...

Embodiment 2

[0116] Such as Figure 11 As shown, a kind of assembly program control flow path detection device of the present invention comprises:

[0117] The preprocessing module 201 is used to traverse the assembler, delete the comments of the code segment in the assembler, rename the integer register, store the content of the non-code segment in the assembler and record its position in the original assembler;

[0118] The control flow generating module 202 is used for traversing the preprocessed assembly program, and obtaining the control flow graph CFG of the assembly program through the auxiliary table AT and the control flow raw data CRD;

[0119] The path label insertion module 203 is used to analyze the control flow original data CRD, read the instruction sequence of each basic block BBN in the control flow original data CRD, and insert the path label at the head of the instruction sequence of the basic block BBN to generate a new control flow raw data CRD;

[0120] The program ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the technical field of computer program analysis and software testing and discloses an assembly program control flow path detection method. The method comprises the followingsteps of detecting and deleting annotations of code segments in an assembly program, and renaming an integer register; obtaining a control flow graph CFG of the assembly program through the auxiliarytable AT and the control flow original data CRD; inserting a path label into the head of the instruction sequence of the basic block BBN to generate new control flow original data CRD; recombining thenew control flow original data CRD to obtain a new assembly program with a path label; compiling the new assembly program with the path label and the probe program into an executable file, and generating a result file; and reading the generated result file, and performing statistics according to paths to obtain passing rates of different paths. According to the detection method, the control flowinformation of the assembly program can be rapidly and accurately obtained, then the dynamic information such as path coverage testing is obtained, and the detection method has advantages of being light in weight, high in pertinence, easy to modify and maintain and the like.

Description

technical field [0001] The invention belongs to the technical field of computer program analysis and software testing, in particular relates to the detection of assembly program control flow paths, in particular to a detection method and device for assembly program control flow paths used on domestic platforms. Background technique [0002] Path coverage testing can be used to detect program branch coverage and statement coverage, and code analysis and stub instrumentation are two important links in implementing path coverage testing. On the basis of maintaining the original logical integrity of the program under test, some probes are inserted into the program. These probes are essentially code segments for information collection, which can be assignment statements or function calls to collect coverage information. Through the execution of the probe and output the running characteristic data of the program. Based on the analysis of these characteristic data, the control fl...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/434G06F8/447
Inventor 许瑾晨曹浩郭绍忠周蓓刘聃
Owner PLA STRATEGIC SUPPORT FORCE INFORMATION ENG UNIV PLA SSF IEU
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products