[cfe-commits] [Patch] Fix use after free in AnalysisConsumer::HandleTranslationUnit
Dmitri Gribenko
gribozavr at gmail.com
Fri Jan 6 18:26:34 PST 2012
Hello,
The attached patch fixes a use-after-free in
AnalysisConsumer::HandleTranslationUnit. The problem is that
BugReporter's destructor runs after AnalysisManager has been already
deleted. The fix introduces a scope to force correct destruction
order.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-use-after-free-AnalysisConsumer.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120107/275d189b/attachment.bin>
More information about the cfe-commits
mailing list