<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 - Crash in APInt triggered by commit ce44fe199bbf"
href="https://bugs.llvm.org/show_bug.cgi?id=50741">50741</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash in APInt triggered by commit ce44fe199bbf
</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>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tauchris@utexas.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>abhinavgaba noted that commit ce44fe199bbf triggers an assertion failure in
APInt for a very specific case of void pointer math. Reproducer is simple:
$ cat test.c
void a() {
(void *)0 + 0xdead000000000000UL;
}
$ clang -cc1 -triple i386-pc-linux test.c
clang: /localdisk2/gabaabhi/ics/l1/llvm/llvm/lib/Support/APInt.cpp:1609:
llvm::APInt llvm::APInt::udiv(const llvm::APInt&) const: Assertion `RHS.U.VAL
!= 0 && "Divide by zero?"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -cc1 -triple i386-pc-linux test.c
1. test.c:2:35: current parser token ';'
2. test.c:1:10: parsing function body 'a'
3. test.c:1:10: in compound statement ('{}')
...</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>