summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-02-22 18:41:01 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-02-22 18:41:01 +0000
commit956e6a0dc6146d9625fe58a20bdf16515b036505 (patch)
tree0c8852b3d5388ff763654624dadb13427083420b /clang/unittests/Basic/VirtualFileSystemTest.cpp
parentb8a91bbf0476e1b2c44520f56d131dfbdccb8237 (diff)
downloadbcm5719-llvm-956e6a0dc6146d9625fe58a20bdf16515b036505.tar.gz
bcm5719-llvm-956e6a0dc6146d9625fe58a20bdf16515b036505.zip
[VFS] Add support for handling path traversals
Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 llvm-svn: 261551
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud