diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-10 01:02:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-10 01:02:07 +0000 |
commit | 0e5cfdbfafe857e39f876a8a23e7ae69474d75c2 (patch) | |
tree | cdd69b84cc2f793888992f8fb76440dc2db17c72 /libc | |
parent | 707cb88cc7762c4732974a44e476b12d4b23c9fc (diff) | |
parent | eb5f5d8db6fcbda80ea3938627bcb1e8cc95666a (diff) |
Snap for 7444394 from eb5f5d8db6fcbda80ea3938627bcb1e8cc95666a to sc-release
Change-Id: I5079bd6e17c679b484afe17d5e3d2d54a24bc609
Diffstat (limited to 'libc')
-rw-r--r-- | libc/bionic/pthread_create.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp index 46d9e8672..121b26f82 100644 --- a/libc/bionic/pthread_create.cpp +++ b/libc/bionic/pthread_create.cpp @@ -331,6 +331,11 @@ void __set_stack_and_tls_vma_name(bool is_main_thread) { extern "C" int __rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t); __attribute__((no_sanitize("hwaddress"))) +#ifdef __aarch64__ +// This function doesn't return, but it does appear in stack traces. Avoid using return PAC in this +// function because we may end up resetting IA, which may confuse unwinders due to mismatching keys. +__attribute__((target("branch-protection=bti"))) +#endif static int __pthread_start(void* arg) { pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(arg); |