This is an archive of the discontinued LLVM Phabricator instance.

Update hwasan test to fix failure on older Android API versions.
ClosedPublic

Authored by mnadeem on Aug 12 2022, 1:35 PM.

Details

Summary

In Android API < 30 there is no HWAsan instrumentation support for globals
so the test fails if API < 30 or if the target triple does not specify the API version.

Add -triple=aarch64-linux-android31 to enable global instrumentation. This is the
same triple as is used in the RUN line for -fsanitize=memtag-globals.

Diff Detail

Event Timeline

mnadeem created this revision.Aug 12 2022, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 1:35 PM
Herald added a subscriber: danielkiss. · View Herald Transcript
mnadeem requested review of this revision.Aug 12 2022, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 1:35 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
vitalybuka added inline comments.Aug 12 2022, 4:01 PM
clang/test/CodeGen/sanitizer-special-case-list-globals.c
5

to avoid inconsistency between runs on different platforms, it should probably just run with a fixed
triple, like MEMTAG

vitalybuka accepted this revision.Aug 12 2022, 4:08 PM

Either way is good, but I slightly prefer the triple.

This revision is now accepted and ready to land.Aug 12 2022, 4:08 PM
mnadeem updated this revision to Diff 452326.Aug 12 2022, 4:19 PM
mnadeem edited the summary of this revision. (Show Details)

Update to use the same triple as MEMTAG

mnadeem marked an inline comment as done.Aug 12 2022, 4:29 PM
This revision was landed with ongoing or failed builds.Aug 12 2022, 4:31 PM
This revision was automatically updated to reflect the committed changes.
hctim added a comment.Aug 15 2022, 2:05 PM

Thanks for the patch!