[PATCH] D51641: [VFS] Cache the current working directory for the real FS.
Pavel Labath via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 10 07:43:21 PST 2019
labath added a comment.
In D51641#1352782 <https://reviews.llvm.org/D51641#1352782>, @sammccall wrote:
> > In fact, it still happens now, because the VFS is so bad at having a local CWD. So, the only reason we actually discovered this was because VFS->getCurrentWorkingDirectory returned an empty string if a it's CWD has never been set. This later translated to a null pointer and a crash.
>
> (Hmm, `RealFileSystem::getCurrentWorkingDirectory shouldn't return empty unless `fs::current_path()` does. But certainly here be dragons)
My bad. After re-reading the original report it seems that happened was that we got a stale CWD, then went to search for a file that we expected to be there (but it wasn't, because we were searching in the wrong place), and *then* we crashed. :)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51641/new/
https://reviews.llvm.org/D51641
More information about the cfe-commits
mailing list