llvm-project/clang/lib/Frontend
Argyrios Kyrtzidis 1b7ed91e44 [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().
With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs that have been disposed.

Fix this by having the CompilerInstance object keep a reference to the ASTReader
as well as having the ASTContext keep reference to the ExternalASTSource.

This was very difficult to construct a test case for.
rdar://16149782

llvm-svn: 202346
2014-02-27 04:11:59 +00:00
..
ASTConsumers.cpp Remove -ast-dump-xml. 2013-10-07 20:56:34 +00:00
ASTMerge.cpp When building a module, forward diagnostics to the outer diagnostic consumer. 2013-05-03 22:58:43 +00:00
ASTUnit.cpp [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble(). 2014-02-27 04:11:59 +00:00
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
CacheTokens.cpp Recommit virtual file system 2014-02-20 21:59:23 +00:00
ChainedDiagnosticConsumer.cpp Remove spurious mode marker from .cpp file. 2012-10-29 06:05:01 +00:00
ChainedIncludesSource.cpp [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble(). 2014-02-27 04:11:59 +00:00
CompilerInstance.cpp [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble(). 2014-02-27 04:11:59 +00:00
CompilerInvocation.cpp Add a driver option -ivfsoverlay 2014-02-25 18:23:47 +00:00
CreateInvocationFromCommandLine.cpp Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print. 2013-09-12 18:23:34 +00:00
DependencyFile.cpp Update for llvm api change. 2014-02-24 18:20:21 +00:00
DependencyGraph.cpp Update for llvm api change. 2014-02-24 18:20:21 +00:00
DiagnosticRenderer.cpp Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None 2013-05-05 00:41:58 +00:00
FrontendAction.cpp [ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble(). 2014-02-27 04:11:59 +00:00
FrontendActions.cpp Update for llvm api change. 2014-02-24 18:20:21 +00:00
FrontendOptions.cpp Remove duplicated case. 2013-06-22 16:44:45 +00:00
HeaderIncludeGen.cpp Update for llvm api change. 2014-02-24 18:20:21 +00:00
InitHeaderSearch.cpp With the new update to the ABI, we should not look for installations 2013-12-12 20:30:41 +00:00
InitPreprocessor.cpp Update __cplusplus to match the value in the C++14 DIS preview (D3937). 2014-02-24 01:35:45 +00:00
LangStandards.cpp Remove unnecessary default cases in switches over enums. 2012-01-17 02:30:50 +00:00
LayoutOverrideSource.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
LogDiagnosticPrinter.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
Makefile
MultiplexConsumer.cpp Note when a decl is used in AST files. 2013-09-05 00:02:25 +00:00
PrintPreprocessedOutput.cpp If preprocessing results in a token with leading whitespace that was expanded 2014-02-24 20:50:36 +00:00
SerializedDiagnosticPrinter.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
TextDiagnostic.cpp clang-cl: print diagnostics as "error(clang): foo" in /fallback mode 2013-09-24 00:08:55 +00:00
TextDiagnosticBuffer.cpp TextDiagnosticBuffer: Fix copy-paste mistake in r197856 2013-12-23 07:47:48 +00:00
TextDiagnosticPrinter.cpp clang-cl: print diagnostics as "error(clang): foo" in /fallback mode 2013-09-24 00:08:55 +00:00
VerifyDiagnosticConsumer.cpp Revert "Don't require -re suffix on -verify directives with regexes." 2013-12-14 01:07:05 +00:00
Warnings.cpp Revert r177218. 2013-05-03 23:20:27 +00:00