[PATCH] D34260: [StaticAnalyzer] Completely unrolling specific loops with known bound option

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 01:29:53 PDT 2017


NoQ added a comment.

> I suspect that the usage of the CFGStmtMap* caused the undefined behaviour since its lifetime was depending on its LocationContext.

Yeah, it lives in `AnalysisDeclContextManager`, which lives in `AnalysisManager`, which lives throughout a single analysis (top-level function) and then dies (when the next top-level function is picked that wasn't covered during inlining) to clean up the allocators.

However, you store it in the program state, right? And the new analysis has new program states, which don't contain references to the old `CFGStmtMaps`(?)

Also the way you construct `CFGStmtMap` manually sounds slow to me (it's done on every path), i guess the whole point of having it in `AnalysisDeclContext` was to avoid this.

So i don't think this is it, but i guess you should try speculatively relanding anyway, and add the extra run-line that'd show you the backtrace. We made changes, so the issue might have been wiped out accidentally (or maybe you're actually right!), and if it wasn't, at least we'd have the backtrace for the crash.


https://reviews.llvm.org/D34260





More information about the cfe-commits mailing list