Skip to content
Snippets Groups Projects
Commit b49a3bf7 authored by Leonard Chan's avatar Leonard Chan
Browse files

[compiler-rt][hwasan][fuchsia] Implement TagMemoryAligned for fuchsia

This will just be a call into __sanitizer_fill_shadow defined in the fuchsia source tree. This depends on D105663.

Differential Revision: https://reviews.llvm.org/D105664
parent 45951ad3
No related branches found
No related tags found
No related merge requests found
......@@ -152,6 +152,14 @@ static void ThreadExitHook(void *hook, thrd_t self) {
hwasanThreadList().ReleaseThread(thread);
}
uptr TagMemoryAligned(uptr p, uptr size, tag_t tag) {
CHECK(IsAligned(p, kShadowAlignment));
CHECK(IsAligned(size, kShadowAlignment));
__sanitizer_fill_shadow(p, size, tag,
common_flags()->clear_shadow_mmap_threshold);
return AddTagToPointer(p, tag);
}
// Not implemented because Fuchsia does not use signal handlers.
void HwasanOnDeadlySignal(int signo, void *info, void *context) {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment