Skip to content
Snippets Groups Projects
  • Argyrios Kyrtzidis's avatar
    a4c29b6e
    [PCH] Recover gracefully if the ASTReader detects that a file is different · a4c29b6e
    Argyrios Kyrtzidis authored
    from the one stored in the PCH/AST, while trying to load a SLocEntry.
    
    We verify that all files of the PCH did not change before loading it but this is not enough because:
    
    - The AST may have been 1) kept around, 2) to do queries on it.
    - We may have 1) verified the PCH and 2) started parsing.
    
    Between 1) and 2) files may change and we are going to have crashes because the rest of clang
    cannot deal with the ASTReader failing to read a SLocEntry.
    
    Handle this by recovering gracefully in such a case, by initializing the SLocEntry
    with the info from the PCH/AST as well as reporting failure by the ASTReader.
    
    rdar://10888929
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151004 91177308-0d34-0410-b5e6-96231b3b80d8
    a4c29b6e
    History
    [PCH] Recover gracefully if the ASTReader detects that a file is different
    Argyrios Kyrtzidis authored
    from the one stored in the PCH/AST, while trying to load a SLocEntry.
    
    We verify that all files of the PCH did not change before loading it but this is not enough because:
    
    - The AST may have been 1) kept around, 2) to do queries on it.
    - We may have 1) verified the PCH and 2) started parsing.
    
    Between 1) and 2) files may change and we are going to have crashes because the rest of clang
    cannot deal with the ASTReader failing to read a SLocEntry.
    
    Handle this by recovering gracefully in such a case, by initializing the SLocEntry
    with the info from the PCH/AST as well as reporting failure by the ASTReader.
    
    rdar://10888929
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151004 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.