DeepRace: Finding Data Race Bugs via Deep Learning

07/15/2019
by   Ali Tehrani, et al.
0

With the proliferation of multi-core hardware, parallel programs have become ubiquitous. These programs have their own type of bugs known as concurrency bugs and among them, data race bugs have been mostly in the focus of researchers over the past decades. In fact, detecting data races is a very challenging and important task. There have been several research paths in this area with many sophisticated tools designed and utilized that focus on detecting data race at the file level. In this paper, we propose DeepRace, a novel approach toward detecting data races in the source code. We build a deep neural network model to find data races instead of creating a data race detector manually. Our model uses a one-layer convolutional neural network (CNN) with different window size to find data races method. Then we adopt the class activation map function with global average pooling to extract the weights of the last convolutional layer and backpropagate it with the input source code to extract the line of codes with a data race. Thus, the DeepRace model can detect the data race bugs on a file and line of code level. In addition, we noticed that DeepRace successfully detects several buggy lines of code at different locations of the file. We tested the model with OpenMP and POSIX source code datasets which consist of more than 5000 and 8000 source code files respectively. We were able to successfully classify buggy source code files and achieve accuracies ranging from 81 performance of detecting and visualizing the data race at the line of code levels and our model achieved promising results. We only had a small number of false positives and false, ranging from 1 to 10. Furthermore, we used the intersection of union to measure the accuracy of the buggy lines of code, our model achieved promising results of 66 percent.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/21/2021

Content-Based Textual File Type Detection at Scale

Programming language detection is a common need in the analysis of large...
research
11/15/2022

A Hierarchical Deep Neural Network for Detecting Lines of Codes with Vulnerabilities

Software vulnerabilities, caused by unintentional flaws in source codes,...
research
09/08/2020

Predicting Defective Lines Using a Model-Agnostic Technique

Defect prediction models are proposed to help a team prioritize source c...
research
01/30/2021

ICodeNet – A Hierarchical Neural Network Approach for Source Code Author Identification

With the open-source revolution, source codes are now more easily access...
research
01/18/2022

BinGo: Pinpointing Concurrency Bugs in Go via Binary Analysis

Golang (also known as Go for short) has become popular in building concu...
research
09/17/2021

Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchy

Statistical language modeling and translation with transformers have fou...
research
06/22/2023

FLAG: Finding Line Anomalies (in code) with Generative AI

Code contains security and functional bugs. The process of identifying a...

Please sign up or login with your details

Forgot password? Click here to reset