[llvm-bugs] [Bug 32139] New: LLD assertion failure "cast<Ty>() argument of incompatible type!" linking FreeBSD EFI loader

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 4 09:44:29 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=32139

            Bug ID: 32139
           Summary: LLD assertion failure "cast<Ty>() argument of
                    incompatible type!" linking FreeBSD EFI loader
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org

backtrace:

/tank/emaste/src/llvm/build-debug/bin/ld.lld: error: Section has different type
from others with the same name
tank/emaste/obj/tank/emaste/src/freebsd-xlld/sys/boot/efi/loader/autoload.o:(.eh_frame)
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file ../include/llvm/Support/Casting.h, line 236.
(lldb) Process 36234 stopped
* thread #1: tid = 100167, 0x00000008068d59ba libc.so.7`__sys_thr_kill + 10 at
thr_kill.S:3, stop reason = signal SIGABRT
    frame #0: 0x00000008068d59ba libc.so.7`__sys_thr_kill + 10 at thr_kill.S:3
   1    #include "compat.h"
   2    #include "SYS.h"
-> 3    RSYSCALL(thr_kill)
   4            .section .note.GNU-stack,"",%progbits
(lldb) bt
* thread #1: tid = 100167, 0x00000008068d59ba libc.so.7`__sys_thr_kill + 10 at
thr_kill.S:3, stop reason = signal SIGABRT
  * frame #0: 0x00000008068d59ba libc.so.7`__sys_thr_kill + 10 at thr_kill.S:3
    frame #1: 0x00000008068d59a6 libc.so.7`__raise(s=<unavailable>) + 38 at
raise.c:51
    frame #2: 0x00000008068d5929 libc.so.7`abort + 73 at abort.c:65
    frame #3: 0x000000080693c8c1 libc.so.7`__assert(func=<unavailable>,
file=<unavailable>, line=<unavailable>, failedexpr=<unavailable>) + 81 at
assert.c:54
    frame #4: 0x000000000068c0e9
ld.lld`llvm::cast_retty<lld::elf::InputSection,
lld::elf::InputSectionBase*>::ret_type llvm::cast<lld::elf::InputSection,
lld::elf::InputSectionBase>(Val=0x0000000807501000) + 73 at Casting.h:236
    frame #5: 0x000000000085eee5
ld.lld`lld::elf::OutputSection::addSection(this=0x0000000807687088,
C=0x0000000807501000) + 117 at OutputSections.cpp:117
    frame #6: 0x000000000086c940 ld.lld`void
lld::elf::OutputSectionFactory::addInputSec<llvm::object::ELFType<(this=0x00007fffffffc1b0,
IS=0x0000000807501000, OutsecName=StringRef at 0x00007fffffffbd88)1, true>
>(lld::elf::InputSectionBase*, llvm::StringRef) + 1728 at
OutputSections.cpp:372
    frame #7: 0x0000000000811624
ld.lld`lld::elf::LinkerScript<llvm::object::ELFType<(this=0x00000008074fe000,
Factory=0x00007fffffffc1b0)1, true>
>::addOrphanSections(lld::elf::OutputSectionFactory&) + 500 at
LinkerScript.cpp:395
    frame #8: 0x0000000000a24ddb ld.lld`(anonymous
namespace)::Writer<llvm::object::ELFType<(this=0x00007fffffffc190)1, true>
>::run() + 187 at Writer.cpp:221
    frame #9: 0x0000000000a67b3b ld.lld`void
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1, true>
>() + 75 at Writer.cpp:140
    frame #10: 0x0000000000688ffd ld.lld`void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(this=0x000000080743d000,
Args=0x00007fffffffce18)1, true> >(llvm::opt::InputArgList&) + 4685 at
Driver.cpp:884
    frame #11: 0x0000000000674751
ld.lld`lld::elf::LinkerDriver::main(this=0x000000080743d000,
ArgsArr=ArrayRef<const char *> at 0x00007fffffffcfd0, CanExitEarly=true) + 3505
at Driver.cpp:341
    frame #12: 0x0000000000673967 ld.lld`lld::elf::link(Args=ArrayRef<const
char *> at 0x00007fffffffd2c0, CanExitEarly=true, Error=0x000000000586c510) +
647 at Driver.cpp:79
    frame #13: 0x000000000047b365 ld.lld`main(Argc=61, Argv=0x00007fffffffd4e0)
+ 341 at lld.cpp:104
    frame #14: 0x000000000047b12f ld.lld`_start(ap=<unavailable>,
cleanup=<unavailable>) + 367 at crt1.c:72

-- 
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/20170304/9f89afe0/attachment.html>


More information about the llvm-bugs mailing list