Skip to content

Commit b0b8b16

Browse files
authored
[NFC] [HWASan] Add link to proof for address calculation (#86367)
1 parent 1584014 commit b0b8b16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,8 @@ void HWAddressSanitizer::tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag,
11041104
// FIXME: the interceptor is not as fast as real memset. Consider lowering
11051105
// llvm.memset right here into either a sequence of stores, or a call to
11061106
// hwasan_tag_memory.
1107+
// Mechanical proof of this address calculation can be found at:
1108+
// https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/prove_hwasanwrap.smt2
11071109
if (ShadowSize)
11081110
IRB.CreateMemSet(ShadowPtr, Tag, ShadowSize, Align(1));
11091111
if (Size != AlignedSize) {

0 commit comments

Comments
 (0)