[HWASan] add comment to explain why we can use __has_feature

Bug: 276930343
Change-Id: I0b3e152269a147f67cae3c534be92ee169fe393b
This commit is contained in:
Florian Mayer 2023-06-22 14:55:20 -07:00
parent 063b6bfd65
commit 02108ce6b1

View file

@ -208,6 +208,9 @@ extern "C" __LIBC_HIDDEN__ __attribute__((no_sanitize("memtag"))) void memtag_ha
}
#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)
__hwasan_handle_longjmp(sp_dst);
#endif // __has_feature(hwaddress_sanitizer)