[PATCH] D146490: [Support] On Windows, ensure that UniqueID is really stable
Kadir Cetinkaya via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 02:32:11 PDT 2023
kadircet added a comment.
> To fix the issue, we keep the file handles open during the lifetime of their corresponding UniqueID instances. Since handles will live longer now, this requires particular attention when performing some file actions, such as file deletions.
I am a little worried about this in general (what happens if some part of LLVM is keeping a fs::file_status object around when something deep down is trying to delete a file?) but specifically from clang-tooling perspective, especially clangd (i'd expect lldb to have similar concerns).
Today clangd is a long-lived process and it keeps uniqueid's around for the headers included inside a translation unit pretty much indefinitely. What happens if someone outside tries to delete/modify a file while we're keeping handles for it around? (it's quite common for people to switch branches in their VCS while clangd is working on these files)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146490/new/
https://reviews.llvm.org/D146490
More information about the llvm-commits
mailing list