[PATCH] D47135: [analyzer][WIP] A checker for dangling string pointers in C++

Reka Kovacs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 21 04:47:10 PDT 2018


rnkovacs created this revision.
rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov.
Herald added subscribers: a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity, mgorny.

This check marks a raw pointer to a C++ string object's inner buffer "released"
when the object itself is destroyed. This information can be used by MallocChecker
to warn for use-after-free problems.

Test cases using mocks are to be added. Until then, the following file is
used for testing purposes: <<tests.cpp>>.


Repository:
  rC Clang

https://reviews.llvm.org/D47135

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/DanglingStringPointerChecker.cpp
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Checkers/RegionState.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47135.147764.patch
Type: text/x-patch
Size: 6483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180521/1cc36f58/attachment.bin>


More information about the cfe-commits mailing list