Skip to content

Instantly share code, notes, and snippets.

@ben-clayton

ben-clayton/crash.log Secret

Created Nov 5, 2020
Embed
What would you like to do?
LLVM coroutine crash
./bin/opt crash.ir -coro-early -coro-split -coro-elide -S
While deleting: <4 x i32>* %
Use still stuck around after Def is destroyed: %80 = load <4 x i32>, <4 x i32>* <badref>, align 16
Use still stuck around after Def is destroyed: store <4 x i32> %79, <4 x i32>* <badref>, align 16
Use still stuck around after Def is destroyed: %77 = load <4 x i32>, <4 x i32>* <badref>, align 16
opt: ../lib/IR/Value.cpp:100: llvm::Value::~Value(): Assertion `materialized_use_empty() && "Uses remain when a value is destroyed!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: ./bin/opt crash.ir -coro-early -coro-split -coro-elide -S
1. Running pass 'CallGraph Pass Manager' on module 'crash.ir'.
2. While splitting coroutine @coroutine_begin
#0 0x0000555df14bc014 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/ben/src/llvm-project/llvm/build/../lib/Support/Unix/Signals.inc:563:22
#1 0x0000555df14bc0cf PrintStackTraceSignalHandler(void*) /home/ben/src/llvm-project/llvm/build/../lib/Support/Unix/Signals.inc:630:1
#2 0x0000555df14b9d7f llvm::sys::RunSignalHandlers() /home/ben/src/llvm-project/llvm/build/../lib/Support/Signals.cpp:71:20
#3 0x0000555df14bb96c SignalHandler(int) /home/ben/src/llvm-project/llvm/build/../lib/Support/Unix/Signals.inc:405:1
#4 0x00007fd8853a1bb0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14bb0)
#5 0x00007fd884e448cb raise ./signal/../sysdeps/unix/sysv/linux/raise.c:50:1
#6 0x00007fd884e29864 abort ./stdlib/abort.c:81:7
#7 0x00007fd884e29749 get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
#8 0x00007fd884e29749 _nl_load_domain ./intl/loadmsgcat.c:970:34
#9 0x00007fd884e3ba96 (/lib/x86_64-linux-gnu/libc.so.6+0x38a96)
#10 0x0000555df0a10791 llvm::Value::~Value() /home/ben/src/llvm-project/llvm/build/../lib/IR/Value.cpp:100:3
#11 0x0000555defda00bc llvm::User::~User() /home/ben/src/llvm-project/llvm/build/../include/llvm/IR/User.h:94:3
#12 0x0000555df092515c llvm::Instruction::~Instruction() /home/ben/src/llvm-project/llvm/build/../lib/IR/Instruction.cpp:58:1
#13 0x0000555df0a1636c llvm::UnaryInstruction::~UnaryInstruction() /home/ben/src/llvm-project/llvm/build/../include/llvm/IR/InstrTypes.h:57:7
#14 0x0000555df0a16656 llvm::AllocaInst::~AllocaInst() /home/ben/src/llvm-project/llvm/build/../include/llvm/IR/Instructions.h:61:7
#15 0x0000555df0a10f59 llvm::Value::deleteValue() /home/ben/src/llvm-project/llvm/build/../include/llvm/IR/Instruction.def:171:1
#16 0x0000555df044f4f4 llvm::ilist_alloc_traits<llvm::Instruction>::deleteNode(llvm::Instruction*) /home/ben/src/llvm-project/llvm/build/../include/llvm/IR/Instruction.h:830:1
#17 0x0000555df045072f llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>, llvm::SymbolTableListTraits<llvm::Instruction> >::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>) /home/ben/src/llvm-project/llvm/build/../include/llvm/ADT/ilist.h:269:12
#18 0x0000555df044fd9c llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>, llvm::SymbolTableListTraits<llvm::Instruction> >::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>) /home/ben/src/llvm-project/llvm/build/../include/llvm/ADT/ilist.h:305:20
#19 0x0000555df07dd123 llvm::iplist_impl<llvm::simple_ilist<llvm::Instruction>, llvm::SymbolTableListTraits<llvm::Instruction> >::clear() /home/ben/src/llvm-project/llvm/build/../include/llvm/ADT/ilist.h:309:41
#20 0x0000555df07da490 llvm::BasicBlock::~BasicBlock() /home/ben/src/llvm-project/llvm/build/../lib/IR/BasicBlock.cpp:67:25
#21 0x0000555df07de23a llvm::ilist_alloc_traits<llvm::BasicBlock>::deleteNode(llvm::BasicBlock*) /home/ben/src/llvm-project/llvm/build/../include/llvm/ADT/ilist.h:41:39
#22 0x0000555df07dd7ed llvm::iplist_impl<llvm::simple_ilist<llvm::BasicBlock>, llvm::SymbolTableListTraits<llvm::BasicBlock> >::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, true, false, void>, false, false>) /home/ben/src/llvm-project/llvm/build/../include/llvm/ADT/ilist.h:269:12
#23 0x0000555df07da7f7 llvm::BasicBlock::eraseFromParent() /home/ben/src/llvm-project/llvm/build/../lib/IR/BasicBlock.cpp:129:1
#24 0x0000555df157f6b9 llvm::removeUnreachableBlocks(llvm::Function&, llvm::DomTreeUpdater*, llvm::MemorySSAUpdater*) /home/ben/src/llvm-project/llvm/build/../lib/Transforms/Utils/Local.cpp:2426:5
#25 0x0000555df0a709b7 postSplitCleanup(llvm::Function&) /home/ben/src/llvm-project/llvm/build/../lib/Transforms/Coroutines/CoroSplit.cpp:897:31
#26 0x0000555df0a72133 splitSwitchCoroutine(llvm::Function&, llvm::coro::Shape&, llvm::SmallVectorImpl<llvm::Function*>&) /home/ben/src/llvm-project/llvm/build/../lib/Transforms/Coroutines/CoroSplit.cpp:1255:19
#27 0x0000555df0a730b1 splitCoroutine(llvm::Function&, llvm::SmallVectorImpl<llvm::Function*>&, bool) /home/ben/src/llvm-project/llvm/build/../lib/Transforms/Coroutines/CoroSplit.cpp:1443:7
#28 0x0000555df0a74a78 (anonymous namespace)::CoroSplitLegacy::runOnSCC(llvm::CallGraphSCC&) /home/ben/src/llvm-project/llvm/build/../lib/Transforms/Coroutines/CoroSplit.cpp:1823:41
#29 0x0000555defc311a5 (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/ben/src/llvm-project/llvm/build/../lib/Analysis/CallGraphSCCPass.cpp:141:31
#30 0x0000555defc32461 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/ben/src/llvm-project/llvm/build/../lib/Analysis/CallGraphSCCPass.cpp:476:21
#31 0x0000555defc327ec (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/ben/src/llvm-project/llvm/build/../lib/Analysis/CallGraphSCCPass.cpp:541:15
#32 0x0000555df0976f0f (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/ben/src/llvm-project/llvm/build/../lib/IR/LegacyPassManager.cpp:1634:20
#33 0x0000555df0971e54 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/ben/src/llvm-project/llvm/build/../lib/IR/LegacyPassManager.cpp:615:13
#34 0x0000555df09777e1 llvm::legacy::PassManager::run(llvm::Module&) /home/ben/src/llvm-project/llvm/build/../lib/IR/LegacyPassManager.cpp:1762:1
#35 0x0000555def6934ea main /home/ben/src/llvm-project/llvm/build/../tools/opt/opt.cpp:983:15
#36 0x00007fd884e2bcb2 __libc_start_main ./csu/../csu/libc-start.c:314:16
#37 0x0000555def65475e _start (./bin/opt+0x6f775e)
Aborted (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.