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.

Active Publication Date: 2012-10-31
TSINGHUA UNIV
View PDF2 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This overhead can sometimes reach 20% if the code that checks the sampling is implemented poorly
[0006] 2. Code Expansion
If a function body is very large, but only a small part of the code area is really related to data races, sampling based on function granularity will copy the entire function and add instrumentation code to the copied function, which will inevitably cause program code bloat, interfere with the program
[0007] In summary, the existing sampling methods based on function granularity do not consider the characteristics of concurrent program defects or data races

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
  • 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
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 郑纬民盛田维陈文光蒋运韫
Owner TSINGHUA UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products