[llvm-bugs] [Bug 46349] New: Assert when running llvm-lto on bitcode module containing GlobalIFunc

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 16 06:51:43 PDT 2020


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

            Bug ID: 46349
           Summary: Assert when running llvm-lto on bitcode module
                    containing GlobalIFunc
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Linker
          Assignee: unassignedbugs at nondot.org
          Reporter: itay.bookstein at nextsilicon.com
                CC: llvm-bugs at lists.llvm.org

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 https://bugs.llvm.org/ 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)

-- 
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/20200616/4949f76b/attachment.html>


More information about the llvm-bugs mailing list