This is an archive of the discontinued LLVM Phabricator instance.

[HWASan] Run LAM tests with -hwasan-generate-tags-with-calls.
ClosedPublic

Authored by morehouse on Jun 17 2021, 9:54 AM.

Details

Summary

The default callback instrumentation in x86 LAM mode uses ASLR bits
to randomly choose a tag, and thus has a 1/64 chance of choosing a
stack tag of 0, causing stack tests to fail intermittently. By using
__hwasan_generate_tag to pick tags, we guarantee non-zero tags and
eliminate the test flakiness.

aarch64 doesn't seem to have this problem using thread-local addresses
to pick tags, so perhaps we can remove this workaround once we implement
a similar mechanism for LAM.

Diff Detail

Event Timeline

morehouse created this revision.Jun 17 2021, 9:54 AM
morehouse requested review of this revision.Jun 17 2021, 9:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2021, 9:54 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
eugenis accepted this revision.Jun 17 2021, 4:12 PM

LGTM

This revision is now accepted and ready to land.Jun 17 2021, 4:12 PM