[llvm-bugs] [Bug 32995] New: segfault when using icf

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 10 18:22:57 PDT 2017


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

            Bug ID: 32995
           Summary: segfault when using icf
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: phosek at chromium.org
                CC: llvm-bugs at lists.llvm.org

LLD is crashing when icf is enabled, without icf everything is fine; below is
the stack trace from the crash:

#0 0x0000000001ecae49 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:398:11
#1 0x0000000001ecaff9 PrintStackTraceSignalHandler(void*)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:462:1
#2 0x0000000001ec9693 llvm::sys::RunSignalHandlers()
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Signals.cpp:0:5
#3 0x0000000001ecb354 SignalHandler(int)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:252:1
#4 0x00007f99fb3ae330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00000000020ce739 lld::elf::GdbIndexSection::writeTo(unsigned char*)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/SyntheticSections.cpp:1853:44
#6 0x000000000202b701 void
lld::elf::InputSection::writeTo<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(unsigned char*)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/InputSection.cpp:646:5
#7 0x0000000002075ecd void
lld::elf::OutputSection::writeTo<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(unsigned char*)::{lambda(unsigned long)#1}::operator()(unsigned long)
const
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/OutputSections.cpp:305:9
#8 0x0000000002075d02 std::_Function_handler<void (unsigned long), void
lld::elf::OutputSection::writeTo<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(unsigned char*)::{lambda(unsigned long)#1}>::_M_invoke(std::_Any_data
const&, unsigned long)
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2073:7
#9 0x0000000001fd8438 std::function<void (unsigned long)>::operator()(unsigned
long) const
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2471:7
#10 0x0000000001fd873e void
llvm::parallel::detail::parallel_for_each_n<unsigned long, std::function<void
(unsigned long)> >(unsigned long, unsigned long, std::function<void (unsigned
long)>)::{lambda()#2}::operator()() const
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../include/llvm/Support/Parallel.h:183:34
#11 0x0000000001fd857d std::_Function_handler<void (), void
llvm::parallel::detail::parallel_for_each_n<unsigned long, std::function<void
(unsigned long)> >(unsigned long, unsigned long, std::function<void (unsigned
long)>)::{lambda()#2}>::_M_invoke(std::_Any_data const&)
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2073:7
#12 0x0000000001efb2be std::function<void ()>::operator()() const
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2471:7
#13 0x0000000001f33cad
llvm::parallel::detail::TaskGroup::spawn(std::function<void
()>)::$_0::operator()() const
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Parallel.cpp:134:7
#14 0x0000000001f33add std::_Function_handler<void (),
llvm::parallel::detail::TaskGroup::spawn(std::function<void
()>)::$_0>::_M_invoke(std::_Any_data const&)
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2073:7
#15 0x0000000001efb2be std::function<void ()>::operator()() const
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:2471:7
#16 0x0000000001f31d91 (anonymous namespace)::ThreadPoolExecutor::work()
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Parallel.cpp:111:7
#17 0x0000000001f326b8 (anonymous
namespace)::ThreadPoolExecutor::ThreadPoolExecutor(unsigned
int)::{lambda()#1}::operator()() const::{lambda()#1}::operator()() const
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Parallel.cpp:80:35
#18 0x0000000001f32675 void std::_Bind_simple<(anonymous
namespace)::ThreadPoolExecutor::ThreadPoolExecutor(unsigned
int)::{lambda()#1}::operator()() const::{lambda()#1}
()>::_M_invoke<>(std::_Index_tuple<>)
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1731:11
#19 0x0000000001f32645 std::_Bind_simple<(anonymous
namespace)::ThreadPoolExecutor::ThreadPoolExecutor(unsigned
int)::{lambda()#1}::operator()() const::{lambda()#1} ()>::operator()()
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1720:9
#20 0x0000000001f32509 std::thread::_Impl<std::_Bind_simple<(anonymous
namespace)::ThreadPoolExecutor::ThreadPoolExecutor(unsigned
int)::{lambda()#1}::operator()() const::{lambda()#1} ()> >::_M_run()
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/thread:115:24
#21 0x00007f99fa5f7a60 ~__shared_count
/build/gcc-4.8-mW1ufQ/gcc-4.8-4.8.4/build/x86_64-linux-gnu/libstdc++-v3/include/bits/shared_ptr_base.h:545:0
#22 0x00007f99fa5f7a60 ~__shared_ptr
/build/gcc-4.8-mW1ufQ/gcc-4.8-4.8.4/build/x86_64-linux-gnu/libstdc++-v3/include/bits/shared_ptr_base.h:781:0
#23 0x00007f99fa5f7a60 ~shared_ptr
/build/gcc-4.8-mW1ufQ/gcc-4.8-4.8.4/build/x86_64-linux-gnu/libstdc++-v3/include/bits/shared_ptr.h:93:0
#24 0x00007f99fa5f7a60 execute_native_thread_routine
/build/gcc-4.8-mW1ufQ/gcc-4.8-4.8.4/build/x86_64-linux-gnu/libstdc++-v3/src/c++11/../../../../../src/libstdc++-v3/src/c++11/thread.cc:95:0
#25 0x00007f99fb3a6184 start_thread
/build/eglibc-MjiXCM/eglibc-2.19/nptl/pthread_create.c:312:0
#26 0x00007f99fa065bed clone
/build/eglibc-MjiXCM/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113:0
zsh: segmentation fault (core dumped)  ../bin/ld.lld "@response.txt"

-- 
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/20170511/35f4de1f/attachment-0001.html>


More information about the llvm-bugs mailing list