@@ -349,7 +349,7 @@ void __set_stack_and_tls_vma_name(bool is_main_thread) {
349349extern " C" int __rt_sigprocmask (int , const sigset64_t *, sigset64_t *, size_t );
350350
351351__attribute__ ((no_sanitize(" hwaddress" )))
352- #ifdef __aarch64__
352+ #if defined( __aarch64__)
353353// This function doesn't return, but it does appear in stack traces. Avoid using return PAC in this
354354// function because we may end up resetting IA, which may confuse unwinders due to mismatching keys.
355355__attribute__ ((target(" branch-protection=bti" )))
@@ -368,13 +368,13 @@ static int __pthread_start(void* arg) {
368368 __set_stack_and_tls_vma_name (false );
369369 __init_additional_stacks (thread);
370370 __rt_sigprocmask (SIG_SETMASK, &thread->start_mask , nullptr , sizeof (thread->start_mask ));
371- #ifdef __aarch64__
371+ #if defined( __aarch64__)
372372 // Chrome's sandbox prevents this prctl, so only reset IA if the target SDK level is high enough.
373373 // Furthermore, processes loaded from vendor partitions may have their own sandboxes that would
374- // reject the prctl. Because no devices launched with PAC enabled before S , we can avoid issues on
375- // upgrading devices by checking for PAC support before issuing the prctl.
374+ // reject the prctl. Because no devices launched with PAC enabled before API level 31 , we can
375+ // avoid issues on upgrading devices by checking for PAC support before issuing the prctl.
376376 static const bool pac_supported = getauxval (AT_HWCAP) & HWCAP_PACA;
377- if (pac_supported && android_get_application_target_sdk_version () >= __ANDROID_API_S__ ) {
377+ if (pac_supported && android_get_application_target_sdk_version () >= 31 ) {
378378 prctl (PR_PAC_RESET_KEYS, PR_PAC_APIAKEY, 0 , 0 , 0 );
379379 }
380380#endif
0 commit comments