diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-27 21:19:33 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-27 21:19:33 +0000 |
commit | 5337efc69cdd59950faf0579043eb7aa8b9a3f2e (patch) | |
tree | 9d88ce04723033e99770a888d0e2023c34075fcc /lld/README.md | |
parent | dff5a44f29f758f7e02783f16686cdd93ddc21a7 (diff) | |
download | bcm5719-llvm-5337efc69cdd59950faf0579043eb7aa8b9a3f2e.tar.gz bcm5719-llvm-5337efc69cdd59950faf0579043eb7aa8b9a3f2e.zip |
[analyzer] MallocChecker: Suppress false positives in shared pointers.
Throw away MallocChecker warnings that occur after releasing a pointer within a
destructor (or its callees) after performing C11 atomic fetch_add or fetch_sub
within that destructor (or its callees).
This is an indication that the destructor's class is likely a
reference-counting pointer. The analyzer is not able to understand that the
original reference count is usually large enough to avoid most use-after-frees.
Even when the smart pointer is a local variable, we still have these false
positives that this patch suppresses, because the analyzer doesn't currently
support atomics well enough.
Differential Revision: https://reviews.llvm.org/D43791
llvm-svn: 326249
Diffstat (limited to 'lld/README.md')
0 files changed, 0 insertions, 0 deletions