[PATCH] D70596: [analyzer][docs] NFC: Extend documentation for MallocOverflow checker
Borsik Gábor via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 23 12:00:45 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG79e2325f145d: [analyzer][docs] NFC: Extend documentation for MallocOverflow checker (authored by boga95).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70596/new/
https://reviews.llvm.org/D70596
Files:
clang/docs/analyzer/checkers.rst
Index: clang/docs/analyzer/checkers.rst
===================================================================
--- clang/docs/analyzer/checkers.rst
+++ clang/docs/analyzer/checkers.rst
@@ -1974,6 +1974,12 @@
void *p = malloc(n * sizeof(int)); // warn
}
+ void test2(int n) {
+ if (n > 100) // gives an upper-bound
+ return;
+ void *p = malloc(n * sizeof(int)); // no warning
+ }
+
.. _alpha-security-MmapWriteExec:
alpha.security.MmapWriteExec (C)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70596.230773.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191123/2529d0c3/attachment.bin>
More information about the cfe-commits
mailing list