Open Quuxplusone opened 3 years ago
sc.tar.bz2
Created attachment 23943 sanitize-coverage-83133f.{c,sh} reproducer There's only a single testsuite failure on The Solaris/sparcv9 buildbot left: ******************** TEST 'Clang :: CodeGen/sanitize-coverage.c' FAILED ******************** Pass 'Run-time bounds checking' is not initialized. Verify if there is a pass dependency cycle. Required Passes: Target Library Information Assertion failed: PI && "Expected required passes to be initialized", file /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11- sparcv9/llvm/llvm/lib/IR/LegacyPassManager.cpp, line 789, function schedulePass PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11- sparcv9/stage1/bin/clang /opt/llvm-buildbot/home/solaris11-sparcv9/clang- solaris11-sparcv9/llvm/clang/test/CodeGen/sanitize-coverage.c -target x86_64- unknown-linux-gnu -emit-llvm -S -fsanitize=bounds -fsanitize-coverage=trace- pc,trace-cmp -o - 1. <eof> parser at end of file 0 clang-12 0x00000001027fad84 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 28 1 clang-12 0x00000001027fb13c PrintStackTraceSignalHandler(void*) + 12 2 clang-12 0x00000001027f9a9c llvm::sys::RunSignalHandlers() + 68 3 clang-12 0x00000001027fa63c llvm::sys::CleanupOnSignal(unsigned long) + 168 4 clang-12 0x000000010276b600 CrashRecoverySignalHandler(int) + 404 5 libc.so.1 0x00007fffff0dc7a0 __sighndlr + 12 6 libc.so.1 0x00007fffff0cf1dc call_user_handler + 852 7 libc.so.1 0x00007fffff0cf534 sigacthandler + 84 8 libc.so.1 0x00007fffff0e1600 __lwp_sigqueue + 8 9 libc.so.1 0x00007ffffeff9f3c abort + 180 10 libc.so.1 0x00007ffffeffb014 _assert_c99 + 108 11 clang-12 0x000000010206a0a4 llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 2116 12 clang-12 0x000000010206a0d8 llvm::legacy::PassManager::add(llvm::Pass*) + 12 13 clang-12 0x0000000102acd2dc addBoundsCheckingPass(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) + 20 14 clang-12 0x0000000102acbffc std::_Function_handler<void (llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&), void (*)(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&)>::_M_invoke(std::_Any_data const&, llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) + 12 15 clang-12 0x0000000103b0cb6c std::function<void (llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&)>::operator()(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) const + 24 16 clang-12 0x0000000103b0ccc0 llvm::PassManagerBuilder::addExtensionsToPM(llvm::PassManagerBuilder::ExtensionPointTy, llvm::legacy::PassManagerBase&) const + 312 17 clang-12 0x0000000103b0e490 llvm::PassManagerBuilder::populateModulePassManager(llvm::legacy::PassManagerBase&) + 2256 18 clang-12 0x0000000102ae7cf4 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) + 4936 19 clang-12 0x0000000102aeab08 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) + 9844 20 clang-12 0x00000001038f0ccc clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1856 21 clang-12 0x0000000104800054 clang::ParseAST(clang::Sema&, bool, bool) + 864 22 clang-12 0x00000001031d18e8 clang::ASTFrontendAction::ExecuteAction() + 116 23 clang-12 0x00000001038f053c clang::CodeGenAction::ExecuteAction() + 3732 24 clang-12 0x00000001031d45d4 clang::FrontendAction::Execute() + 572 25 clang-12 0x0000000103188cac clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 2356 26 clang-12 0x00000001032be7bc clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2380 27 clang-12 0x00000001016a4ac4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2592 28 clang-12 0x000000010169dc14 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 540 29 clang-12 0x000000010303e498 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) + 16 30 clang-12 0x000000010276b78c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 236 31 clang-12 0x00000001030402dc clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const + 356 32 clang-12 0x0000000103014df0 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const + 156 33 clang-12 0x00000001030155b0 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const + 184 34 clang-12 0x0000000103021b40 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) + 124 35 clang-12 0x00000001016a2730 main + 11800 36 clang-12 0x000000010169d7a4 _start + 100 clang-12: error: clang frontend command failed due to signal (use -v to see invocation) clang version 12.0.0 (/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11- sparcv9/llvm/clang 1d01fc100bb5bef5f5eaf92520b2e52f64ee1d6e) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11- sparcv9/stage1/bin clang-12: note: diagnostic msg: Strangely the failure only happens on the buildbot; I've not yet succeeded to reproduce it on other systems, and since it's a Release build, it's almost impossible to do any useful debugging. It doesn't seem to be a generic Solaris issue (the Solaris/amd64 bot isn't affected). Note that the sparcv9 bot is running with -DLLVM_TARGETS_TO_BUILD=Sparc, but that doesn't seem to be the issue either since other bots are targetting non-x86 cpus, too, and don't show that failure. I'm attaching the reproducer. I'm totally at a loss what may be going on here and how to proceed. Any guidance is appreciated.
Attached sc.tar.bz2 (1476 bytes, application/x-bzip): sanitize-coverage-83133f.{c,sh} reproducer
sc.tar.bz2
(1476 bytes, application/x-bzip)