[HWASAN] Untag before tagging alloca pointers
authorVitaly Buka <vitalybuka@google.com>
Mon, 1 May 2023 01:10:40 +0000 (18:10 -0700)
committerVitaly Buka <vitalybuka@google.com>
Mon, 1 May 2023 01:26:58 +0000 (18:26 -0700)
commit37f6c9f8520cb14743259c9576c8c6beac954251
tree8b22f9f182163f56802a41f70fe2e32836c2e9a9
parent3db96aa89e5103730d929dd2ba668af26753e2a4
[HWASAN] Untag before tagging alloca pointers

This is folloup to b5595836, which missed the
Replacemen variable.

Before b5595836 the code assumed that alloca
ptrs are not tagged so tagging is implemented
as simple OR.

So this patch completes support of tagged SP
by passing untagged alloca pointers into
tagPointer.
15 files changed:
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca-with-calls.ll
llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll
llvm/test/Instrumentation/HWAddressSanitizer/RISCV/exception-lifetime.ll
llvm/test/Instrumentation/HWAddressSanitizer/RISCV/use-after-scope-setjmp.ll
llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-array.ll
llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca-with-calls.ll
llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll
llvm/test/Instrumentation/HWAddressSanitizer/alloca-array.ll
llvm/test/Instrumentation/HWAddressSanitizer/alloca-with-calls.ll
llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll
llvm/test/Instrumentation/HWAddressSanitizer/exception-lifetime.ll
llvm/test/Instrumentation/HWAddressSanitizer/kernel-alloca.ll
llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope-setjmp.ll
llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll