Merge "[HWASan] add comment to explain why we can use __has_feature" am: 26e0e00279 am: f04c163217 am: 8d60940a21

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2636328

Change-Id: Iaf1938cc09d60b775134d703b7d9324fcd8aa07f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Florian Mayer 2023-06-23 03:50:10 +00:00 committed by Automerger Merge Worker
commit 28f93db5a7

View file

@ -208,6 +208,9 @@ extern "C" __LIBC_HIDDEN__ __attribute__((no_sanitize("memtag"))) void memtag_ha
} }
#endif // __aarch64__ #endif // __aarch64__
// We can use __has_feature here rather than __hwasan_handle_longjmp as a
// weak symbol because this is part of libc which is always sanitized for a
// hwasan enabled process.
#if __has_feature(hwaddress_sanitizer) #if __has_feature(hwaddress_sanitizer)
__hwasan_handle_longjmp(sp_dst); __hwasan_handle_longjmp(sp_dst);
#endif // __has_feature(hwaddress_sanitizer) #endif // __has_feature(hwaddress_sanitizer)