From 6fd4da6196928a4b3a11341b9b2a747887e550f0 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 12 Aug 2014 22:31:19 +0000 Subject: [TSan] Share the code the setup code calling getrlim/setrlim with sanitizer_common git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215481 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/tsan/rtl/tsan_platform_mac.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/tsan/rtl/tsan_platform_mac.cc') diff --git a/lib/tsan/rtl/tsan_platform_mac.cc b/lib/tsan/rtl/tsan_platform_mac.cc index 15d068839..262a505a5 100644 --- a/lib/tsan/rtl/tsan_platform_mac.cc +++ b/lib/tsan/rtl/tsan_platform_mac.cc @@ -74,16 +74,7 @@ void InitializeShadowMemory() { #endif const char *InitializePlatform() { - void *p = 0; - if (sizeof(p) == 8) { - // Disable core dumps, dumping of 16TB usually takes a bit long. - // The following magic is to prevent clang from replacing it with memset. - volatile rlimit lim; - lim.rlim_cur = 0; - lim.rlim_max = 0; - setrlimit(RLIMIT_CORE, (rlimit*)&lim); - } - + DisableCoreDumperIfNecessary(); return GetEnv(kTsanOptionsEnv); } -- cgit v1.2.3