From 9aa8ef8504c9be48742037068a97098ebc9d52fe Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Thu, 18 May 2017 03:00:07 +0000 Subject: [PATCH] temporary disable stndup interceptor, due to r302781 being buggy llvm-svn: 303324 --- .../lib/sanitizer_common/sanitizer_platform_interceptors.h | 5 +++-- compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h | 3 ++- compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index a954974..a1a0f43 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -98,8 +98,9 @@ #define SANITIZER_INTERCEPT_MEMMOVE 1 #define SANITIZER_INTERCEPT_MEMCPY 1 #define SANITIZER_INTERCEPT_MEMCMP 1 -#define SANITIZER_INTERCEPT_STRNDUP SI_POSIX -#define SANITIZER_INTERCEPT___STRNDUP SI_LINUX_NOT_FREEBSD +// temporary disabled until r302781 is reverted or fixed. +#define SANITIZER_INTERCEPT_STRNDUP (0 && SI_POSIX) +#define SANITIZER_INTERCEPT___STRNDUP (0 && SI_LINUX_NOT_FREEBSD) #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 # define SI_MAC_DEPLOYMENT_BELOW_10_7 1 diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h index b7728d9..f42142a 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h @@ -125,7 +125,8 @@ static inline uint32_t my_rand() { #endif #if !defined(_MSC_VER) -# define SANITIZER_TEST_HAS_STRNDUP 1 +// Test temporary disabled until r302781 is reverted or fixed. +# define SANITIZER_TEST_HAS_STRNDUP 0 #else # define SANITIZER_TEST_HAS_STRNDUP 0 #endif diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc index 7ea0b7a..09df964 100644 --- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc +++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc @@ -1,10 +1,11 @@ -// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: echo DISABLED +// DISABLED: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// DISABLED: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// DISABLED: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// DISABLED: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // When built as C on Linux, strndup is transformed to __strndup. -// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s +// DISABLED: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s // Unwind problem on arm: "main" is missing from the allocation stack trace. // UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf -- 2.7.4