[PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).
Devin Coughlin via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 18:41:57 PDT 2015
dcoughlin added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:198
@@ +197,3 @@
+
+ // Return true if the destination buffer of the copy function must/may be in
+ // bound.
----------------
Since this returns true on unknown, it should be "may".
================
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1109
@@ +1108,3 @@
+ }
+ if (RO.getOffset() < 0) {
+ // FIXME: should be an assert but this does occur on private build bots.
----------------
I think it is important to figure out enough of why the assert was triggering so that we can add a test case for this 'if'. The preprocessed file that is failing our bots is from the bugzilla for PR13765, in the [[https://llvm.org/bugs/attachment.cgi?id=9155 | clang2 attachment ]].
You can reproduce with:
```
clang -cc1 -analyze -analyzer-checker=core,cplusplus -fcxx-exceptions -std=c++11 clang2/clang_crash_4pFspw.ii
```
http://reviews.llvm.org/D12571
More information about the cfe-commits
mailing list