This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/20716] AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]