Closed
Description
testcase:
# 1 "<built-in>"
void a(){
#pragma omp dispatch
a();
}
https://godbolt.org/z/G5vqKvW1r
Program arguments: clang -fopenmp -c -emit-llvm -Xclang -disable-llvm-passes
Stack dump:
#0 0x00000000020c39e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/Unix/Signals.inc:602:13
#1 0x00000000020c1b50 llvm::sys::RunSignalHandlers() /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/Signals.cpp:105:18
#2 0x00000000020c30fd llvm::sys::CleanupOnSignal(unsigned long) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
#3 0x0000000002047a48 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
#4 0x0000000002047a48 CrashRecoverySignalHandler(int) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
#5 0x00007f5ad38fc8c0 __restore_rt (/lib64/libpthread.so.0+0x168c0)
#6 0x00007f5ad235ccbb raise (/lib64/libc.so.6+0x4acbb)
#7 0x00007f5ad235e355 abort (/lib64/libc.so.6+0x4c355)
#8 0x000000000204d881 (/autofs/nccs-svm1_sw/frontier/ums/ums012/llvm/17.0.0-20230713/bin/clang-17+0x204d881)
#9 0x0000000002318878 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CGStmt.cpp:324:5
#10 0x00000000023240cc clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CGStmt.cpp:505:22
#11 0x000000000238c630 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:0:5
#12 0x000000000238d244 clang::CodeGen::CodeGenFunction::getLangOpts() const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenFunction.h:2003:51
#13 0x000000000238d244 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1467:7
#14 0x00000000023b34dd clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:5656:3
#15 0x00000000023ab9cd clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:0:12
#16 0x000000000239e0e0 __gnu_cxx::__normal_iterator<clang::CXXRecordDecl const* const*, std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl const*>>>::__normal_iterator(clang::CXXRecordDecl const* const* const&) /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_iterator.h:783:20
#17 0x000000000239e0e0 std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl const*>>::begin() const /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_vector.h:573:16
#18 0x000000000239e0e0 std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl const*>>::empty() const /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_vector.h:760:16
#19 0x000000000239e0e0 clang::CodeGen::CodeGenModule::EmitDeferred() /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:3053:26
#20 0x000000000239bc8b clang::CodeGen::CodeGenModule::Release() /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:760:3
#21 0x00000000030b5ff8 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:291:11
#22 0x00000000030b281e clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:313:13
#23 0x0000000003e50fe4 __gnu_cxx::__normal_iterator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>*, std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>::__normal_iterator(std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>* const&) /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_iterator.h:783:20
#24 0x0000000003e50fe4 std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>::begin() /usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_vector.h:564:16
#25 0x0000000003e50fe4 void clang::finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>(std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>&, clang::Sema const&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#26 0x0000000003e50fe4 clang::ParseAST(clang::Sema&, bool, bool) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Parse/ParseAST.cpp:183:3
#27 0x00000000029f2f81 clang::FrontendAction::Execute() /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1062:10
#28 0x000000000296b87f llvm::Error::getPtr() const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/include/llvm/Support/Error.h:272:42
#29 0x000000000296b87f llvm::Error::operator bool() /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/include/llvm/Support/Error.h:235:16
#30 0x000000000296b87f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1049:23
#31 0x0000000002ab4d62 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:272:25
#32 0x0000000000af2e3d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/tools/driver/cc1_main.cpp:249:15
#33 0x0000000000aeec5a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/tools/driver/driver.cpp:366:12
#34 0x0000000002810389 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_1::operator()() const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Driver/Job.cpp:440:30
#35 0x0000000002810389 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_1>(long) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#36 0x0000000002047788 llvm::function_ref<void ()>::operator()() const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
#37 0x0000000002047788 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:426:3
#38 0x000000000280fc80 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Driver/Job.cpp:440:7
#39 0x00000000027d5ee3 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Driver/Compilation.cpp:199:15
#40 0x00000000027d62c7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Driver/Compilation.cpp:253:13
#41 0x00000000027f2ac9 llvm::SmallVectorBase<unsigned int>::empty() const /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/llvm/include/llvm/ADT/SmallVector.h:94:46
#42 0x00000000027f2ac9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/lib/Driver/Driver.cpp:1896:23
#43 0x0000000000aee0bc clang_main(int, char**, llvm::ToolContext const&) /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/llvm-project/clang/tools/driver/driver.cpp:542:21
#44 0x0000000000afd831 main /lustre/orion/csc372/scratch/cabarcasf/ums012/llvm17_git/build_frontier/tools/clang/tools/driver/clang-driver.cpp:15:3
#45 0x00007f5ad234729d __libc_start_main (/lib64/libc.so.6+0x3529d)
#46 0x0000000000aeabaa _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122:0
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 17.0.0 (https://github.com/llvm/llvm-project.git 8b4a27f410ba42b2e19651ddafc60cd878d0963c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
script:
# Crash reproducer for clang version 17.0.0 (https://github.com/llvm/llvm-project.git 8b4a27f410ba42b2e19651ddafc60cd878d0963c)
# Driver args: "-fopenmp" "-c" "-emit-llvm" "-Xclang" "-disable-llvm-passes" "/autofs/nccs-svm1_home1/andrewka/sollve_vv/tests/4.5/dispatch_construct.c"
# Original command: "/autofs/nccs-svm1_sw/frontier/ums/ums012/llvm/17.0.0-20230713/bin/clang-17" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "dispatch_construct.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/ccs/home/andrewka/sollve_vv" "-resource-dir" "/autofs/nccs-svm1_sw/frontier/ums/ums012/llvm/17.0.0-20230713/lib/clang/17" "-c-isystem" "/sw/frontier/ums/ums012/llvm/17.0.0-20230713/include" "-cxx-isystem" "/sw/frontier/ums/ums012/llvm/17.0.0-20230713/include" "-internal-isystem" "/autofs/nccs-svm1_sw/frontier/ums/ums012/llvm/17.0.0-20230713/lib/clang/17/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/ccs/home/andrewka/sollve_vv" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "dispatch_construct.bc" "-x" "c" "/autofs/nccs-svm1_home1/andrewka/sollve_vv/tests/4.5/dispatch_construct.c"
"/autofs/nccs-svm1_sw/frontier/ums/ums012/llvm/17.0.0-20230713/bin/clang-17" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "dispatch_construct.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/ccs/home/andrewka/sollve_vv" "-c-isystem" "/sw/frontier/ums/ums012/llvm/17.0.0-20230713/include" "-cxx-isystem" "/sw/frontier/ums/ums012/llvm/17.0.0-20230713/include" "-fdebug-compilation-dir=/ccs/home/andrewka/sollve_vv" "-ferror-limit" "19" "-fopenmp" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c" "dispatch_construct-a9bf45.c"