commit | 1b7ed91e44a8fdcb3217077204d60e7fc8d4561f | [log] [tgz] |
---|---|---|
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Thu Feb 27 04:11:59 2014 +0000 |
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Thu Feb 27 04:11:59 2014 +0000 |
tree | 22268eb650ebd65e801631b863d68ea4a3d6bd74 | |
parent | 08301dee468848e405d2a9c2ca08ad8af042be52 [diff] |
[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