******************** FAIL: Clang :: VFS/relative-path.c (9804 of 26380) ******************** TEST 'Clang :: VFS/relative-path.c' FAILED ******************** Script: -- mkdir -p /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp cd /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp sed -e "s:INPUT_DIR:/Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/Inputs:g" -e "s:OUT_DIR:/Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp:g" /Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/Inputs/vfsoverlay.yaml > /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp.yaml /Users/bogner/build/llvm-san/./bin/clang -cc1 -internal-isystem /Volumes/NewYork/bogner/build/llvm-san/bin/../lib/clang/3.9.0/include -nostdsysteminc -Werror -I . -ivfsoverlay /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp.yaml -fsyntax-only /Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/relative-path.c -- Exit Code: 134 Command Output (stderr): -- ================================================================= ==77391==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700000a580 at pc 0x00011668488f bp 0x7fff5a4930f0 sp 0x7fff5a4928a8 READ of size 77 at 0x60700000a580 thread T0 #0 0x11668488e in wrap_memmove asan_interceptors.cc:445 #1 0x7fff8ad36224 in std::__1::basic_string, std::__1::allocator >::__init(char const*, unsigned long) (libc++.1.dylib+0x3f224) #2 0x10576eb20 in llvm::StringRef::str() const string:2076 #3 0x108dc4007 in clang::FileManager::getFile(llvm::StringRef, bool, bool) FileManager.cpp:317 #4 0x10cbf5d53 in clang::HeaderSearch::getFileAndSuggestModule(llvm::StringRef, clang::SourceLocation, clang::DirectoryEntry const*, bool, clang::Module*, clang::ModuleMap::KnownHeader*) HeaderSearch.cpp:258 #5 0x10cbf64d5 in clang::DirectoryLookup::LookupFile(llvm::StringRef&, clang::HeaderSearch&, clang::SourceLocation, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool&, bool&, llvm::SmallVectorImpl&) const HeaderSearch.cpp:302 #6 0x10cbf96d2 in clang::HeaderSearch::LookupFile(llvm::StringRef, clang::SourceLocation, bool, clang::DirectoryLookup const*, clang::DirectoryLookup const*&, llvm::ArrayRef >, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool, bool) HeaderSearch.cpp:717 #7 0x10cca475e in clang::Preprocessor::LookupFile(clang::SourceLocation, llvm::StringRef, bool, clang::DirectoryLookup const*, clang::FileEntry const*, clang::DirectoryLookup const*&, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::ModuleMap::KnownHeader*, bool) PPDirectives.cpp:742 #8 0x10ccab04a in clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::DirectoryLookup const*, clang::FileEntry const*, bool) PPDirectives.cpp:1709 #9 0x10cca603a in clang::Preprocessor::HandleDirective(clang::Token&) PPDirectives.cpp:913 #10 0x10cc2b042 in clang::Lexer::LexTokenInternal(clang::Token&, bool) Lexer.cpp:3671 #11 0x10cd34636 in clang::Preprocessor::Lex(clang::Token&) Preprocessor.cpp:728 #12 0x10ab0567a in clang::Parser::ConsumeToken() Parser.h:295 #13 0x10a9bed0d in clang::ParseAST(clang::Sema&, bool, bool) ParseAST.cpp:139 #14 0x10990fbca in clang::FrontendAction::Execute() FrontendAction.cpp:457 #15 0x10985a498 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) CompilerInstance.cpp:876 #16 0x1099c1e73 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ExecuteCompilerInvocation.cpp:241 #17 0x105773f3f in cc1_main(llvm::ArrayRef, char const*, void*) cc1_main.cpp:116 #18 0x10576b806 in main driver.cpp:301 #19 0x7fff9b1545ac in start (libdyld.dylib+0x35ac) #20 0xb () 0x60700000a580 is located 0 bytes inside of 80-byte region [0x60700000a580,0x60700000a5d0) freed by thread T0 here: #0 0x116699e0b in wrap__ZdlPv asan_new_delete.cc:121 #1 0x108ed6759 in clang::vfs::File::getName() VirtualFileSystem.h:33 #2 0x108dc3fba in clang::FileManager::getFile(llvm::StringRef, bool, bool) FileManager.cpp:316 #3 0x10cbf5d53 in clang::HeaderSearch::getFileAndSuggestModule(llvm::StringRef, clang::SourceLocation, clang::DirectoryEntry const*, bool, clang::Module*, clang::ModuleMap::KnownHeader*) HeaderSearch.cpp:258 #4 0x10cbf64d5 in clang::DirectoryLookup::LookupFile(llvm::StringRef&, clang::HeaderSearch&, clang::SourceLocation, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool&, bool&, llvm::SmallVectorImpl&) const HeaderSearch.cpp:302 #5 0x10cbf96d2 in clang::HeaderSearch::LookupFile(llvm::StringRef, clang::SourceLocation, bool, clang::DirectoryLookup const*, clang::DirectoryLookup const*&, llvm::ArrayRef >, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool, bool) HeaderSearch.cpp:717 #6 0x10cca475e in clang::Preprocessor::LookupFile(clang::SourceLocation, llvm::StringRef, bool, clang::DirectoryLookup const*, clang::FileEntry const*, clang::DirectoryLookup const*&, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::ModuleMap::KnownHeader*, bool) PPDirectives.cpp:742 #7 0x10ccab04a in clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::DirectoryLookup const*, clang::FileEntry const*, bool) PPDirectives.cpp:1709 #8 0x10cca603a in clang::Preprocessor::HandleDirective(clang::Token&) PPDirectives.cpp:913 #9 0x10cc2b042 in clang::Lexer::LexTokenInternal(clang::Token&, bool) Lexer.cpp:3671 #10 0x10cd34636 in clang::Preprocessor::Lex(clang::Token&) Preprocessor.cpp:728 #11 0x10ab0567a in clang::Parser::ConsumeToken() Parser.h:295 #12 0x10a9bed0d in clang::ParseAST(clang::Sema&, bool, bool) ParseAST.cpp:139 #13 0x10990fbca in clang::FrontendAction::Execute() FrontendAction.cpp:457 #14 0x10985a498 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) CompilerInstance.cpp:876 #15 0x1099c1e73 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ExecuteCompilerInvocation.cpp:241 #16 0x105773f3f in cc1_main(llvm::ArrayRef, char const*, void*) cc1_main.cpp:116 #17 0x10576b806 in main driver.cpp:301 #18 0x7fff9b1545ac in start (libdyld.dylib+0x35ac) #19 0xb () previously allocated by thread T0 here: #0 0x11669984b in wrap__Znwm asan_new_delete.cc:74 #1 0x7fff8ad36204 in std::__1::basic_string, std::__1::allocator >::__init(char const*, unsigned long) (libc++.1.dylib+0x3f204) #2 0x108ed92f9 in llvm::ErrorOr::ErrorOr(clang::vfs::Status&&&, std::__1::enable_if::value, void>::type*) VirtualFileSystem.h:33 #3 0x108ee17a7 in (anonymous namespace)::FileWithFixedStatus::status() ErrorOr.h:100 #4 0x108ed65ee in clang::vfs::File::getName() VirtualFileSystem.h:96 #5 0x108dc3fba in clang::FileManager::getFile(llvm::StringRef, bool, bool) FileManager.cpp:316 #6 0x10cbf5d53 in clang::HeaderSearch::getFileAndSuggestModule(llvm::StringRef, clang::SourceLocation, clang::DirectoryEntry const*, bool, clang::Module*, clang::ModuleMap::KnownHeader*) HeaderSearch.cpp:258 #7 0x10cbf64d5 in clang::DirectoryLookup::LookupFile(llvm::StringRef&, clang::HeaderSearch&, clang::SourceLocation, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool&, bool&, llvm::SmallVectorImpl&) const HeaderSearch.cpp:302 #8 0x10cbf96d2 in clang::HeaderSearch::LookupFile(llvm::StringRef, clang::SourceLocation, bool, clang::DirectoryLookup const*, clang::DirectoryLookup const*&, llvm::ArrayRef >, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::Module*, clang::ModuleMap::KnownHeader*, bool, bool) HeaderSearch.cpp:717 #9 0x10cca475e in clang::Preprocessor::LookupFile(clang::SourceLocation, llvm::StringRef, bool, clang::DirectoryLookup const*, clang::FileEntry const*, clang::DirectoryLookup const*&, llvm::SmallVectorImpl*, llvm::SmallVectorImpl*, clang::ModuleMap::KnownHeader*, bool) PPDirectives.cpp:742 #10 0x10ccab04a in clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::DirectoryLookup const*, clang::FileEntry const*, bool) PPDirectives.cpp:1709 #11 0x10cca603a in clang::Preprocessor::HandleDirective(clang::Token&) PPDirectives.cpp:913 #12 0x10cc2b042 in clang::Lexer::LexTokenInternal(clang::Token&, bool) Lexer.cpp:3671 #13 0x10cd34636 in clang::Preprocessor::Lex(clang::Token&) Preprocessor.cpp:728 #14 0x10ab0567a in clang::Parser::ConsumeToken() Parser.h:295 #15 0x10a9bed0d in clang::ParseAST(clang::Sema&, bool, bool) ParseAST.cpp:139 #16 0x10990fbca in clang::FrontendAction::Execute() FrontendAction.cpp:457 #17 0x10985a498 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) CompilerInstance.cpp:876 #18 0x1099c1e73 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ExecuteCompilerInvocation.cpp:241 #19 0x105773f3f in cc1_main(llvm::ArrayRef, char const*, void*) cc1_main.cpp:116 #20 0x10576b806 in main driver.cpp:301 #21 0x7fff9b1545ac in start (libdyld.dylib+0x35ac) #22 0xb () SUMMARY: AddressSanitizer: heap-use-after-free asan_interceptors.cc:445 in wrap_memmove Shadow bytes around the buggy address: 0x1c0e00001460: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e00001470: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e00001480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e00001490: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e000014a0: fa fa 00 00 00 00 00 00 00 00 00 00 fa fa fa fa =>0x1c0e000014b0:[fd]fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd 0x1c0e000014c0: fd fd fd fd fd fd fd fd fa fa fa fa 00 00 00 00 0x1c0e000014d0: 00 00 00 00 00 00 fa fa fa fa fd fd fd fd fd fd 0x1c0e000014e0: fd fd fd fd fa fa fa fa 00 00 00 00 00 00 00 00 0x1c0e000014f0: 00 00 fa fa fa fa fd fd fd fd fd fd fd fd fd fd 0x1c0e00001500: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==77391==ABORTING Stack dump: 0. Program arguments: /Users/bogner/build/llvm-san/./bin/clang -cc1 -internal-isystem /Volumes/NewYork/bogner/build/llvm-san/bin/../lib/clang/3.9.0/include -nostdsysteminc -Werror -I . -ivfsoverlay /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp.yaml -fsyntax-only /Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/relative-path.c 1. /Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/relative-path.c:7:2: current parser token 'include' /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.script: line 4: 77391 Abort trap: 6 /Users/bogner/build/llvm-san/./bin/clang -cc1 -internal-isystem /Volumes/NewYork/bogner/build/llvm-san/bin/../lib/clang/3.9.0/include -nostdsysteminc -Werror -I . -ivfsoverlay /Volumes/NewYork/bogner/build/llvm-san/tools/clang/test/VFS/Output/relative-path.c.tmp.yaml -fsyntax-only /Volumes/NewYork/bogner/code/llvm/tools/clang/test/VFS/relative-path.c