[hwasan] fix false positive when hwasan-match-all-tag flag is enabled and short granu...
authorEnna1 <xumingjie.enna1@bytedance.com>
Fri, 28 Apr 2023 08:59:41 +0000 (16:59 +0800)
committerEnna1 <xumingjie.enna1@bytedance.com>
Fri, 28 Apr 2023 09:00:26 +0000 (17:00 +0800)
commitd961f66b28c592d3d34664b613c193cb3f75dd79
treed9729e8e5062db77f4bcde2a38785cb05993340e
parent9baa85271dff411dace755c879cef1412c69ebd9
[hwasan] fix false positive when hwasan-match-all-tag flag is enabled and short granules are used

When hwasan-match-all-tag flag is enabled and short granules are used, at the point checking if this is a short tag case, the tag from pointer is stored in X16 register,
which breaks the assumption that tag from shadow memory is stored in X16 register, this will cause a false positive.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D149252
compiler-rt/test/hwasan/TestCases/short-granule-and-match-all-tag.cpp [new file with mode: 0644]
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/test/CodeGen/AArch64/hwasan-check-memaccess.ll