[compiler-rt] 56ee6a1 - [compiler-rt][nsan] Disable coredump creation (#98807)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 11:15:40 PDT 2024
Author: Dmitriy Chestnykh
Date: 2024-07-15T11:15:37-07:00
New Revision: 56ee6a172a8c17944c3b776159b45e15b31444ef
URL: https://github.com/llvm/llvm-project/commit/56ee6a172a8c17944c3b776159b45e15b31444ef
DIFF: https://github.com/llvm/llvm-project/commit/56ee6a172a8c17944c3b776159b45e15b31444ef.diff
LOG: [compiler-rt][nsan] Disable coredump creation (#98807)
Disable core dump creation.
If NSAN_OPTIONS includes abort_on_error=1,
the process may hang as the kernel attempts
to create an excessively large core file.
Fix #98806
Added:
Modified:
compiler-rt/lib/nsan/nsan.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/nsan/nsan.cpp b/compiler-rt/lib/nsan/nsan.cpp
index e5a9b7a036e0e..194093c9679d0 100644
--- a/compiler-rt/lib/nsan/nsan.cpp
+++ b/compiler-rt/lib/nsan/nsan.cpp
@@ -537,7 +537,10 @@ int32_t checkFT(const FT value, ShadowFT Shadow, CheckTypeT CheckType,
}
if (flags().halt_on_error) {
- Printf("Exiting\n");
+ if (common_flags()->abort_on_error)
+ Printf("ABORTING\n");
+ else
+ Printf("Exiting\n");
Die();
}
return flags().resume_after_warning ? kResumeFromValue : kContinueWithShadow;
@@ -791,6 +794,8 @@ extern "C" SANITIZER_INTERFACE_ATTRIBUTE void __nsan_init() {
InitializeSuppressions();
InitializePlatformEarly();
+ DisableCoreDumperIfNecessary();
+
if (!MmapFixedNoReserve(TypesAddr(), UnusedAddr() - TypesAddr()))
Die();
More information about the llvm-commits
mailing list