[PATCH] D71433: [analyzer] CERT: POS34-C
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 08:10:36 PST 2020
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/cert/PutenvWithAutoChecker.cpp:57-58
+ bugreporter::trackExpressionValue(Report->getErrorNode(), ArgExpr, *Report);
+ } else if (const SymbolRef Sym =
+ ArgV.getAsSymbol()) { // It is a `HeapSpaceRegion`
+ Report->addVisitor(allocation_state::getMallocBRVisitor(Sym));
----------------
This is impossible because `StackSpaceRegion` and `HeapSpaceRegion` do not overlap and above you checked that it's the former.
================
Comment at: clang/test/Analysis/cert/pos34-c.cpp:6
+// Examples from the CERT rule's page.
+// https://wiki.sei.cmu.edu/confluence/display/c/POS34-C.+Do+not+call+putenv%28%29+with+a+pointer+to+an+automatic+variable+as+the+argument
+
----------------
Btw - CERT has minified links!
{F11286962}
{F11286963}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71433/new/
https://reviews.llvm.org/D71433
More information about the cfe-commits
mailing list