diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-12 22:31:19 +0000 |
|---|---|---|
| committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-12 22:31:19 +0000 |
| commit | 34e2b280dafcce55973152ed8c6539e6a03ce761 (patch) | |
| tree | 8736f1165af9ab59129595c4c1d844f36abd3277 /compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc | |
| parent | 5ab8750c5cc5a9e258bc517e40f29dbb5029d501 (diff) | |
| download | bcm5719-llvm-34e2b280dafcce55973152ed8c6539e6a03ce761.tar.gz bcm5719-llvm-34e2b280dafcce55973152ed8c6539e6a03ce761.zip | |
[TSan] Share the code the setup code calling getrlim/setrlim with sanitizer_common
llvm-svn: 215481
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc')
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc index 15d06883944..262a505a537 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc +++ b/compiler-rt/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); } |

