Page MenuHomePhabricator

[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

Unit TestsFailed

TimeTest
750 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-cxa-atexit.S
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-cxa-atexit.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-cxa-atexit.S
740 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-static-initializer.S
Script: -- : 'RUN: at line 7'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-static-initializer.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-static-initializer.S
640 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-tls.S
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-tls.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-tls.S

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?