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 条
  • [1] Detection of Incorrect Pointer Dereferences for C/C plus plus Programs using Static Code Analysis and Logical Inference
    Vert, Tatiana
    Krikun, Tatiana
    Glukhikh, Mikhail
    [J]. 2013 TOOLS & METHODS OF PROGRAM ANALYSIS (TMPA 2013), 2013, : 78 - 82
  • [2] Efficient detection of dangling pointer error for C/C plus plus programs
    Zhang, Wenzhe
    [J]. 2ND ANNUAL INTERNATIONAL CONFERENCE ON INFORMATION SYSTEM AND ARTIFICIAL INTELLIGENCE (ISAI2017), 2017, 887
  • [3] Static Integration of SQL Queries in C plus plus Programs
    Sysak, Maciej
    Zielinski, Bartosz
    Kruszynski, Piotr
    Sobieski, Scibor
    Maslanka, Pawel
    [J]. ADVANCES IN DATABASES AND INFORMATION SYSTEMS (ADBIS 2014), 2014, 8716 : 126 - 138
  • [4] A Dynamic Detection Method to C/C plus plus Programs Memory Vulnerabilities Based on Pointer Analysis
    Ma, Rui
    Chen, Lingkui
    Hu, Changzhen
    Xue, Jingfeng
    Zhao, Xiaolin
    [J]. 2013 IEEE 11TH INTERNATIONAL CONFERENCE ON DEPENDABLE, AUTONOMIC AND SECURE COMPUTING (DASC), 2013, : 52 - 57
  • [5] Finding parallel patterns through static analysis in C plus plus applications
    del Rio Astorga, David
    Dolz, Manuel F.
    Miguel Sanchez, Luis
    Daniel Garcia, J.
    Danelutto, Marco
    Torquati, Massimo
    [J]. INTERNATIONAL JOURNAL OF HIGH PERFORMANCE COMPUTING APPLICATIONS, 2018, 32 (06): : 779 - 788
  • [6] MagicDetector: A Precise and Scalable Static Deadlock Detector for C/C plus plus Programs
    Cao, Huaxiong
    Gu, Naijie
    Du, Yunkai
    [J]. ARABIAN JOURNAL FOR SCIENCE AND ENGINEERING, 2016, 41 (12) : 5149 - 5167
  • [7] Static Analysis Approach for Defect Detection in Multithreaded C/C plus plus Programs
    Moiseev, Mikhail
    [J]. SOFTWARE ENGINEERING FOR RESILIENT SYSTEMS, SERENE 2013, 2013, 8166 : 169 - 183
  • [8] TCD: Statically Detecting Type Confusion Errors in C plus plus Programs
    Zou, Changwei
    Sui, Yulei
    Yan, Hua
    Xue, Jingling
    [J]. 2019 IEEE 30TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE), 2019, : 292 - 302
  • [9] Examining C plus plus program analyzers - Finding out how programs really behave
    Meyers, S
    Klaus, M
    [J]. DR DOBBS JOURNAL, 1997, 22 (02): : 68 - +
  • [10] Model checking C plus plus programs
    Monteiro, Felipe R.
    Gadelha, Mikhail R.
    Cordeiro, Lucas C.
    [J]. SOFTWARE TESTING VERIFICATION & RELIABILITY, 2022, 32 (01):