diff options
author | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-12-02 07:39:27 +0000 |
---|---|---|
committer | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-12-02 07:39:27 +0000 |
commit | 0d804aa9afad8418e27c91579def01c59cd442e5 (patch) | |
tree | 9fbdf0659d0c0d3375472bd8ec482b390381fa99 /config | |
parent | b9e98e03a7356241f5c125eebc9f11287d6cc997 (diff) |
Add support for ASan odr_indicator.
config/
* bootstrap-asan.mk: Replace LSAN_OPTIONS=detect_leaks=0 with
ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1.
gcc/
* asan.c (asan_global_struct): Refactor.
(create_odr_indicator): New function.
(asan_needs_odr_indicator_p): Likewise.
(is_odr_indicator): Likewise.
(asan_add_global): Introduce odr_indicator_ptr. Pass it into global's
constructor.
(asan_protect_global): Do not protect odr indicators.
gcc/c-family/
* c-attribs.c (asan odr indicator): New attribute.
(handle_asan_odr_indicator_attribute): New function.
gcc/testsuite/
* c-c++-common/asan/no-redundant-odr-indicators-1.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@243153 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 5 | ||||
-rw-r--r-- | config/bootstrap-asan.mk | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 8dcb4831b17..a823d21626b 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com> + + * bootstrap-asan.mk: Replace LSAN_OPTIONS=detect_leaks=0 with + ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1. + 2016-12-01 Matthias Klose <doko@ubuntu.com> * pkg.m4: Remove. diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk index 70baaf9bb17..e73d4c2cfb8 100644 --- a/config/bootstrap-asan.mk +++ b/config/bootstrap-asan.mk @@ -1,7 +1,7 @@ # This option enables -fsanitize=address for stage2 and stage3. # Suppress LeakSanitizer in bootstrap. -export LSAN_OPTIONS="detect_leaks=0" +export ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1 STAGE2_CFLAGS += -fsanitize=address STAGE3_CFLAGS += -fsanitize=address |