<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 - Mismatched free vs. operator delete"
href="https://bugs.llvm.org/show_bug.cgi?id=32957">32957</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Mismatched free vs. operator delete
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>demiobenour@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>When using LD_PRELOAD=/usr/lib64/libasan.so.4.0.0 (to find bugs in my
application), Clang gives
<span class="quote">> ==6733==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x603000002500
> #0 0x7f606d12dfd0 in operator delete(void*) (/usr/lib64/libasan.so.4.0.0+0xe0fd0)
> #1 0x55ee0b851833 in main (/usr/bin/clang-3.9+0xa833)
> #2 0x7f6067be55fd in __libc_start_main (/lib64/libc.so.6+0x205fd)
> #3 0x55ee0b853db9 in _start (/usr/bin/clang-3.9+0xcdb9)
>
> 0x603000002500 is located 0 bytes inside of 31-byte region [0x603000002500,0x60300000251f)
> allocated by thread T0 here:
> #0 0x7f606d12b850 in malloc (/usr/lib64/libasan.so.4.0.0+0xde850)
> #1 0x7f606c059ae7 in operator new(unsigned long) (/lib64/libLLVM-3.9.so+0x1b90ae7)</span >
Likely cause is that Clang overrides operator new but not operator delete.</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>