[llvm-branch-commits] [cfe-branch] r115846 - /cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Daniel Dunbar daniel at zuster.org
Wed Oct 6 14:53:33 PDT 2010


Author: ddunbar
Date: Wed Oct  6 16:53:33 2010
New Revision: 115846

URL: http://llvm.org/viewvc/llvm-project?rev=115846&view=rev
Log:
Merge r115838:
--
Author: Douglas Gregor <dgregor at apple.com>
Date:   Wed Oct 6 21:11:08 2010 +0000

    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/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Modified: cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp?rev=115846&r1=115845&r2=115846&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp Wed Oct  6 16:53:33 2010
@@ -809,6 +809,7 @@
     PreprocessorOpts.DisablePCHValidation = true;
     PreprocessorOpts.ImplicitPCHInclude = PriorImplicitPCHInclude;
     delete OverrideMainBuffer;
+    SavedMainFileBuffer = 0;
   }
   
   Clang.takeSourceManager();





More information about the llvm-branch-commits mailing list