<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - ld crashes on new pass manager + thinlto + UBSAN"
   href="https://llvm.org/bugs/show_bug.cgi?id=31784">31784</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ld crashes on new pass manager + thinlto + UBSAN
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>matthias.krueger@famsik.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>git clone <a href="https://github.com/danmar/cppcheck">https://github.com/danmar/cppcheck</a> 
git checkout a012e5b5fb4bbf3eb0f62d924599b0e703f8c211  # just in case

# ld crashes:
make dmake CXX=path/to/clang++ CXXFLAGS="-fexperimental-new-pass-manager -O0 
-fsanitize=alignment -std=c++0x -flto=thin"

# ld succeeds:
make dmake CXX=path/to/clang++ CXXFLAGS="                                -O0 
-fsanitize=alignment -std=c++0x -flto=thin"

# ld version: GNU gold (version 2.26.1-1.fc25) 1.11

# llvm @ r293274 / D29175




/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/clang++
-fexperimental-new-pass-manager  -fsanitize=alignment -std=c++0x -flto=thin -v
-o dmake tools/dmake.o cli/filelister.o lib/pathmatch.o lib/path.o -Ilib 
clang version 5.0.0 (/home/matthias/LLVM/LLVM_pure/stage_1//llvm/tools/clang
75fb37755345b98005fa6bbb371df583dc9dd5ef)
(/home/matthias/LLVM/LLVM_pure/stage_1//llvm
2272113e892a065c0465470b4ef74fbd493468cf)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/matthias/LLVM/LLVM_pure/stage_2/build/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/6.3.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.1.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/3.4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.3.1
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.3.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
 "/usr/bin/ld" --hash-style=gnu --no-add-needed --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o dmake
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/crtbegin.o
-L/usr/lib/gcc/x86_64-redhat-linux/6.3.1
-L/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../..
-L/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib -L/lib -L/usr/lib
-plugin /home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib/LLVMgold.so
-plugin-opt=mcpu=x86-64 -plugin-opt=thinlto -whole-archive
/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib/clang/5.0.0/lib/linux/libclang_rt.ubsan_standalone-x86_64.a
-no-whole-archive
--dynamic-list=/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib/clang/5.0.0/lib/linux/libclang_rt.ubsan_standalone-x86_64.a.syms
-whole-archive
/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib/clang/5.0.0/lib/linux/libclang_rt.ubsan_standalone_cxx-x86_64.a
-no-whole-archive
--dynamic-list=/home/matthias/LLVM/LLVM_pure/stage_2/build/bin/../lib/clang/5.0.0/lib/linux/libclang_rt.ubsan_standalone_cxx-x86_64.a.syms
tools/dmake.o cli/filelister.o lib/pathmatch.o lib/path.o -lstdc++ -lm
--no-as-needed -lpthread -lrt -lm -ldl -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/crtn.o
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: linker command failed due to signal (use -v to see
invocation)
Makefile:269: recipe for target 'dmake' failed
make: *** [dmake] Error 254</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>