[PATCH] D98875: [HWASan] Use page aliasing on x86_64.
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 17:13:05 PDT 2021
morehouse marked an inline comment as done.
morehouse added inline comments.
================
Comment at: compiler-rt/test/hwasan/TestCases/hwasan-print-shadow.cpp:11-14
+ char *p = (char *)malloc(4096);
assert(p);
__hwasan_tag_memory(p, 1, 32);
----------------
morehouse wrote:
> EccoTheDolphin wrote:
> > @morehouse and @eugenis it seems that __hwasan_tag_memory expects untagged pointer. This particular piece looks a little bit suspicious. Could you please clarify?
> Nice catch. I think it currently works since allocator tagging is disabled by default for the HWASan tests.
>
> But we probably shouldn't rely on that.
We do need the malloc instead of mmap on x86 since only the heap is aliased.
Submitted https://reviews.llvm.org/rG3511022f5f0a to explicitly untag the pointer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98875/new/
https://reviews.llvm.org/D98875
More information about the llvm-commits
mailing list