[llvm-bugs] [Bug 51999] New: lld/mac crashes doing ICF when targeting arm64

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 28 08:14:58 PDT 2021


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

            Bug ID: 51999
           Summary: lld/mac crashes doing ICF when targeting arm64
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

Download attachment from
https://bugs.chromium.org/p/chromium/issues/detail?id=1253924 comment 0 (direct
link:
https://bugs.chromium.org/p/chromium/issues/attachment?aid=521657&signed_aid=FyD9wPUBvRJ6-Dw40gqlFQ==)

$ tar xzf arm64.tar.gz 
$ cd arm64/
$ ~/src/llvm-project/out/gn/bin/ld64.lld @response.txt

With --threads=1, the stack is a bit clearer, so here's the relevant bit of the
stack with that added:

#10 0x00007f97988dc0ad std::__throw_out_of_range(char const*)
/build/gcc-11-vdZbHt/gcc-11-11.2.0/build/x86_64-linux-gnu/libstdc++-v3/src/c++11/../../../../../src/libstdc++-v3/src/c++11/functexcept.cc:86:5
#11 0x00000000018c0bb9 std::__detail::_Map_base<std::pair<unsigned long,
unsigned long>, std::pair<std::pair<unsigned long, unsigned long> const,
unsigned long>, std::allocator<std::pair<std::pair<unsigned long, unsigned
long> const, unsigned long> >, std::__detail::_Select1st,
std::equal_to<std::pair<unsigned long, unsigned long> >,
lld::macho::WordLiteralSection::Hasher<std::pair<unsigned long, unsigned long>
>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true,
false, true>, true>::at(std::pair<unsigned long, unsigned long> const&) const
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18c0bb9)
#12 0x00000000018c052f lld::macho::WordLiteralInputSection::getOffset(unsigned
long) const
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18c052f)
#13 0x00000000018a7ed3 equalsConstant(lld::macho::ConcatInputSection const*,
lld::macho::ConcatInputSection const*) ICF.cpp:0:0
#14 0x00000000018a6397 ICF::segregate(unsigned long, unsigned long,
std::function<bool (lld::macho::ConcatInputSection const*,
lld::macho::ConcatInputSection const*)>)
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18a6397)
#15 0x00000000018a7cfb std::_Function_handler<void (unsigned long, unsigned
long), ICF::run()::$_4>::_M_invoke(std::_Any_data const&, unsigned long&&,
unsigned long&&) ICF.cpp:0:0
#16 0x00000000018a588e ICF::forEachClass(std::function<void (unsigned long,
unsigned long)>)
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18a588e)
#17 0x00000000018a5f0a ICF::run()
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18a5f0a)
#18 0x00000000018a696f lld::macho::foldIdenticalSections()
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x18a696f)
#19 0x000000000188ed65 lld::macho::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&, llvm::raw_ostream&)
(/usr/local/google/home/thakis/src/llvm-project/out/gn/bin/ld64.lld+0x188ed65)

-- 
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/20210928/d7b5476d/attachment.html>


More information about the llvm-bugs mailing list