From c0dc885d29af8f2bd2434047937c2ba65c7c7adb Mon Sep 17 00:00:00 2001 From: Jianzhou Zhao Date: Fri, 26 Feb 2021 23:34:02 +0000 Subject: [PATCH] [msan] Use non-transparent-huge-page at SetShadow This prevents from getting THP ranges more and more. Did not see any issues in practice, just found this by code review. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D97593 --- compiler-rt/lib/msan/msan_poisoning.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/msan/msan_poisoning.cpp b/compiler-rt/lib/msan/msan_poisoning.cpp index a92b056..1589239 100644 --- a/compiler-rt/lib/msan/msan_poisoning.cpp +++ b/compiler-rt/lib/msan/msan_poisoning.cpp @@ -213,7 +213,7 @@ void SetShadow(const void *ptr, uptr size, u8 value) { if (page_end != shadow_end) { REAL(memset)((void *)page_end, 0, shadow_end - page_end); } - if (!MmapFixedNoReserve(page_beg, page_end - page_beg)) + if (!MmapFixedSuperNoReserve(page_beg, page_end - page_beg)) Die(); } } -- 2.7.4