<html>
<head>
<base href="https://llvm.org/bugs/" />
</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] Assertion "System is over constrained" after truncating 64 bits integers to 32 bits."
href="https://llvm.org/bugs/show_bug.cgi?id=25078">25078</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Analyzer] Assertion "System is over constrained" after truncating 64 bits integers to 32 bits.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pierregousseau14@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15014" name="attach_15014" title="test case">attachment 15014</a> <a href="attachment.cgi?id=15014&action=edit" title="test case">[details]</a></span>
test case
clang version: trunk @248379
Given the following test case:
void f1(long foo)
{
unsigned index = -1;
if (index < foo) index = foo;
if (index + 1 == 0) // -> "system over constrained" assertion
clang_analyzer_warnIfReached(); // -> never reached but should be
else
clang_analyzer_warnIfReached();
}
A "System is over constrained" assertion is triggered with debug builds:
$ clang -cc1 -triple x86_64-pc-linux -analyze
-analyzer-checker=core,debug.ExprInspection test.cpp
clang:
../tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:86:
clang::ento::ConstraintManager::ProgramStatePair
clang::ento::ConstraintManager::assumeDual(clang::ento::ProgramStateRef,
clang::ento::DefinedSVal): Assertion `assume(State, Cond, false) && "System is
over constrained."' failed.</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>