[sanitizer] only lower the soft coresize limit in DisableCoreDumper
Kostya Serebryany
kcc at google.com
Thu Jul 3 01:06:56 PDT 2014
what's the reason?
On Wed, Jun 25, 2014 at 6:56 PM, Stephan Bergmann <sbergman at redhat.com>
wrote:
> ...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
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140703/a577cc27/attachment.html>
More information about the llvm-commits
mailing list