<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - segfault while linking LLVM's readline library"
   href="https://bugs.llvm.org/show_bug.cgi?id=34648">34648</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault while linking LLVM's readline library
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>phosek@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reproducer is <a href="https://storage.googleapis.com/fuchsia-build/lld-crash.cpio">https://storage.googleapis.com/fuchsia-build/lld-crash.cpio</a>

"/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/./bin/ld.lld"
--sysroot=/usr/local/google/home/phosek/fuchsia/build/linux/sysroot
--hash-style=both --eh-frame-hdr -m elf_x86_64 -shared -o lib/readline.so
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib/x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib/../lib64
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../..
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib -z defs
--color-diagnostics -soname readline.so
tools/lldb/scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/x86_64-linux-gnu/libpython2.7.a
-ledit -lstdc++ -lm -lgcc_s -lc -lgcc_s
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/crtendS.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crtn.o
--reproduce lld-crash.cpio
#0 0x00000000022b4049 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:398:11 
#1 0x00000000022b41f9 PrintStackTraceSignalHandler(void*)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:462:1 
#2 0x00000000022b27a3 llvm::sys::RunSignalHandlers()
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Signals.cpp:0:5 
#3 0x00000000022b4554 SignalHandler(int)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../lib/Support/Unix/Signals.inc:252:1 
#4 0x00007fe85b3820c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)                        
#5 0x00000000024fab22
lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)1,
true> >::finalizeContents()
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/SyntheticSections.cpp:541:30
#6 0x000000000257fb65 (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::finalizeSections()::{lambda(lld::elf::SyntheticSection*)#1}::operator()(lld::elf::SyntheticSection*)</span >
const
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Writer.cpp:1263:69
#7 0x000000000257fa22 std::_Function_handler<void
(lld::elf::SyntheticSection*), (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::finalizeSections()::{lambda(lld::elf::SyntheticSection*)#1}>::_M_invoke(std::_Any_data</span >
const&, lld::elf::SyntheticSection*&&)
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/functional:1733:7
#8 0x0000000002596ed8 std::function<void
(lld::elf::SyntheticSection*)>::operator()(lld::elf::SyntheticSection*) const
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/functional:2127:7 
#9 0x0000000002562c03 applySynthetic(std::vector<lld::elf::SyntheticSection*,
std::allocator<lld::elf::SyntheticSection*> > const&, std::function<void
(lld::elf::SyntheticSection*)>)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Writer.cpp:1158:3
#10 0x000000000257a598 (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::finalizeSections()</span >
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Writer.cpp:1262:3
#11 0x000000000255bdfc (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::run()</span >
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Writer.cpp:190:3 
#12 0x000000000258f712 void
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>()</span >
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Writer.cpp:123:64 
#13 0x00000000023a6cb0 void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(llvm::opt::InputArgList&)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Driver.cpp:1091:1
#14 0x0000000002394e8a lld::elf::LinkerDriver::main(llvm::ArrayRef<char
const*>, bool)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Driver.cpp:386:5 
#15 0x000000000239468d lld::elf::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&)
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/ELF/Driver.cpp:87:3 
#16 0x00000000021f02e8 main
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/../../tools/lld/tools/lld/lld.cpp:116:12 
#17 0x00007fe859b4a2b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)                        
#18 0x00000000021f002a _start
(/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/./bin/ld.lld+0x21f002a)  
Stack dump:                                          
0.      Program arguments:
/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/./bin/ld.lld
--sysroot=/usr/local/google/home/phosek/fuchsia/build/linux/sysroot
--hash-style=both --eh-frame-hdr -m elf_x86_64 -shared -o lib/readline.so
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib/x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib/../lib64
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/x86_64-linux-gnu
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../..
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/lib
-L/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib -z defs
--color-diagnostics -soname readline.so
tools/lldb/scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/x86_64-linux-gnu/libpython2.7.a
-ledit -lstdc++ -lm -lgcc_s -lc -lgcc_s
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/crtendS.o
/usr/local/google/home/phosek/fuchsia/build/linux/sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crtn.o
--reproduce lld-crash.cpio 
zsh: segmentation fault 
"/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/./bin/ld.lld"    -m</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>