Skip to content
Snippets Groups Projects
  • Argyrios Kyrtzidis's avatar
    ff398965
    Introduce a flag in SourceManager to treat non-system source files · ff398965
    Argyrios Kyrtzidis authored
    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
    ff398965
    History
    Introduce a flag in SourceManager to treat non-system source files
    Argyrios Kyrtzidis authored
    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
Code owners
Assign users and groups as approvers for specific file changes. Learn more.