Detecting Undefined Behaviors in CUDA C

Autor: Wentao Li, Jianhua Sun, Hao Chen
Jazyk: angličtina
Rok vydání: 2019
Předmět:
Zdroj: IEEE Access, Vol 7, Pp 182559-182572 (2019)
Druh dokumentu: article
ISSN: 2169-3536
DOI: 10.1109/ACCESS.2019.2954143
Popis: With the increasing deployment of GPUs in many domains, it is important to enhance the dependability of GPU-based systems especially in mission critical environments. We believe that undefined behaviors present a major challenge for the CUDA platform, because its programming language and compiler are derived from traditional C/C++ languages. In this paper, we first present a suite of benchmarks for CUDA, which contains 77 categories of undefined behaviors corresponding to the core language in C11 standard. It is developed to evaluate how current CUDA compilers deal with undefined behaviors. Then, we present the design and implementation of a system that can detect and locate vulnerable code that may result in undefined behaviors in CUDA programs. Our system is composed of a program converter and a static analyzer; the former transforms CUDA programs into a portable and semantic-reserved C/C++ programs, and the latter performs analysis on the transformed programs to statically identify undefined behaviors. Using CUDA SDK and a set of real CUDA applications, we conduct extensive experiments to investigate the effectiveness of our system on finding undefined behaviors in CUDA C programs.
Databáze: Directory of Open Access Journals