[llvm-bugs] [Bug 32957] New: Mismatched free vs. operator delete

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 7 09:14:03 PDT 2017


            Bug ID: 32957
           Summary: Mismatched free vs. operator delete
           Product: clang
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: demiobenour at gmail.com
                CC: llvm-bugs at lists.llvm.org

When using LD_PRELOAD=/usr/lib64/libasan.so.4.0.0 (to find bugs in my
application), Clang gives

> ==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)

Likely cause is that Clang overrides operator new but not operator delete.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170507/c5b7725c/attachment.html>

More information about the llvm-bugs mailing list