Bug 385912

Summary: none/tests/rlimit_nofile fails on newer glibc/kernel
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.13.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Mark Wielaard 2017-10-18 13:56:07 UTC
none/tests/rlimit_nofile fails because it expects setrlimit(RLIMIT_NOFILE, NULL) == -1 and errno == EFAULT. But on newer glibc/kernel this just silently succeeds. This might be a regression in glibc (or the kernel?). See https://sourceware.org/ml/libc-alpha/2017-10/msg00830.html
Comment 1 Mark Wielaard 2017-10-20 12:59:14 UTC
commit 476b52d62dd9513a97235caad6f0275cbb903fc2
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Oct 20 14:55:06 2017 +0200

    Bug #385912. Remove explicit NULL check from none/tests/rlimit_nofile.
    
    glibc doesn't guarantee anything about setrlimit with a NULL limit argument.
    It could just crash (if it needs to adjust the limit) or might silently
    succeed (as newer glibc do). Just remove the extra check.
    
    See also the "setrlimit change to prlimit change in behavior" thread:
    https://sourceware.org/ml/libc-alpha/2017-10/threads.html#00830