<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 - r343018 triggers miscompile of Regression-C++-throw_rethrow_test"
href="https://bugs.llvm.org/show_bug.cgi?id=39917">39917</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>r343018 triggers miscompile of Regression-C++-throw_rethrow_test
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vsk@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I traced down a miscompile I’m seeing to this commit.
Consider these two IR files (generated from
SingleSource/Regression/C++/EH/Regression-C++-throw_rethrow_test). One is
compiled normally (at -Os). The other is compiled with hot/cold splitting,
which outlines a `resume` instruction and moves some code into a “cold”
function.
Before this commit, both tests would terminate and print the correct result:
- clang++ no-outlining.ll -o no-outlining && ./no-outlining # Prints correct
result and exits.
- clang++ with-outlining.ll -o with-outlining && ./with-outlining # Prints
correct result and exits.
(expected) $ ./no-outlining # (or ./with-outlining)
0: 1
1: 1
2: 1
3: 2
4: 2
5: 2
6: 3
7: 3
8: 3
However, after this commit, the “with-outlining” binary hangs:
(bug) $ ./with-outlining.bad
0: 1
1: 1
2: 1
3: 2
4: 2
5: 2
^C
I've attached the assembly for the “with-outlining” binary before and after
this commit.
If I revert this commit locally, I get the expected result again on
“with-outlining.ll”.</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>