This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20716] AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 20 Oct 2016 11:14:59 +0000
- Subject: [Bug gdb/20716] AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)
- Auto-submitted: auto-generated
- References: <bug-20716-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20716
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
On 10/19/2016 12:55 PM, qiyao at gcc dot gnu.org wrote:
> Looks the problem is that we replace operator new, but doesn't replace operator
> delete.
Indeed.
Sounds like by overriding operator new/delete we lose
this malloc/free vs operator new/delete mismatch detection.
Maybe a better option would be to _not_ override operator new etc.
when built with -fsanitize=address? I think we can detect
that with #ifdef __SANITIZE_ADDRESS__.
--
You are receiving this mail because:
You are on the CC list for the bug.