Skip to content

compiler crash: clang-10: /home/neboat/opencilk/llvm/include/llvm/IR/Instructions.h:2741: llvm::Value *llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock *) const: Assertion `Idx >= 0 && "Invalid basic block argument!"' failed. #46

@wheatman

Description

@wheatman

The compiler crashed with the following assert triggered
clang-10: /home/neboat/opencilk/llvm/include/llvm/IR/Instructions.h:2741: llvm::Value *llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock *) const: Assertion Idx >= 0 && "Invalid basic block argument!"' failed.`

I am running version

clang version 10.0.1 (git@github.com:OpenCilk/opencilk-project.git 8435006eea5d32f9cf895a666496b89613e2cbc1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ubuntu/OpenCilk-10.0.1-Linux/bin

I remember having it running a few months ago, but I don't remember which version of everything I was using.

The full output and stack are bellow.
The requested files are attached.
test2-42ffaa.sh.txt
test2-42ffaa.cpp.txt

clang-10: /home/neboat/opencilk/llvm/include/llvm/IR/Instructions.h:2741: llvm::Value *llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock *) const: Assertion `Idx >= 0 && "Invalid basic block argument!"' failed.
Stack dump:
0. Program arguments: /home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name test2.cpp -mrelocation-model static -mthread-model posix -mframe-pointer=none -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros -mreassociate -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math -ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu cascadelake -target-feature +sse2 -target-feature +cx16 -target-feature +sahf -target-feature -tbm -target-feature -avx512ifma -target-feature -sha -target-feature -gfni -target-feature -fma4 -target-feature -vpclmulqdq -target-feature +prfchw -target-feature +bmi2 -target-feature -cldemote -target-feature +fsgsbase -target-feature -ptwrite -target-feature +xsavec -target-feature +popcnt -target-feature +aes -target-feature -avx512bitalg -target-feature -movdiri -target-feature +xsaves -target-feature -avx512er -target-feature +avx512vnni -target-feature -avx512vpopcntdq -target-feature -pconfig -target-feature +clwb -target-feature +avx512f -target-feature -clzero -target-feature +pku -target-feature +mmx -target-feature -lwp -target-feature -rdpid -target-feature -xop -target-feature +rdseed -target-feature -waitpkg -target-feature -movdir64b -target-feature -sse4a -target-feature +avx512bw -target-feature +clflushopt -target-feature +xsave -target-feature -avx512vbmi2 -target-feature +64bit -target-feature +avx512vl -target-feature +invpcid -target-feature +avx512cd -target-feature +avx -target-feature -vaes -target-feature +cx8 -target-feature +fma -target-feature -rtm -target-feature +bmi -target-feature -enqcmd -target-feature +rdrnd -target-feature -mwaitx -target-feature +sse4.1 -target-feature +sse4.2 -target-feature +avx2 -target-feature +fxsr -target-feature -wbnoinvd -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-feature +ssse3 -target-feature -sgx -target-feature -shstk -target-feature +cmov -target-feature -avx512vbmi -target-feature -avx512bf16 -target-feature +movbe -target-feature +xsaveopt -target-feature +avx512dq -target-feature +adx -target-feature -avx512pf -target-feature +sse3 -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1 -D CILK=1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward -internal-isystem /usr/local/include -internal-isystem /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Ofast -Wall -Wextra -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/ubuntu/ppcsr -ferror-limit 19 -fmessage-length 0 -fopencilk -mllvm -use-opencilk-runtime-bc=true -mllvm -opencilk-runtime-bc-path=/home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libopencilk-abi.bc -fgnuc-version=4.2.1 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -stripmine-loops -faddrsig -o /tmp/test2-a06ea0.o -x c++ test2.cpp

  1.  <eof> parser at end of file
    
  2.  Per-module optimization passes
    
  3.  Running pass 'Function Pass Manager' on module 'test2.cpp'.
    
  4.  Running pass 'Loop Pass Manager' on function '@_ZN13AdjacencyList12parallel_bfsEiiii'
    
  5.  Running pass 'Stripmine Tapir loops' on basic block '%pfor.cond257'
    

#0 0x0000000004813454 PrintStackTraceSignalHandler(void*) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x4813454)
#1 0x00000000048110fe llvm::sys::RunSignalHandlers() (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x48110fe)
#2 0x0000000004813865 SignalHandler(int) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x4813865)
#3 0x00007f8d650873c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x00007f8d6357c18b raise /build/glibc-eX1tMB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f8d6355b859 abort /build/glibc-eX1tMB/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007f8d6355b729 get_sysdep_segment_value /build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007f8d6355b729 _nl_load_domain /build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007f8d6356cf36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#9 0x0000000004919513 llvm::SerializeDetach(llvm::DetachInst*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::Value*, llvm::SmallVectorImplllvm::Instruction*&, llvm::SmallVectorImplllvm::BasicBlock*, llvm::SmallPtrSetImplllvm::BasicBlock*, llvm::SmallPtrSetImplllvm::LandingPadInst*, llvm::SmallVectorImplllvm::Instruction*, llvm::DominatorTree*) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x4919513)
#10 0x000000000589b929 llvm::StripMineLoop(llvm::Loop*, unsigned int, bool, bool, llvm::LoopInfo*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::TaskInfo*, llvm::OptimizationRemarkEmitter*, bool, bool, bool, llvm::Loop**) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x589b929)
#11 0x00000000058951e4 tryToStripMineLoop(llvm::Loop*, llvm::DominatorTree&, llvm::LoopInfo*, llvm::ScalarEvolution&, llvm::TargetTransformInfo const&, llvm::AssumptionCache&, llvm::TaskInfo*, llvm::OptimizationRemarkEmitter&, llvm::TargetLibraryInfo*, bool, llvm::Optional) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x58951e4)
#12 0x000000000589593c (anonymous namespace)::LoopStripMine::runOnLoop(llvm::Loop*, llvm::LPPassManager&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x589593c)
#13 0x0000000003b1db82 llvm::LPPassManager::runOnFunction(llvm::Function&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x3b1db82)
#14 0x000000000412fabc llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x412fabc)
#15 0x000000000412fd98 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x412fd98)
#16 0x00000000041304a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x41304a0)
#17 0x0000000004a0ea6b 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_deletellvm::raw_pwrite_stream >) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x4a0ea6b)
#18 0x000000000519da15 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x519da15)
#19 0x0000000005fb74a3 clang::ParseAST(clang::Sema&, bool, bool) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x5fb74a3)
#20 0x00000000050ebd40 clang::FrontendAction::Execute() (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x50ebd40)
#21 0x0000000005048ad3 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x5048ad3)
#22 0x0000000005198130 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x5198130)
#23 0x0000000002b7e21d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x2b7e21d)
#24 0x0000000002b7c1ec ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x2b7c1ec)
#25 0x0000000002b7bebb main (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x2b7bebb)
#26 0x00007f8d6355d0b3 __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#27 0x0000000002b78fce _start (/home/ubuntu/OpenCilk-10.0.1-Linux/bin/clang-10+0x2b78fce)
clang-10: error: unable to execute command: Aborted (core dumped)
clang-10: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.1 (git@github.com:OpenCilk/opencilk-project.git 8435006)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ubuntu/OpenCilk-10.0.1-Linux/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to https://github.com/OpenCilk/opencilk-project/issues and include the crash backtrace, preprocessed source, and associated run script.
clang-10: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/test2-42ffaa.cpp
clang-10: note: diagnostic msg: /tmp/test2-42ffaa.sh
clang-10: note: diagnostic msg:


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions