[compiler-rt] c0dc885 - [msan] Use non-transparent-huge-page at SetShadow
Jianzhou Zhao via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 16:30:12 PST 2021
Author: Jianzhou Zhao
Date: 2021-02-27T00:28:57Z
New Revision: c0dc885d29af8f2bd2434047937c2ba65c7c7adb
URL: https://github.com/llvm/llvm-project/commit/c0dc885d29af8f2bd2434047937c2ba65c7c7adb
DIFF: https://github.com/llvm/llvm-project/commit/c0dc885d29af8f2bd2434047937c2ba65c7c7adb.diff
LOG: [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
Added:
Modified:
compiler-rt/lib/msan/msan_poisoning.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/msan/msan_poisoning.cpp b/compiler-rt/lib/msan/msan_poisoning.cpp
index a92b0565cfa8..15892392f74a 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();
}
}
More information about the llvm-commits
mailing list