<html>
<head>
<base href="http://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 --- - Pointer isn't properly casted to uint64_t"
href="http://llvm.org/bugs/show_bug.cgi?id=20441">20441</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Pointer isn't properly casted to uint64_t
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hjl.tools@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>There are codes like
void *Addr;
...
... (uint64_t)Addr ...
When pointer size is 32 bits and pointer value is >= 2GB, pointer value is
sign-extended to 64 bits, i.e.:
(void*) 0xf0000000 -> (int) 0xf0000000 -> (int64) 0xfffffffff0000000 ->
(uint64) 0xfffffffff0000000
It should be casted to uintptr_t first, (uint64_t)(uintptr_t)Addr:
(void*) 0xf0000000 -> (uint) 0xf0000000 -> (uint64) 0x00000000f0000000</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>