new-op.c: Add comment about -fsanitize=address
authorPedro Alves <palves@redhat.com>
Tue, 25 Oct 2016 12:32:26 +0000 (13:32 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 25 Oct 2016 12:32:26 +0000 (13:32 +0100)
gdb/ChangeLog:
2016-10-25  Pedro Alves  <palves@redhat.com>

* common/new-op.c: Add comment about -fsanitize=address.

gdb/ChangeLog
gdb/common/new-op.c

index 40fab9bcd1ef134a161a7e8ab2cd1ce6aa382995..c2a8579a5c2765ceda29bbbc612036ffeafb1569 100644 (file)
@@ -1,3 +1,7 @@
+2016-10-25  Pedro Alves  <palves@redhat.com>
+
+       * common/new-op.c: Add comment about -fsanitize=address.
+
 2016-10-25  Pedro Alves  <palves@redhat.com>
 
        * common/common-defs.h (__STDC_CONSTANT_MACROS)
index f04c5cbbfc0f12fd08258a8a85d79dca7faba6f8..1eb4f94efeb4d33e9d04821e07f46bbf797059c1 100644 (file)
    new-handler function instead (std::set_new_handler) because we want
    to catch allocation errors from within global constructors too.
 
+   Skip overriding if building with -fsanitize=address though.
+   Address sanitizer wants to override operator new/delete too in
+   order to detect malloc+delete and new+free mismatches.  Our
+   versions would mask out ASan's, with the result of losing that
+   useful mismatch detection.
+
    Note that C++ implementations could either have their throw
    versions call the nothrow versions (libstdc++), or the other way
    around (clang/libc++).  For that reason, we replace both throw and
This page took 0.028801 seconds and 4 git commands to generate.