aarch64 sanitizer bits

This commit is contained in:
christos 2018-07-15 00:32:40 +00:00
parent 1fa371c02e
commit 8254ea8c8b
2 changed files with 8 additions and 2 deletions

View File

@ -1018,7 +1018,7 @@ uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
: "memory", "$29" );
return res;
}
#elif defined(__aarch64__)
#elif defined(__aarch64__) && SANITIZER_LINUX
uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
int *parent_tidptr, void *newtls, int *child_tidptr) {
long long res;
@ -1171,9 +1171,15 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
# endif
#elif defined(__aarch64__)
ucontext_t *ucontext = (ucontext_t*)context;
# if SANITIZER_NETBSD
*pc = _UC_MACHINE_PC(ucontext);
*sp = _UC_MACHINE_SP(ucontext);
*bp = ucontext->uc_mcontext.__gregs[29]; /* XXX */
# else
*pc = ucontext->uc_mcontext.pc;
*bp = ucontext->uc_mcontext.regs[29];
*sp = ucontext->uc_mcontext.sp;
# endif
#elif defined(__hppa__)
ucontext_t *ucontext = (ucontext_t*)context;
# if SANITIZER_NETBSD

View File

@ -34,7 +34,7 @@
#if SANITIZER_ANDROID && defined(__arm__)
# include <linux/user.h> // for pt_regs
#else
# ifdef __aarch64__
# if SANITIZER_LINUX && defined( __aarch64__)
// GLIBC 2.20+ sys/user does not include asm/ptrace.h
# include <asm/ptrace.h>
# endif