diff options
author | Pierre Gousseau <pierregousseau14@gmail.com> | 2017-06-01 09:37:22 +0000 |
---|---|---|
committer | Pierre Gousseau <pierregousseau14@gmail.com> | 2017-06-01 09:37:22 +0000 |
commit | 27c8277872fdff5466439844251c9c52ec37dadb (patch) | |
tree | 54db5314d40ec06270abfc355f39fd2696e4985f /lib/sanitizer_common/tests | |
parent | 9b2c60be6745a807592f96e7238c331c2308f615 (diff) |
[asan] Add strndup/__strndup interceptors.
Recommit of r302781 with Vitaly Buka's fix for non zero terminated strings.
Differential Revision: https://reviews.llvm.org/D31457
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r-- | lib/sanitizer_common/tests/sanitizer_test_utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_test_utils.h b/lib/sanitizer_common/tests/sanitizer_test_utils.h index 9c162a66f..b7728d9ea 100644 --- a/lib/sanitizer_common/tests/sanitizer_test_utils.h +++ b/lib/sanitizer_common/tests/sanitizer_test_utils.h @@ -124,4 +124,10 @@ static inline uint32_t my_rand() { # define SANITIZER_TEST_HAS_PRINTF_L 0 #endif +#if !defined(_MSC_VER) +# define SANITIZER_TEST_HAS_STRNDUP 1 +#else +# define SANITIZER_TEST_HAS_STRNDUP 0 +#endif + #endif // SANITIZER_TEST_UTILS_H |