Dynamic data race detection method based on static shared variable recognition

A technology of static shared variables and dynamic data, applied in the direction of software testing/debugging, can solve the problems of code bloat, program code bloat, program interference, etc., to avoid code bloat and reduce system overhead.

A technology of static shared variables and dynamic data, applied in the direction of software testing/debugging, can solve the problems of code bloat, program code bloat, program interference, etc., to avoid code bloat and reduce system overhead.

CN102760095AActive Publication Date: 2012-10-31TSINGHUA UNIV

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic data race detection method based on static shared variable recognition
  • Dynamic data race detection method based on static shared variable recognition
  • Dynamic data race detection method based on static shared variable recognition

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0037] After research, it is found that the occurrence of non-deadlock concurrent program defects, such as data competition, is only related to shared variables in the program. Based on this observation, the present invention proposes a dynamic data race detection method based on shared variable identification, such as figure 1 As shown, it is the implementation framework of the method in this embodiment. In this embodiment, first, a static shared variable identification algorithm is implemented by using the inter-procedural analysis module of the compiler, and the identification result of the shared variable is output. The data race detection instrumentation and sampling...

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 discloses a dynamic data race detection method based on static shared variable recognition. The method comprises the steps: S1, recognizing a shared variable of a program to be detected; S2, performing data race detection instrumenting and sampling on a basic block of the shared variable contained in the program to be detected, to obtain instrumented and sampled binary code of the program to be detected, wherein the basic block references to a continuous program statement sequence, a control flow starts entering from the continuous program sentence sequence and leaves from the end without interruption or branch; and S3, running the binary code to dynamically detect data race in spot detection. The method can be used for instrumenting and sampling the basic block containing the shared variable, thus avoiding the problem of code bloat, and greatly reducing the system overhead.

Description

technical field [0001] The invention relates to the technical field of computer software reliability, in particular to a dynamic data competition detection method based on static shared variable identification. Background technique [0002] With the development of the underlying multi-core processors, concurrent programs are becoming more and more popular with programmers. However, concurrent programs are not only difficult to write correctly, but also have various software defects that are difficult to debug and reproduce. Data race is one of the important causes of software defects in concurrent programs. A data race is when multiple threads access the same memory address without synchronization protection, and at least one of the accesses is a write operation. Because of its serious consequences, academia and industry have been trying to find an effective detection method. [0003] Existing data race detection methods are all based on software instrumentation, which ar...

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
31 Oct 2012
Publication
CN102760095A
IPC
G06F11/36
Inventors
郑纬民; 盛田维