<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assert when running llvm-lto on bitcode module containing GlobalIFunc"
href="https://bugs.llvm.org/show_bug.cgi?id=46349">46349</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assert when running llvm-lto on bitcode module containing GlobalIFunc
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Linker
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>itay.bookstein@nextsilicon.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Running llvm-lto on the following code hits an assert in LTOModule.cpp.
// try.ll
@foo2 = dso_local alias void (), void ()* @foo
@foo = dso_local ifunc void (), bitcast (i8* ()* @foo_ifunc to void ()*)
; Function Attrs: noinline nounwind optnone uwtable
define internal i8* @foo_ifunc() #0 {
entry:
ret i8* bitcast (void ()* @foo_impl to i8*)
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @foo_impl() #0 {
entry:
ret void
}
// build.sh
llvm-as try.ll -o try.bc
llvm-lto try.bc
Stack trace:
llvm-lto:
/local/users/itay/Projects/llvm-project/llvm/lib/LTO/LTOModule.cpp:610: void
llvm::LTOModule::parseSymbols(): Assertion `isa<GlobalAlias>(GV)' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0. Program arguments: ../../Projects/llvm-project/Debug/bin/llvm-lto
try.bc
#0 0x000000000584fb09 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/local/users/itay/Projects/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:11
#1 0x000000000584fcb9 PrintStackTraceSignalHandler(void*)
/local/users/itay/Projects/llvm-project/llvm/lib/Support/Unix/Signals.inc:625:1
#2 0x000000000584e446 llvm::sys::RunSignalHandlers()
/local/users/itay/Projects/llvm-project/llvm/lib/Support/Signals.cpp:67:5
#3 0x000000000585045b SignalHandler(int)
/local/users/itay/Projects/llvm-project/llvm/lib/Support/Unix/Signals.inc:406:1
#4 0x00007f4a9f6ea730 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
#5 0x00007f4a9f1ee7bb raise (/lib/x86_64-linux-gnu/libc.so.6+0x377bb)
#6 0x00007f4a9f1d9535 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22535)
#7 0x00007f4a9f1d940f (/lib/x86_64-linux-gnu/libc.so.6+0x2240f)
#8 0x00007f4a9f1e7102 (/lib/x86_64-linux-gnu/libc.so.6+0x30102)
#9 0x00000000054cf65a llvm::LTOModule::parseSymbols()
/local/users/itay/Projects/llvm-project/llvm/lib/LTO/LTOModule.cpp:611:26
#10 0x00000000054cea1f llvm::LTOModule::makeLTOModule(llvm::MemoryBufferRef,
llvm::TargetOptions const&, llvm::LLVMContext&, bool)
/local/users/itay/Projects/llvm-project/llvm/lib/LTO/LTOModule.cpp:234:3
#11 0x00000000054ce4d0 llvm::LTOModule::createFromFile(llvm::LLVMContext&,
llvm::StringRef, llvm::TargetOptions const&)
/local/users/itay/Projects/llvm-project/llvm/lib/LTO/LTOModule.cpp:119:10
#12 0x00000000030d1291 main
/local/users/itay/Projects/llvm-project/llvm/tools/llvm-lto/llvm-lto.cpp:984:42
#13 0x00007f4a9f1db09b __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#14 0x00000000030d002a _start
(../../Projects/llvm-project/Debug/bin/llvm-lto+0x30d002a)
fish: “../../Projects/llvm-project/Deb…” terminated by signal SIGABRT (Abort)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>