[PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).
    pierre gousseau via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Sep 18 08:38:24 PDT 2015
    
    
  
pgousseau added a comment.
In http://reviews.llvm.org/D12571#248464, @dcoughlin wrote:
> Here is a reduced test case:
Very useful thanks !
================
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.
----------------
dcoughlin wrote:
> Since this returns true on unknown, it should be "may".
Makes sense thanks !
================
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.
----------------
dcoughlin wrote:
> 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
> ```
Will have a look !
http://reviews.llvm.org/D12571
    
    
More information about the cfe-commits
mailing list