diff options
author | David Benjamin <davidben@chromium.org> | 2015-06-01 20:41:57 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-06-01 20:45:27 +0300 |
commit | 8a228f5bfe82e8178fc42262a1cc21e82c3f8bf8 (patch) | |
tree | f74d7d0cbdef5e4572c16eee5f4977617a66a118 /crypto/test | |
parent | bd15a8e74894616ca8ad04fc2942b958f99000a1 (diff) |
Disable the malloc interceptor without glibc.
At some point we might need to make this defined by the consumer.
BUG=495146
Change-Id: Iedac305f234cb383799a5afc14046cd10fb3256a
Reviewed-on: https://boringssl-review.googlesource.com/4963
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/malloc.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crypto/test/malloc.cc b/crypto/test/malloc.cc index a24f77f4..9ffdf014 100644 --- a/crypto/test/malloc.cc +++ b/crypto/test/malloc.cc @@ -20,13 +20,18 @@ #endif #endif +#if defined(__GLIBC__) && !defined(__UCLIBC__) +#define OPENSSL_GLIBC +#endif + // This file isn't built on ARM or Aarch64 because we link statically in those -// builds and trying to override malloc in a static link doesn't work. It's also -// disabled on ASan builds as this interferes with ASan's malloc interceptor. +// builds and trying to override malloc in a static link doesn't work. It also +// requires glibc. It's also disabled on ASan builds as this interferes with +// ASan's malloc interceptor. // // TODO(davidben): See if this and ASan's and MSan's interceptors can be made to // coexist. -#if defined(__linux__) && !defined(OPENSSL_ARM) && \ +#if defined(__linux__) && defined(OPENSSL_GLIBC) && !defined(OPENSSL_ARM) && \ !defined(OPENSSL_AARCH64) && !defined(OPENSSL_ASAN) #include <stdint.h> @@ -137,4 +142,4 @@ void *realloc(void *ptr, size_t size) { } // extern "C" -#endif /* defined(linux) && !ARM && !AARCH64 && !ASAN */ +#endif /* defined(linux) && GLIBC && !ARM && !AARCH64 && !ASAN */ |