diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-07-11 20:59:04 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-07-11 20:59:04 +0000 |
commit | ff398965a5abfaf5bc47bc022876f56a28e5b9a7 (patch) | |
tree | ae3e8d01cc8359f810150ccf2ad37075a40165c8 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 4b49756fdc066688e30f6ca69feffd5f7686cb1b (diff) |
Introduce a flag in SourceManager to treat non-system source files
as "volatile", meaning there's a high enough chance that they may
change while we are trying to use them.
This flag is only enabled by libclang.
Currently "volatile" source files will be stat'ed immediately
before opening them, because the file size stat info
may not be accurate since when we got it (e.g. from the PCH).
This avoids crashes when trying to reference mmap'ed memory
from a file whose size is not what we expect.
Note that there's still a window for a racing issue to occur
but the window for it should be way smaller than before.
We can consider later on to avoid mmap completely on such files.
rdar://11612916
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
0 files changed, 0 insertions, 0 deletions