diff options
author | Pedro Alves <palves@redhat.com> | 2016-10-25 13:32:26 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-10-25 13:32:26 +0100 |
commit | e4426cb42f082b0dc1298a173014f18ff0ff7ea7 (patch) | |
tree | 8ddb30d4cc73509445877dd403a974fdffaca5ed /gdb/common | |
parent | 28fe4f87e0b815f4c0d9b80e0a9f3e6a53c649b3 (diff) | |
download | gdb-e4426cb42f082b0dc1298a173014f18ff0ff7ea7.zip gdb-e4426cb42f082b0dc1298a173014f18ff0ff7ea7.tar.gz gdb-e4426cb42f082b0dc1298a173014f18ff0ff7ea7.tar.bz2 |
new-op.c: Add comment about -fsanitize=address
gdb/ChangeLog:
2016-10-25 Pedro Alves <palves@redhat.com>
* common/new-op.c: Add comment about -fsanitize=address.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/new-op.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/common/new-op.c b/gdb/common/new-op.c index f04c5cb..1eb4f94 100644 --- a/gdb/common/new-op.c +++ b/gdb/common/new-op.c @@ -33,6 +33,12 @@ 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 |