From 15ebe1fe46a75067b027128e35d75b17a5d4e299 Mon Sep 17 00:00:00 2001 From: Max Ostapenko Date: Wed, 21 Oct 2015 10:47:54 +0300 Subject: [PATCH] re PR bootstrap/63888 (bootstrap failed when configured with -with-build-config=bootstrap-asan --disable-werror) libsanitizer/ PR bootstrap/63888 Reapply: 2015-02-20 Jakub Jelinek * asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation support until it is rewritten upstream. * c-c++-common/asan/pr63888.c: New test. From-SVN: r229114 --- libsanitizer/ChangeLog | 11 +++++++++++ libsanitizer/asan/asan_globals.cc | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 4e463efec46..80ce1585857 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,14 @@ +2015-10-21 Maxim Ostapenko + + PR bootstrap/63888 + Reapply: + 2015-02-20 Jakub Jelinek + + * asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation + support until it is rewritten upstream. + + * c-c++-common/asan/pr63888.c: New test. + 2015-10-21 Maxim Ostapenko PR sanitizer/63958 diff --git a/libsanitizer/asan/asan_globals.cc b/libsanitizer/asan/asan_globals.cc index b132c8b09b9..9c3588b8e08 100644 --- a/libsanitizer/asan/asan_globals.cc +++ b/libsanitizer/asan/asan_globals.cc @@ -144,7 +144,9 @@ static void RegisterGlobal(const Global *g) { CHECK(AddrIsInMem(g->beg)); CHECK(AddrIsAlignedByGranularity(g->beg)); CHECK(AddrIsAlignedByGranularity(g->size_with_redzone)); - if (flags()->detect_odr_violation) { + // This "ODR violation" detection is fundamentally incompatible with + // how GCC registers globals. Disable as useless until rewritten upstream. + if (0 && flags()->detect_odr_violation) { // Try detecting ODR (One Definition Rule) violation, i.e. the situation // where two globals with the same name are defined in different modules. if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { -- 2.30.2