diff options
author | Alexander Potapenko <glider@google.com> | 2013-10-17 15:48:24 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-10-17 15:48:24 +0000 |
commit | 8e22b68ce64e34d3fc90f02d967bcceb279f3302 (patch) | |
tree | 6efd8a12757543c69707a6ce4c26cee57a17eea4 | |
parent | 13521a267f509a06e92baa154947b9d2cde0eed8 (diff) | |
download | compiler-rt-8e22b68ce64e34d3fc90f02d967bcceb279f3302.tar.gz compiler-rt-8e22b68ce64e34d3fc90f02d967bcceb279f3302.tar.bz2 compiler-rt-8e22b68ce64e34d3fc90f02d967bcceb279f3302.tar.xz |
[ASan] fix assign_large_valloc_to_global.cc to use the correct header for valloc() on OSX.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192901 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc b/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc index 5275dd16..87a65984 100644 --- a/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc +++ b/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc @@ -1,5 +1,9 @@ // Make sure we don't report a leak nor hang. // RUN: %clangxx_asan -O3 %s -o %t && %t +#if defined(__APPLE__) +#include <stdlib.h> +#else #include <malloc.h> +#endif int *p = (int*)valloc(1 << 20); int main() { } |