<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 - [11 regression] Code segfaults with -O1 -mavx2"
href="https://bugs.llvm.org/show_bug.cgi?id=48591">48591</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[11 regression] Code segfaults with -O1 -mavx2
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>11.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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>clang@evan.coeusgroup.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I have some code which has started segfaulting (often, but not reliably) when
compiled with `clang-11 -O1 -mavx2`. clang-10 works reliably, as do other
optimization levels.
I (well, C-Reduce) have reduced it to the following:
typedef long a __attribute__((__vector_size__(32)));
a d, e;
void b(a *p1) { __builtin_memcpy(p1, &d, sizeof(d)); }
int main() {
{
{
int c[sizeof(e) / sizeof(int)];
b(({ (a *)c; }));
}
}
}
Here it is on Compiler Explorer: <<a href="https://godbolt.org/z/z8d6hK">https://godbolt.org/z/z8d6hK</a>>. The exit code
for clang-11 is 139 for me now, but I can't promise it will be for you; as I
mentioned it doesn't crash every time, and I'm pretty sure Compiler Explorer
caches results. On my desktop it's crashing on ~52% of executions.
This happens with a *lot* of the test cases in SIMDe
(<<a href="https://github.com/simd-everywhere/simde">https://github.com/simd-everywhere/simde</a>>) if anyone wants to try reproducing
with "real" code.</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>