[compiler-rt] 7590c00 - [dfsan] Turn off THP at dfsan_flush
Jianzhou Zhao via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 09:11:20 PST 2021
Author: Jianzhou Zhao
Date: 2021-02-12T17:10:09Z
New Revision: 7590c0078dd53d9ad508725fc27d96705ac3a206
URL: https://github.com/llvm/llvm-project/commit/7590c0078dd53d9ad508725fc27d96705ac3a206
DIFF: https://github.com/llvm/llvm-project/commit/7590c0078dd53d9ad508725fc27d96705ac3a206.diff
LOG: [dfsan] Turn off THP at dfsan_flush
https://reviews.llvm.org/D89662 turned this off at dfsan_init.
dfsan_flush also needs to turn it off.
W/o this a program may get more and more memory usage after hours.
Reviewed-by: morehouse
Differential Revision: https://reviews.llvm.org/D96569
Added:
Modified:
compiler-rt/lib/dfsan/dfsan.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/dfsan/dfsan.cpp b/compiler-rt/lib/dfsan/dfsan.cpp
index 43a5fe9e62a8..7abdf68e48b9 100644
--- a/compiler-rt/lib/dfsan/dfsan.cpp
+++ b/compiler-rt/lib/dfsan/dfsan.cpp
@@ -551,7 +551,7 @@ static void dfsan_fini() {
}
extern "C" void dfsan_flush() {
- if (!MmapFixedNoReserve(ShadowAddr(), UnusedAddr() - ShadowAddr()))
+ if (!MmapFixedSuperNoReserve(ShadowAddr(), UnusedAddr() - ShadowAddr()))
Die();
}
@@ -560,8 +560,7 @@ static void dfsan_init(int argc, char **argv, char **envp) {
::InitializePlatformEarly();
- if (!MmapFixedSuperNoReserve(ShadowAddr(), UnusedAddr() - ShadowAddr()))
- Die();
+ dfsan_flush();
if (common_flags()->use_madv_dontdump)
DontDumpShadowMemory(ShadowAddr(), UnusedAddr() - ShadowAddr());
More information about the llvm-commits
mailing list