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

被引:1
|
作者
Ma, Xutong [1 ,3 ]
Yan, Jiwei [2 ]
Li, Yaqi [2 ,3 ]
Yan, Jun [1 ,2 ,3 ]
Zhang, Jian [1 ,3 ]
机构
[1] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[2] Chinese Acad Sci, Inst Software, Technol Ctr Software Engn, Beijing, Peoples R China
[3] Univ Chinese Acad Sci, Beijing, Peoples R China
关键词
C plus plus Smart Pointer; Memory Error; Coding Styles;
D O I
10.1109/ASE.2019.00117
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
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.
引用
收藏
页码:1122 / 1125
页数:4
相关论文
共 50 条
  • [41] CryptSan: Leveraging ARM Pointer Authentication for Memory Safety in C/C plus
    Hohentanner, Konrad
    Zieris, Philipp
    Horsch, Julian
    [J]. 38TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING, SAC 2023, 2023, : 1530 - 1539
  • [42] Static Analysis for Transitioning to CHERI C/C plus
    Dudina, Irina
    Stark, Ian
    [J]. PROCEEDINGS OF THE 13TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON THE STATE OF THE ART IN PROGRAM ANALYSIS, SOAP 2024, 2024, : 52 - 59
  • [43] Static Analysis of Functors' Mathematical Properties in C plus plus Source Code
    Babati, Bence
    Pataki, Norbert
    [J]. INTERNATIONAL CONFERENCE ON NUMERICAL ANALYSIS AND APPLIED MATHEMATICS (ICNAAM-2018), 2019, 2116
  • [44] Static call graph generator for C plus plus using debugging information
    Terashima, Yui
    Gondow, Katsuhiko
    [J]. 14TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2007, : 127 - +
  • [45] Bounded Model Checking of C plus plus Programs Based on the Qt Framework
    Sousa, Felipe R. M.
    Cordeiro, Lucas C.
    de Lima Filho, Eddie B.
    [J]. 2015 IEEE 4TH GLOBAL CONFERENCE ON CONSUMER ELECTRONICS (GCCE), 2015, : 179 - 180
  • [46] Poster: Pairika-A Failure Diagnosis Benchmark for C plus plus Programs
    Rahman, Md. Rezaur
    Golagha, Mojdeh
    Pretschner, Alexander
    [J]. PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING - COMPANION (ICSE-COMPANION, 2018, : 204 - 205
  • [47] SMT-Based Bounded Model Checking of C plus plus Programs
    Ramalho, Mikhail
    Freitas, Mauro
    Sousa, Felipe
    Marques, Hendrio
    Cordeiro, Lucas
    Fischer, Bernd
    [J]. 2013 20TH ANNUAL IEEE INTERNATIONAL CONFERENCE AND WORKSHOPS ON THE ENGINEERING OF COMPUTER BASED SYSTEMS (ECBS 2013), 2013, : 147 - 156
  • [48] Analysis of Entities in C and C plus plus Programs and Relations between Them for Program Understanding
    Belevantsev, A. A.
    Veselevich, E. A.
    Ivannikov, V. P.
    [J]. PROGRAMMING AND COMPUTER SOFTWARE, 2016, 42 (01) : 49 - 53
  • [49] Efficient Data Race Detection for C/C plus plus Programs Using Dynamic Granularity
    Song, Young Wn
    Lee, Yann-Hang
    [J]. 2014 IEEE 28TH INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM, 2014,
  • [50] Empirical Study of Software Composition Analysis Tools for C/C plus plus Binary Programs
    Ning, Yuqiao
    Zhang, Yanan
    Ma, Chao
    Guo, Zhen
    Yu, Longhai
    [J]. IEEE ACCESS, 2024, 12 : 50418 - 50430