[llvm-bugs] [Bug 48616] New: Assertion failure in MemorySSA during LTO

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 28 14:40:58 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48616

            Bug ID: 48616
           Summary: Assertion failure in MemorySSA during LTO
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: tlively at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24319
  --> https://bugs.llvm.org/attachment.cgi?id=24319&action=edit
reduced reproducer

Running: bin/wasm-ld -lto-O2 bug.bc -o bug.wasm --no-entry

Produces an assertion failure with this backtrace:

wasm-ld: .../llvm-project/llvm/lib/Analysis/MemorySSA.cpp:1167: void
llvm::MemorySSA::renamePass(llvm::DomTreeNode*, llvm::MemoryAccess*,
llvm::SmallPtrSetImpl<llvm::BasicBlock*>&, bool, bool): Assertion `Root &&
"Trying to rename accesses in an unreachable block"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: bin/wasm-ld -lto-O2 bug.bc -o bug.wasm --no-entry
1.      Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2.      Running pass 'Global Value Numbering' on function '@3'
 #0 0x000055f89facaf2d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(bin/wasm-ld+0x5eff2d)
 #1 0x000055f89fac8b84 llvm::sys::RunSignalHandlers() (bin/wasm-ld+0x5edb84)
 #2 0x000055f89fac8ce0 SignalHandler(int) (bin/wasm-ld+0x5edce0)
 #3 0x00007f74447b3140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x00007f74440e8c81 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f74440d2537 abort ./stdlib/abort.c:81:7
 #6 0x00007f74440d240f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
 #7 0x00007f74440d240f _nl_load_domain ./intl/loadmsgcat.c:970:34
 #8 0x00007f74440e1602 (/lib/x86_64-linux-gnu/libc.so.6+0x34602)
 #9 0x000055f8a1992072
llvm::MemorySSA::renamePass(llvm::DomTreeNodeBase<llvm::BasicBlock>*,
llvm::MemoryAccess*, llvm::SmallPtrSetImpl<llvm::BasicBlock*>&, bool, bool)
(bin/wasm-ld+0x24b7072)
#10 0x000055f8a19af8d6 llvm::MemorySSAUpdater::insertDef(llvm::MemoryDef*,
bool) (bin/wasm-ld+0x24d48d6)
#11 0x000055f8a19b01a0 void
llvm::MemorySSAUpdater::moveTo<llvm::MemorySSA::InsertionPlace>(llvm::MemoryUseOrDef*,
llvm::BasicBlock*, llvm::MemorySSA::InsertionPlace) (bin/wasm-ld+0x24d51a0)
#12 0x000055f8a1628796 llvm::MergeBlockIntoPredecessor(llvm::BasicBlock*,
llvm::DomTreeUpdater*, llvm::LoopInfo*, llvm::MemorySSAUpdater*,
llvm::MemoryDependenceResults*, bool) (bin/wasm-ld+0x214d796)
#13 0x000055f8a1094f01 llvm::GVN::runImpl(llvm::Function&,
llvm::AssumptionCache&, llvm::DominatorTree&, llvm::TargetLibraryInfo const&,
llvm::AAResults&, llvm::MemoryDependenceResults*, llvm::LoopInfo*,
llvm::OptimizationRemarkEmitter*, llvm::MemorySSA*) (bin/wasm-ld+0x1bb9f01)
#14 0x000055f8a1095fb8 llvm::gvn::GVNLegacyPass::runOnFunction(llvm::Function&)
(bin/wasm-ld+0x1bbafb8)
#15 0x000055f8a1e6ffb0 llvm::FPPassManager::runOnFunction(llvm::Function&)
(bin/wasm-ld+0x2994fb0)
#16 0x000055f8a1e70ad1 llvm::FPPassManager::runOnModule(llvm::Module&)
(bin/wasm-ld+0x2995ad1)
#17 0x000055f8a1e6f943 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(bin/wasm-ld+0x2994943)
#18 0x000055f8a083606f (anonymous namespace)::opt(llvm::lto::Config const&,
llvm::TargetMachine*, unsigned int, llvm::Module&, bool,
llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*,
std::vector<unsigned char, std::allocator<unsigned char> > const&)
(bin/wasm-ld+0x135b06f)
#19 0x000055f8a0837096 llvm::lto::backend(llvm::lto::Config const&,
std::function<std::unique_ptr<llvm::lto::NativeObjectStream,
std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned
int, std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >,
llvm::ModuleSummaryIndex&) (bin/wasm-ld+0x135c096)
#20 0x000055f8a082af65
llvm::lto::LTO::runRegularLTO(std::function<std::unique_ptr<llvm::lto::NativeObjectStream,
std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>)
(bin/wasm-ld+0x134ff65)
#21 0x000055f8a082b66f
llvm::lto::LTO::run(std::function<std::unique_ptr<llvm::lto::NativeObjectStream,
std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>,
std::function<std::function<std::unique_ptr<llvm::lto::NativeObjectStream,
std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned
int, llvm::StringRef)>) (bin/wasm-ld+0x135066f)
#22 0x000055f89fe42061 lld::wasm::BitcodeCompiler::compile()
(bin/wasm-ld+0x967061)
#23 0x000055f89fe47710 lld::wasm::SymbolTable::addCombinedLTOObject()
(bin/wasm-ld+0x96c710)
#24 0x000055f89fe304b1 lld::wasm::(anonymous
namespace)::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>)
(.constprop.0) (bin/wasm-ld+0x9554b1)
#25 0x000055f89fe30ef4 lld::wasm::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&, llvm::raw_ostream&) (bin/wasm-ld+0x955ef4)
#26 0x000055f89fa5fa20 lldMain(int, char const**, llvm::raw_ostream&,
llvm::raw_ostream&, bool) (bin/wasm-ld+0x584a20)
#27 0x000055f89f9ed730 main (bin/wasm-ld+0x512730)
#28 0x00007f74440d3d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#29 0x000055f89fa5ea4a _start (bin/wasm-ld+0x583a4a)
Aborted

Please find the reduced bug.bc attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201228/abc595e9/attachment.html>


More information about the llvm-bugs mailing list