diff options
author | chefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-08 22:09:33 +0000 |
---|---|---|
committer | chefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-11-08 22:09:33 +0000 |
commit | ed6ca63bde68bcf923ff9157b5f10dabbbfa9d82 (patch) | |
tree | fc259c154a7e47cb3ef4104068c84d998d0265da /libsanitizer/asan | |
parent | 9c9fc2c1f089adc5b6621f2461a4527b300f4794 (diff) | |
download | gcc-ed6ca63bde68bcf923ff9157b5f10dabbbfa9d82.tar.gz |
libsanitizer/
* asan/asan_globals.cc (RegisterGlobal): Do not call
CheckODRViolationViaPoisoning.
(CheckODRViolationViaPoisoning): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/asan')
-rw-r--r-- | libsanitizer/asan/asan_globals.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/libsanitizer/asan/asan_globals.cc b/libsanitizer/asan/asan_globals.cc index 007fce72be0..f2292926e6a 100644 --- a/libsanitizer/asan/asan_globals.cc +++ b/libsanitizer/asan/asan_globals.cc @@ -147,23 +147,6 @@ static void CheckODRViolationViaIndicator(const Global *g) { } } -// Check ODR violation for given global G by checking if it's already poisoned. -// We use this method in case compiler doesn't use private aliases for global -// variables. -static void CheckODRViolationViaPoisoning(const Global *g) { - if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { - // This check may not be enough: if the first global is much larger - // the entire redzone of the second global may be within the first global. - for (ListOfGlobals *l = list_of_all_globals; l; l = l->next) { - if (g->beg == l->g->beg && - (flags()->detect_odr_violation >= 2 || g->size != l->g->size) && - !IsODRViolationSuppressed(g->name)) - ReportODRViolation(g, FindRegistrationSite(g), - l->g, FindRegistrationSite(l->g)); - } - } -} - // Clang provides two different ways for global variables protection: // it can poison the global itself or its private alias. In former // case we may poison same symbol multiple times, that can help us to @@ -211,8 +194,6 @@ static void RegisterGlobal(const Global *g) { // where two globals with the same name are defined in different modules. if (UseODRIndicator(g)) CheckODRViolationViaIndicator(g); - else - CheckODRViolationViaPoisoning(g); } if (CanPoisonMemory()) PoisonRedZones(*g); |