[llvm-bugs] [Bug 42797] New: Unreachable Executed at ModuleBitCodeWriter::writeConstants - Unknown constant

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 27 13:41:08 PDT 2019


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

            Bug ID: 42797
           Summary: Unreachable Executed at
                    ModuleBitCodeWriter::writeConstants - Unknown constant
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OrcJIT
          Assignee: unassignedbugs at nondot.org
          Reporter: praveenvelliengiri at gmail.com
                CC: 1101.debian at gmail.com, llvm-bugs at lists.llvm.org

Crash is observed from ORC JIT APIs - CompileOnDemandLayer.

In all JIT variants: lli MC, ORC-Lazy, ORC-Speculate. 

Detailed stack trace:


Unknown constant!

UNREACHABLE executed at
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:2525!
Stack dump:

Program arguments: lli -jit-kind=orc-lazy ./AppBitcode/Bullet.ll 
 #0 0x00007fb2c6c78447 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Support/Unix/Signals.inc:533:11
 #1 0x00007fb2c6c785e9 PrintStackTraceSignalHandler(void*)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Support/Unix/Signals.inc:594:1
 #2 0x00007fb2c6c76ecb llvm::sys::RunSignalHandlers()
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Support/Signals.cpp:67:5
 #3 0x00007fb2c6c78cb5 SignalHandler(int)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Support/Unix/Signals.inc:385:1
 #4 0x00007fb2c5644890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x00007fb2c412ce97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #6 0x00007fb2c412e801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #7 0x00007fb2c6b11c64
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Support/ErrorHandling.cpp:209:3
 #8 0x00007fb2c33828cb (anonymous
namespace)::ModuleBitcodeWriter::writeConstants(unsigned int, unsigned int,
bool)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:0:7
 #9 0x00007fb2c337cca9 (anonymous
namespace)::ModuleBitcodeWriter::writeModuleConstants()
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:2542:7
#10 0x00007fb2c3376114 (anonymous namespace)::ModuleBitcodeWriter::write()
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:4244:3
#11 0x00007fb2c3375f7c llvm::BitcodeWriter::writeModule(llvm::Module const&,
bool, llvm::ModuleSummaryIndex const*, bool, std::array<unsigned int, 5ul>*)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:4441:1
#12 0x00007fb2c7608c11
llvm::orc::cloneToNewContext(llvm::orc::ThreadSafeModule&, std::function<bool
(llvm::GlobalValue const&)>, std::function<void (llvm::GlobalValue&)>)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp:48:14
#13 0x00007fb2c74f209a extractSubModule(llvm::orc::ThreadSafeModule&,
llvm::StringRef, std::function<bool (llvm::GlobalValue const&)>)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp:57:19
#14 0x00007fb2c74f1eda
llvm::orc::CompileOnDemandLayer::emitPartition(llvm::orc::MaterializationResponsibility,
llvm::orc::ThreadSafeModule, std::map<llvm::orc::SymbolStringPtr,
llvm::GlobalValue*, std::less<llvm::orc::SymbolStringPtr>,
std::allocator<std::pair<llvm::orc::SymbolStringPtr const, llvm::GlobalValue*>
> >)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp:297:23
#15 0x00007fb2c74ffd66
llvm::orc::PartitioningIRMaterializationUnit::materialize(llvm::orc::MaterializationResponsibility)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp:85:5
#16 0x00007fb2c752b085
llvm::orc::MaterializationUnit::doMaterialize(llvm::orc::JITDylib&)
/home/preejackie/llvmrepo/sinter_github/llvm/include/llvm/ExecutionEngine/Orc/Core.h:286:5
#17 0x00007fb2c75287c0
llvm::orc::ExecutionSession::materializeOnCurrentThread(llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit> >)
/home/preejackie/llvmrepo/sinter_github/llvm/include/llvm/ExecutionEngine/Orc/Core.h:916:3
#18 0x00007fb2c752c7c4 std::_Function_handler<void (llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit> >), void
(*)(llvm::orc::JITDylib&, std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit>
>)>::_M_invoke(std::_Any_data const&, llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit> >&&)
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2
#19 0x00007fb2c752aa00 std::function<void (llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit>
>)>::operator()(llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit> >) const
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:7
#20 0x00007fb2c75264d3
llvm::orc::ExecutionSession::dispatchMaterialization(llvm::orc::JITDylib&,
std::unique_ptr<llvm::orc::MaterializationUnit,
std::default_delete<llvm::orc::MaterializationUnit> >)
/home/preejackie/llvmrepo/sinter_github/llvm/include/llvm/ExecutionEngine/Orc/Core.h:901:5
#21 0x00007fb2c7516b27 llvm::orc::ExecutionSession::runOutstandingMUs()
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/Core.cpp:1900:7
#22 0x00007fb2c75146d6
llvm::orc::ExecutionSession::lookup(std::vector<std::pair<llvm::orc::JITDylib*,
bool>, std::allocator<std::pair<llvm::orc::JITDylib*, bool> > > const&,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> >, llvm::orc::SymbolState,
std::function<void (llvm::Expected<llvm::DenseMap<llvm::orc::SymbolStringPtr,
llvm::JITEvaluatedSymbol, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>,
llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr,
llvm::JITEvaluatedSymbol> > >)>, std::function<void
(llvm::DenseMap<llvm::orc::JITDylib*,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> >,
llvm::DenseMapInfo<llvm::orc::JITDylib*>,
llvm::detail::DenseMapPair<llvm::orc::JITDylib*,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> > > > const&)>)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/Core.cpp:1791:1
#23 0x00007fb2c75188a5
llvm::orc::ExecutionSession::lookup(std::vector<std::pair<llvm::orc::JITDylib*,
bool>, std::allocator<std::pair<llvm::orc::JITDylib*, bool> > > const&,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> > const&,
llvm::orc::SymbolState, std::function<void
(llvm::DenseMap<llvm::orc::JITDylib*,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> >,
llvm::DenseMapInfo<llvm::orc::JITDylib*>,
llvm::detail::DenseMapPair<llvm::orc::JITDylib*,
llvm::DenseSet<llvm::orc::SymbolStringPtr,
llvm::DenseMapInfo<llvm::orc::SymbolStringPtr> > > > const&)>)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/Core.cpp:1827:3
#24 0x00007fb2c7518b45
llvm::orc::ExecutionSession::lookup(std::vector<std::pair<llvm::orc::JITDylib*,
bool>, std::allocator<std::pair<llvm::orc::JITDylib*, bool> > > const&,
llvm::orc::SymbolStringPtr)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/Core.cpp:1852:24
#25 0x00007fb2c7588856
llvm::orc::LazyCallThroughManager::callThroughToSymbol(unsigned long)
/home/preejackie/llvmrepo/sinter_github/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp:57:7
#26 0x00007fb2c7590e53 llvm::Error
llvm::orc::LocalLazyCallThroughManager::init<llvm::orc::OrcX86_64_SysV>()::'lambda'(unsigned
long)::operator()(unsigned long) const
/home/preejackie/llvmrepo/sinter_github/llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h:121:11
#27 0x00007fb2c7590d12 std::_Function_handler<unsigned long (unsigned long),
llvm::Error
llvm::orc::LocalLazyCallThroughManager::init<llvm::orc::OrcX86_64_SysV>()::'lambda'(unsigned
long)>::_M_invoke(std::_Any_data const&, unsigned long&&)
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:301:2
#28 0x00007fb2c755e22b std::function<unsigned long (unsigned
long)>::operator()(unsigned long) const
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:7
#29 0x00007fb2c756e9ce
llvm::orc::LocalTrampolinePool<llvm::orc::OrcX86_64_SysV>::reenter(void*,
void*)
/home/preejackie/llvmrepo/sinter_github/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:111:5
#30 0x00007fb2c8985044

-- 
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/20190727/af8749bb/attachment-0001.html>


More information about the llvm-bugs mailing list