<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 - Clang crash when compiling buggy code in 7.0"
href="https://bugs.llvm.org/show_bug.cgi?id=39136">39136</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang crash when compiling buggy code in 7.0
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>james.chicken@xtxmarkets.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20946" name="attach_20946" title="Stack dump from compiling the excerpt as well as preprocessed source and run script">attachment 20946</a> <a href="attachment.cgi?id=20946&action=edit" title="Stack dump from compiling the excerpt as well as preprocessed source and run script">[details]</a></span>
Stack dump from compiling the excerpt as well as preprocessed source and run
script
When compiling our C++17 codebase I encounter a segmentation fault in clang
7.0. It's when compiling an invalid program admittedly but of course the
compiler should not crash regardless. I ran creduce on the example and it cut
it down to this excerpt:
template <a> qwertyuiopasdfghjklz;
template b()->qwertyuiopasdfghjklz<>;
The length of symbol 'qwertyuiopasdfghjklz' is actually important for the
crash. I found I cannot reproduce with a token shorter than above, but that
length or larger causes the crash.
I have attached the output I get when attempting to compile the excerpt, as
well as the preprocessed source and associated run script.
We build clang like this (tl;dr build from source using gcc 8.2):
export LINK_FLAGS="-Wl,-rpath,/gcc-8.2/lib64 -L/gcc-8.2/lib64"
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/home/jchicke/clang-7 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SHARED_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_MODULE_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_EXE_LINKER_FLAGS=$LINK_FLAGS \
-DCMAKE_C_LINK_FLAGS=$LINK_FLAGS \
-DLLVM_OPTIMIZED_TABLEGEN=On \
-DLLVM_BINUTILS_INCDIR=/gcc-8.2/include \
../src
Any more info you need please ask.</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>