[compiler-rt] r246741 - [asan] Replace valloc with posix_memalign in test.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 18:22:06 PDT 2015


Author: eugenis
Date: Wed Sep  2 20:22:06 2015
New Revision: 246741

URL: http://llvm.org/viewvc/llvm-project?rev=246741&view=rev
Log:
[asan] Replace valloc with posix_memalign in test.

valloc is gone in android-21.

Modified:
    compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc?rev=246741&r1=246740&r2=246741&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc Wed Sep  2 20:22:06 2015
@@ -2,8 +2,5 @@
 // RUN: %clangxx_asan -O3 %s -o %t && %run %t
 #include <stdlib.h>
 #include <unistd.h>
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
-# include <malloc.h>
-#endif  // !__APPLE__ && !__FreeBSD__
-int *p = (int*)valloc(1 << 20);
-int main() { }
+int *p;
+int main() { posix_memalign((void **)&p, 4096, 1 << 20); }




More information about the llvm-commits mailing list