[llvm-commits] [compiler-rt] r163498 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Sep 10 03:18:49 PDT 2012


Author: eugenis
Date: Mon Sep 10 05:18:49 2012
New Revision: 163498

URL: http://llvm.org/viewvc/llvm-project?rev=163498&view=rev
Log:
[asan] There is no __libc_malloc on Android.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc?rev=163498&r1=163497&r2=163498&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc Mon Sep 10 05:18:49 2012
@@ -15,16 +15,16 @@
 
 // FIXME: We should probably use more low-level allocator that would
 // mmap some pages and split them into chunks to fulfill requests.
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 extern "C" void *__libc_malloc(__sanitizer::uptr size);
 extern "C" void __libc_free(void *ptr);
 # define LIBC_MALLOC __libc_malloc
 # define LIBC_FREE __libc_free
-#else  // __linux__
+#else  // __linux__ && !ANDROID
 # include <stdlib.h>
 # define LIBC_MALLOC malloc
 # define LIBC_FREE free
-#endif  // __linux__
+#endif  // __linux__ && !ANDROID
 
 namespace __sanitizer {
 





More information about the llvm-commits mailing list