This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v2 4/6] Libsanitizer merge from upstream r250806 (was r249633).
- From: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Kostya Serebryany <kcc at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Dmitry Vyukov <dvyukov at google dot com>, Marek Polacek <polacek at redhat dot com>, Yury Gribov <y dot gribov at samsung dot com>, Slava Garbuzov <v dot garbuzov at samsung dot com>, Vyacheslav Barinov <v dot barinov at samsung dot com>
- Date: Tue, 20 Oct 2015 14:25:18 +0300
- Subject: [PATCH v2 4/6] Libsanitizer merge from upstream r250806 (was r249633).
- Authentication-results: sourceware.org; auth=none
- References: <56262292 dot 3030803 at partner dot samsung dot com>
This is a reapplied Jakub's patch for disabling ODR violation detection.
The patch was preapproved here:
(https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01215.html).
2015-10-20 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
PR bootstrap/63888
Reapply:
2015-02-20 Jakub Jelinek <jakub@redhat.com>
* asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation
support until it is rewritten upstream.
* c-c++-common/asan/pr63888.c: New test.
Index: libsanitizer/asan/asan_globals.cc
===================================================================
--- libsanitizer/asan/asan_globals.cc (revision 250059)
+++ libsanitizer/asan/asan_globals.cc (working copy)
@@ -146,7 +146,9 @@
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)) {