This is an archive of the discontinued LLVM Phabricator instance.

hwasan: Reland "hwasan: lay groundwork for importing subset of sanitizer_common interceptors [NFC]" with fixes
AbandonedPublic

Authored by thurston on May 19 2023, 9:06 AM.

Details

Reviewers
vitalybuka
Summary

https://reviews.llvm.org/D150708 had been reverted because of a stage2/hwasan check failure
(https://lab.llvm.org/buildbot/#/builders/236/builds/4069). That was due to a missing SANITIZER_INTERCEPTOR_
guard for wcslen in sanitizer_common; as a result, the wcslen interceptor had been erroneously
included in hwasan. This sanitizer_common issue was fixed in https://reviews.llvm.org/D150909

Compared to https://reviews.llvm.org/D150708, this patch clears the newly added SANITIZER_INTERCEPTOR_WCSLEN.

This patch also subsumes two minor fixes that had been applied on top of D150708 (unused variables and functions).

Original commit message:
This patch does the bare minimum to import sanitizer_common_interceptors, but
without actually enabling any interceptors or meaningfully defining the
COMMON_INTERCEPT macros.

This will allow selectively enabling sanitizer_common interceptors (if the
appropriate macros are defined), as suggested by Vitaly in D149701.

Diff Detail

Event Timeline

thurston created this revision.May 19 2023, 9:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 9:06 AM
Herald added a subscriber: Enna1. · View Herald Transcript
thurston requested review of this revision.May 19 2023, 9:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 9:06 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thurston added a subscriber: pcc.

for reland we usually reopen original review and upload new version there

thurston abandoned this revision.May 19 2023, 4:16 PM

Will reopen original review