[llvm-commits] [compiler-rt] r150373 - /compiler-rt/trunk/lib/asan/asan_interceptors.cc
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Feb 13 04:04:36 PST 2012
Author: eugenis
Date: Mon Feb 13 06:04:36 2012
New Revision: 150373
URL: http://llvm.org/viewvc/llvm-project?rev=150373&view=rev
Log:
[asan] Disable signal&sigaction interceptors on Android.
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=150373&r1=150372&r2=150373&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Mon Feb 13 06:04:36 2012
@@ -218,7 +218,9 @@
asanThreadRegistry().RegisterThread(t);
return REAL(pthread_create)(thread, attr, asan_thread_start, t);
}
+#endif // !_WIN32
+#if !defined(ANDROID) && !defined(_WIN32)
INTERCEPTOR(void*, signal, int signum, void *handler) {
if (!AsanInterceptsSignal(signum)) {
return REAL(signal)(signum, handler);
@@ -233,7 +235,7 @@
}
return 0;
}
-#endif // _WIN32
+#endif // !ANDROID && !_WIN32
INTERCEPTOR(void, longjmp, void *env, int val) {
__asan_handle_no_return();
@@ -381,6 +383,11 @@
DEFINE_REAL(void*, index, const char *string, int c);
#endif
+#ifdef ANDROID
+DEFINE_REAL(int, sigaction, int signum, const struct sigaction *act,
+ struct sigaction *oldact);
+#endif
+
INTERCEPTOR(int, strcasecmp, const char *s1, const char *s2) {
ENSURE_ASAN_INITED();
unsigned char c1, c2;
@@ -556,8 +563,11 @@
CHECK(INTERCEPT_FUNCTION(strncmp));
CHECK(INTERCEPT_FUNCTION(strncpy));
+#ifndef ANDROID
CHECK(INTERCEPT_FUNCTION(sigaction));
CHECK(INTERCEPT_FUNCTION(signal));
+#endif
+
CHECK(INTERCEPT_FUNCTION(longjmp));
CHECK(INTERCEPT_FUNCTION(_longjmp));
INTERCEPT_FUNCTION(__cxa_throw);
More information about the llvm-commits
mailing list