[llvm] b0b8b16 - [NFC] [HWASan] Add link to proof for address calculation (#86367)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 13:41:17 PDT 2024
Author: Florian Mayer
Date: 2024-03-26T13:41:13-07:00
New Revision: b0b8b16bb8dfb8c60fe9665c6a1c306306b716d2
URL: https://github.com/llvm/llvm-project/commit/b0b8b16bb8dfb8c60fe9665c6a1c306306b716d2
DIFF: https://github.com/llvm/llvm-project/commit/b0b8b16bb8dfb8c60fe9665c6a1c306306b716d2.diff
LOG: [NFC] [HWASan] Add link to proof for address calculation (#86367)
Added:
Modified:
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 3c95610fa3e80b..c8f7ed448279f3 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1104,6 +1104,8 @@ void HWAddressSanitizer::tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag,
// FIXME: the interceptor is not as fast as real memset. Consider lowering
// llvm.memset right here into either a sequence of stores, or a call to
// hwasan_tag_memory.
+ // Mechanical proof of this address calculation can be found at:
+ // https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/prove_hwasanwrap.smt2
if (ShadowSize)
IRB.CreateMemSet(ShadowPtr, Tag, ShadowSize, Align(1));
if (Size != AlignedSize) {
More information about the llvm-commits
mailing list