<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 - [Analyzer][solver] Reachable infeasible state"
href="https://bugs.llvm.org/show_bug.cgi?id=51541">51541</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Analyzer][solver] Reachable infeasible state
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dcoughlin@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>martongabesz@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=25172" name="attach_25172" title="lit test file">attachment 25172</a> <a href="attachment.cgi?id=25172&action=edit" title="lit test file">[details]</a></span>
lit test file
We reach an infeasible state in the below case. I'm attaching also the lit test
file (solver-x.c) that fails/crashes. My guess is that the solver probably
handles `-=` wrongly.
```
int a, b, c, d, e;
void f() {
if (a == 0)
return;
if (e != c)
return;
d = e - c;
b = d;
a -= d;
if (a != 0)
return;
clang_analyzer_warnIfReached(); // no-warning
// Crashes with expensive checks.
if (b > 0)
return;
}
```</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>