[PATCH] D56603: [HWASAN] Improve tag-mismatch diagnostics
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 18 10:42:49 PST 2019
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM with comments.
Please add a -NOT test line somewhere to check that the new note is not printed in "obvious" cases.
================
Comment at: test/hwasan/TestCases/mem-intrinsics.c:27
// WRITE: Memory tags around the buggy address (one tag corresponds to 16 bytes):
- // WRITE: =>{{.*}}[[MEM_TAG]]
+ // WRITE: =>{{.*}}[[PTR_TAG]]{{[[:space:]]\[}}[[MEM_TAG]]
// WRITE-NOT: recovered
----------------
I think this could be flaky - there is a chance that PTR_TAG will the be last one on its line, and MEM_TAG - the first one on the following line. Align the buffer to at least 256 byte to prevent this from happening. Perhaps simply mmap a page of memory?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56603/new/
https://reviews.llvm.org/D56603
More information about the llvm-commits
mailing list