<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:kv.bhat@samsung.com" title="karthik <kv.bhat@samsung.com>"> <span class="fn">karthik</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang crashes at -Os and above on x86_64-linux-gnu"
href="https://llvm.org/bugs/show_bug.cgi?id=24469">bug 24469</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>kv.bhat@samsung.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang crashes at -Os and above on x86_64-linux-gnu"
href="https://llvm.org/bugs/show_bug.cgi?id=24469#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang crashes at -Os and above on x86_64-linux-gnu"
href="https://llvm.org/bugs/show_bug.cgi?id=24469">bug 24469</a>
from <span class="vcard"><a class="email" href="mailto:kv.bhat@samsung.com" title="karthik <kv.bhat@samsung.com>"> <span class="fn">karthik</span></a>
</span></b>
<pre>Hi David,
Thanks for the reduced test case. This should be fixed in r245195.
The problem was in handleNonLocalStoreDeletion were we had a call to
DeleteDeadInstruction.
DeleteDeadInstruction can delete the next basic block iterator which is
supposed to be processed. Not handling this case was resulting in the above
crash.
For e.g. in the above test code-
While processing the intruction "store i32 0, i32* @b, align 4"
"store i32 %g.02, i32* @b, align 4" is concluded to be dead as the store is
overwritten by store i32 0, i32* @b, align 4 in loop exit.
This results in "%g.02 = phi i32 [ undef, %entry ], [ %0, %for.cond.1.loopexit
]" and "%0 = load i32, i32* @a, align 4".
Now the iterator points to "%0 = load i32, i32* @a, align 4" which has been
deleted by DeleteDeadInstruction. This was resulting in the above crash.
Fixed this by resetting the Basic block iterator after a call to
DeleteDeadInstruction.
For reference this is done in few other places in DSE as well.
Thanks
Karthik Bhat</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>