[lld] [LLD][ELF][AArch64] Add BTI Aware long branch thunks (PR #108989)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 18:43:34 PST 2024
zmodem wrote:
We're hitting asserts after this. I've attached an lld reproducer tarball at https://crbug.com/377438309#comment8
```
$ tar zxf repro.tar.gz
$ ( cd build/repro && ../bin/ld.lld @response.txt )
ld.lld: /work/llvm-project/lld/ELF/Thunks.cpp:621: virtual void (anonymous namespace)::AArch64ADRPThunk::writeLong(uint8_t *): Assertion `!mayNeedLandingPad || landingPad != nullptr' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
#0 0x000055666b0b8c68 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../bin/ld.lld+0xc8ac68)
#1 0x000055666b0b681e llvm::sys::RunSignalHandlers() (../bin/ld.lld+0xc8881e)
#2 0x000055666b0b9638 SignalHandler(int) Signals.cpp:0:0
#3 0x00007f0f642591a0 (/lib/x86_64-linux-gnu/libc.so.6+0x3d1a0)
#4 0x00007f0f642a70ec __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x00007f0f64259102 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#6 0x00007f0f642424f2 abort ./stdlib/abort.c:81:7
#7 0x00007f0f64242415 _nl_load_domain ./intl/loadmsgcat.c:1177:9
#8 0x00007f0f64251d32 (/lib/x86_64-linux-gnu/libc.so.6+0x35d32)
#9 0x000055666b337831 (anonymous namespace)::AArch64ADRPThunk::writeLong(unsigned char*) Thunks.cpp:0:0
#10 0x000055666b2dbf21 lld::elf::ThunkSection::writeTo(unsigned char*) (../bin/ld.lld+0xeadf21)
#11 0x000055666b2a152b void lld::elf::OutputSection::writeTo<llvm::object::ELFType<(llvm::endianness)1, true>>(unsigned char*, llvm::parallel::TaskGroup&)::'lambda'(unsigned long, unsigned long)::operator()(unsigned long, unsigned long) const (../bin/ld.lld+0xe7352b)
#12 0x000055666ef4c785 std::_Function_handler<void (), llvm::parallel::TaskGroup::spawn(std::function<void ()>)::$_0>::_M_invoke(std::_Any_data const&) Parallel.cpp:0:0
#13 0x000055666ef4c263 llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::work(llvm::ThreadPoolStrategy, unsigned int) Parallel.cpp:0:0
#14 0x00007f0f644dee64 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xdee64)
#15 0x00007f0f642a539c start_thread ./nptl/pthread_create.c:444:8
#16 0x00007f0f64326608 clone3 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80:0
Aborted
```
Could you take a look?
https://github.com/llvm/llvm-project/pull/108989
More information about the llvm-commits
mailing list