Skip to content

clang-tidy crash with "LLVM ERROR: Cannot chdir into <sourcefile>" #163415

@diemoschwarz

Description

@diemoschwarz

Trying to follow the instructions here, the error message says cannot chdir into a file(!?)

%/opt/homebrew/Cellar/llvm/21.1.3/bin/clang-tidy -p ../build/xcode/ $PWD/src/maxmubu.c
Error while processing /Users/schwarz/src/mubu-git/maxmubu/src/maxmubu.c.
LLVM ERROR: Cannot chdir into "/Users/schwarz/src/mubu-git/maxmubu/src/imubudatagui.c"!
PLEASE submit a bug report to https://github.com/Homebrew/homebrew-core/issues and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/homebrew/Cellar/llvm/21.1.3/bin/clang-tidy -p /Users/schwarz/src/mubu-git/build/xcode /Users/schwarz/src/mubu-git/maxmubu/src/maxmubu.c
 #0 0x0000000116cb36dc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/homebrew/Cellar/llvm/21.1.3/lib/libLLVM.dylib+0x3dff6dc)
 #1 0x0000000116cb3f20 SignalHandler(int, __siginfo*, void*) (/opt/homebrew/Cellar/llvm/21.1.3/lib/libLLVM.dylib+0x3dfff20)
 #2 0x0000000190f516a4 (/usr/lib/system/libsystem_platform.dylib+0x1804ad6a4)
 #3 0x0000000190f1788c (/usr/lib/system/libsystem_pthread.dylib+0x18047388c)
 #4 0x0000000190e20a3c (/usr/lib/system/libsystem_c.dylib+0x18037ca3c)
 #5 0x0000000112f31d48 write_retry(int, char const*, unsigned long) (/opt/homebrew/Cellar/llvm/21.1.3/lib/libLLVM.dylib+0x7dd48)
 #6 0x00000001078375e8 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/opt/homebrew/Cellar/llvm/21.1.3/lib/libclang-cpp.dylib+0x1ac75e8)
 #7 0x0000000100d775d8 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, bool, llvm::StringRef) (/opt/homebrew/Cellar/llvm/21.1.3/bin/clang-tidy+0x1000035d8)
 #8 0x0000000100da3560 clang::tidy::clangTidyMain(int, char const**) (/opt/homebrew/Cellar/llvm/21.1.3/bin/clang-tidy+0x10002f560)
 #9 0x0000000190b76b98
Abort

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidycrashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions