kirancodes.me
To Proof Maintenance & Beyond!

SPrinter: A Static Checker for Finding Smart Pointer Errors in C++ Programs

Xutong Ma, Jiwei Yan, Yaqi Li, Jun Yan, Jian Zhang

Abstract

Smart pointers are widely used to prevent memory errors in modern C++ code. However, improper usage of smart pointers may also lead to common memory errors, which makes the code not as safe as expected. To avoid smart pointer errors as early as possible, we present a coding style checker to detect possible bad smart pointer usages during compile time, and notify programmers about bug-prone behaviors. The evaluation indicates that the currently available state-of-the-art static code checkers can only detect 25 out of 116 manually inserted errors, while our tool can detect all these errors. And we also found 521 bugs among 8 open source projects with only 4 false positives.

BibTeX
@inproceedings{Ma-al:ASE19,
  author    = {Xutong Ma and
               Jiwei Yan and
               Yaqi Li and
               Jun Yan and
               Jian Zhang},
  title     = {{SPrinter:} A Static Checker for Finding Smart Pointer Errors in C++ Programs},
  booktitle = {ASE},
  pages     = {1122--1125},
  publisher = {{IEEE}},
  year      = {2019},
}

Related papers