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 条
  • [31] A Comprehensive Detection of Memory Corruption Vulnerabilities for C/C plus plus Programs
    Gao, Yuhan
    Chen, Liwei
    Shi, Gang
    Zhang, Fei
    [J]. 2018 IEEE INT CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, UBIQUITOUS COMPUTING & COMMUNICATIONS, BIG DATA & CLOUD COMPUTING, SOCIAL COMPUTING & NETWORKING, SUSTAINABLE COMPUTING & COMMUNICATIONS, 2018, : 354 - 360
  • [32] perflint: A Context Sensitive Performance Advisor for C plus plus Programs
    Liu, Lixia
    Rus, Silvius
    [J]. CGO 2009: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, PROCEEDINGS, 2009, : 265 - +
  • [33] Examining Structural Correctness of Documentation Comments in C plus plus Programs
    Cseri, Tamas
    [J]. 2015 IEEE 13TH INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATICS, 2015, : 73 - 78
  • [34] Designing clamps using CAD programs and C plus plus language
    Urdea, Mihaela
    Parv, Luminita
    Lupulescu, Nouras Barbu
    [J]. PROCEEDINGS OF THE 5TH WSEAS INTERNATIONAL CONFERENCE ON APPLIED AND THEORETICAL MECHANICS (MECHANICS '09), 2009, : 144 - 147
  • [35] Designing clamps using CAD programs and C plus plus language
    Urdea, Mihaela
    Parv, Luminita
    Lupulescu, Nouras Barbu
    [J]. ADVANCES IN MANUFACTURING ENGINEERING, QUALITY AND PRODUCTION SYSTEMS, VOL II, 2009, : 453 - 456
  • [36] CoBOT: Static C/C plus plus Bug Detection in the Presence of Incomplete Code
    Gao, Qing
    Zhang, Shikun
    Chen, Xianglong
    Ma, Sen
    Shao, Sihao
    Sui, Yulei
    Zhao, Guoliang
    Ma, Luyao
    Ma, Xiao
    Duan, Fuyao
    Deng, Xiao
    [J]. 2018 IEEE/ACM 26TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2018), 2018, : 385 - 388
  • [37] A Context-Sensitive Memory Model for Verification of C/C plus plus Programs
    Gurfinkel, Arie
    Navas, Jorge A.
    [J]. STATIC ANALYSIS (SAS 2017), 2017, 10422 : 148 - 168
  • [38] ABOR: An Automatic Framework for Buffer Overflow Removal in C/C plus plus Programs
    Ding, Sun
    Tan, Hee Beng Kuan
    Zhang, Hongyu
    [J]. ENTERPRISE INFORMATION SYSTEMS, ICEIS 2014, 2015, 227 : 204 - 221
  • [39] HATI: Hardware Assisted Thread Isolation for Concurrent C/C plus plus Programs
    Santos, Juan Carlos Martinez
    Fei, Yunsi
    [J]. PROCEEDINGS OF 2014 IEEE INTERNATIONAL PARALLEL & DISTRIBUTED PROCESSING SYMPOSIUM WORKSHOPS (IPDPSW), 2014, : 322 - 331
  • [40] Automatic Test Generation for C and C plus plus Programs, Using Symbolic Execution
    Yoshida, Hiroaki
    Li, Guodong
    Kamiya, Takuki
    Ghosh, Indradeep
    Rajan, Sreeranga
    Tokumoto, Susumu
    Munakata, Kazuki
    Uehara, Tadahiro
    [J]. IEEE SOFTWARE, 2017, 34 (05) : 30 - 37