Skip to content

Commit

Permalink
[NFC] [HWASan] Add link to proof for address calculation (llvm#86367)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmayer authored Mar 26, 2024
1 parent 1584014 commit b0b8b16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b0b8b16

Please sign in to comment.