]> granicus.if.org Git - clang/commit
Make FileEntry::getName() valid across calls to FileManager::getFile()
authorBen Langmuir <blangmuir@apple.com>
Mon, 8 Sep 2014 16:15:54 +0000 (16:15 +0000)
committerBen Langmuir <blangmuir@apple.com>
Mon, 8 Sep 2014 16:15:54 +0000 (16:15 +0000)
commit1c7a745052faa6a061da27a49dc4c057361217d1
tree2ef3b763d5e944c28928ae841075c96732b19712
parent1c96effad3b4d0fb61a30eefb8775aa8d14f92c4
Make FileEntry::getName() valid across calls to FileManager::getFile()

Because we may change the name of a FileEntry inside getFile, the name
returned by FileEntry::getName() could be destroyed.  This was causing a
use-after-free when searching the HeaderFileInfo on-disk hashtable for a
module or pch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217385 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/FileManager.h
lib/Basic/FileManager.cpp