Skip to content

Commit

Permalink
temporary disable stndup interceptor, due to r302781 being buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
kcc committed May 18, 2017
1 parent 77c912d commit 2960996
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions compiler-rt/test/asan/TestCases/Posix/strndup_oob_test.cc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2960996

Please sign in to comment.