[sanitizer] only lower the soft coresize limit in DisableCoreDumper
Stephan Bergmann
sbergman at redhat.com
Wed Jun 25 07:56:43 PDT 2014
...so that e.g. a spawned sub-thread could increase that limit again:
> Index: lib/sanitizer_common/sanitizer_posix_libcdep.cc
> ===================================================================
> --- lib/sanitizer_common/sanitizer_posix_libcdep.cc (revision 211695)
> +++ lib/sanitizer_common/sanitizer_posix_libcdep.cc (working copy)
> @@ -46,8 +46,10 @@
>
> void DisableCoreDumper() {
> struct rlimit nocore;
> + if (getrlimit(RLIMIT_CORE, &nocore) == -1) {
> + nocore.rlim_max = 0;
> + }
> nocore.rlim_cur = 0;
> - nocore.rlim_max = 0;
> setrlimit(RLIMIT_CORE, &nocore);
> }
>
Stephan
More information about the llvm-commits
mailing list