<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 - Another Z3 constraint manager crash"
href="https://bugs.llvm.org/show_bug.cgi?id=37646">37646</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Another Z3 constraint manager crash
</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>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>vlad@tsyrklevich.net
</td>
</tr>
<tr>
<th>CC</th>
<td>d.c.ddcc@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>creduce'd input:
_Bool b;
c() {
_Bool a = b | 0;
for (;;)
if (a)
;
}
Crashes with: clang -cc1 -triple x86_64-unknown-linux-gnu -analyze
-analyzer-eagerly-assume -analyzer-constraints=z3 -analyzer-checker core test.c
Hits the same assertion as PR37622:
clang-7: llvm/tools/clang/include/clang/AST/Type.h:670: const
clang::ExtQualsTypeCommonBase* clang::QualType::getCommonPtr() const: Assertion
`!isNull() && "Cannot retrieve a NULL type pointer"' failed.
This hits an exception with the expression: (reg_$0<_Bool b>) != 0
Stack trace:
- clang::ASTContext::getTypeSize(clang::QualType) const
llvm/tools/clang/include/clang/AST/ASTContext.h:2026:0
- doIntTypeConversion<llvm::APSInt, (anonymous
namespace)::Z3ConstraintManager::castAPSInt>
llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:1498:0
- (anonymous
namespace)::Z3ConstraintManager::getSymVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::ento::SymExpr const*) const
llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:1223:0</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>