<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 --- - False positive: free() on a "constant" malloc()-ed address"
href="http://llvm.org/bugs/show_bug.cgi?id=15654">15654</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>False positive: free() on a "constant" malloc()-ed address
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ranma42@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>Created <span class=""><a href="attachment.cgi?id=10276" name="attach_10276" title="Reduced testcase">attachment 10276</a> <a href="attachment.cgi?id=10276&action=edit" title="Reduced testcase">[details]</a></span>
Reduced testcase
Running the latest checker (checker-272 (2013-03-01 14:12:07) ) on the attached
code, it incorrectly reports:
test-free.c:16:2: warning: Argument to free() is a constant address (42), which
is not memory allocated by malloc()
Although the address can be proved to be equal to a compile-time known constant
in one of the branches, it has actually been allocated by malloc(), so it
should not be reported as a problem in this case.</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>