[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 23:05:47 PDT 2017


zaks.anna added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652
+  } else if (StoreSite->getLocation().getAs<BlockEntrance>()) {
+    os << "Reach the max loop limit.";
+    os << " Assigning a conjured symbol";
+    if (R->canPrintPretty()) {
----------------
MTC wrote:
> NoQ wrote:
> > This is user-facing text, and users shouldn't know about conjured symbols, and "max" shouldn't be shortened, and i'm not sure what else. I'd probably suggest something along the lines of "Contents of <...> are wiped", but this is still not good enough.
> > 
> > Also could you add a test that displays this note? I.e. with `-analyzer-output=text`.
> Thanks for your review. 
> 
> You are right, whether this information should be displayed to the user is a question worth discussing.
I am not convinced that we need to print this information to the user. The problem here is that it leaks internal implementation details about the analyzer. The users should not know about "loop limits" and "invalidation" and most of the users would not even know what this means. I can see how this is useful to the analyzer developers for debugging the analyzer, but not to the end user.



https://reviews.llvm.org/D37187





More information about the cfe-commits mailing list