[compiler-rt] r243137 - [asan] Fix android system property access on aarch64.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jul 24 11:57:44 PDT 2015
Author: eugenis
Date: Fri Jul 24 13:57:44 2015
New Revision: 243137
URL: http://llvm.org/viewvc/llvm-project?rev=243137&view=rev
Log:
[asan] Fix android system property access on aarch64.
__system_property_get is gone from the NDK headers and libs in 64-bit
toolchains, but it is still exported by platform libc.so.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=243137&r1=243136&r2=243137&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Fri Jul 24 13:57:44 2015
@@ -73,10 +73,6 @@ extern char **environ; // provided by c
#include <sys/signal.h>
#endif
-#if SANITIZER_ANDROID
-#include <sys/system_properties.h>
-#endif
-
#if SANITIZER_LINUX
// <linux/time.h>
struct kernel_timeval {
@@ -918,8 +914,12 @@ uptr internal_clone(int (*fn)(void *), v
#endif // defined(__x86_64__) && SANITIZER_LINUX
#if SANITIZER_ANDROID
+#define PROP_VALUE_MAX 92
+extern "C" SANITIZER_WEAK_ATTRIBUTE int __system_property_get(const char *name,
+ char *value);
void GetExtraActivationFlags(char *buf, uptr size) {
CHECK(size > PROP_VALUE_MAX);
+ CHECK(&__system_property_get);
__system_property_get("asan.options", buf);
}
More information about the llvm-commits
mailing list