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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to