This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] have callbacks for 32 and 64 byte ops
Needs ReviewPublic

Authored by fmayer on Sep 22 2021, 7:25 AM.

Details

Reviewers
eugenis

Diff Detail

Event Timeline

fmayer created this revision.Sep 22 2021, 7:25 AM
fmayer requested review of this revision.Sep 22 2021, 7:25 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 22 2021, 7:25 AM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
fmayer updated this revision to Diff 374229.Sep 22 2021, 7:29 AM

add test

fmayer updated this revision to Diff 374232.Sep 22 2021, 7:41 AM

add store test

fmayer updated this revision to Diff 374236.Sep 22 2021, 7:51 AM

simplify

fmayer updated this revision to Diff 374240.Sep 22 2021, 8:02 AM

add more tests

eugenis added inline comments.Sep 22 2021, 2:01 PM
compiler-rt/lib/hwasan/hwasan.cpp
451

I think you need to update CheckAddress - it only ever checks the first granule.

And it would be great to have a runtime test that ex. 64-byte access checks the middle and the last granules.

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
74

rename it to something like kApi32NumberOfAccessSizes. "old" is too vague.

1049

as I understand, this will work for 64-byte access that is only 16-byte aligned. Could you add a test for this?