diff options
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h | 3 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 2618ff850fe..645353884e0 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -59,6 +59,7 @@ # define SANITIZER_INTERCEPT_FREXPF_FREXPL SI_NOT_WINDOWS # define SANITIZER_INTERCEPT_GETPWNAM_GETPWUID SI_NOT_WINDOWS -# define SANITIZER_INTERCEPT_GETPWNAM_R_GETPWUID_R SI_MAC || SI_LINUX_NOT_ANDROID +# define SANITIZER_INTERCEPT_GETPWNAM_R_GETPWUID_R \ + SI_MAC || SI_LINUX_NOT_ANDROID # define SANITIZER_INTERCEPT_CLOCK_GETTIME SI_LINUX # define SANITIZER_INTERCEPT_GETITIMER SI_NOT_WINDOWS diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc index 1731913e043..05da7fb0ebd 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc @@ -350,7 +350,7 @@ void StopTheWorld(StopTheWorldCallback callback, void *argument) { } // Platform-specific methods from SuspendedThreadsList. -#if defined(SANITIZER_ANDROID) && defined(__arm__) +#if defined(__arm__) typedef pt_regs regs_struct; #else typedef user_regs_struct regs_struct; @@ -368,10 +368,12 @@ int SuspendedThreadsList::GetRegistersAndSP(uptr index, } #if defined(__arm__) *sp = regs.ARM_sp; -#elif SANITIZER_WORDSIZE == 32 +#elif defined(__i386__) *sp = regs.esp; -#else +#elif defined(__x86_64__) *sp = regs.rsp; +#else + UNIMPLEMENTED("Unknown architecture"); #endif internal_memcpy(buffer, ®s, sizeof(regs)); return 0; |