[cfe-commits] r115838 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Douglas Gregor
dgregor at apple.com
Wed Oct 6 14:11:08 PDT 2010
Author: dgregor
Date: Wed Oct 6 16:11:08 2010
New Revision: 115838
URL: http://llvm.org/viewvc/llvm-project?rev=115838&view=rev
Log:
Fix a double-free error that can occur in rare cases where loading
of the precompiled preamble (or any PCH file it depends on) fails
during reparsing.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=115838&r1=115837&r2=115838&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Oct 6 16:11:08 2010
@@ -798,6 +798,7 @@
PreprocessorOpts.DisablePCHValidation = true;
PreprocessorOpts.ImplicitPCHInclude = PriorImplicitPCHInclude;
delete OverrideMainBuffer;
+ SavedMainFileBuffer = 0;
}
Clang.takeSourceManager();
More information about the cfe-commits
mailing list