Use likely have tagged pointer. I see no value making user to untag it.
Reviewed By: fmayer
Differential Revision: https://reviews.llvm.org/D147671
}
void __hwasan_tag_memory(uptr p, u8 tag, uptr sz) {
- TagMemoryAligned(p, sz, tag);
+ TagMemoryAligned(UntagAddr(p), sz, tag);
}
uptr __hwasan_tag_pointer(uptr p, u8 tag) {
alloc[79] = 0xee;
alloc[95] = 0xff;
- // __hwasan_tag_memory expects untagged pointers.
- char *p = (char *)__hwasan_tag_pointer(alloc, 0);
- assert(p);
+ char *p = alloc;
// Write tags to shadow.
__hwasan_tag_memory(p, 1, 32);