Bug 385912 - none/tests/rlimit_nofile fails on newer glibc/kernel
Summary: none/tests/rlimit_nofile fails on newer glibc/kernel
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.13.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 13:56 UTC by Mark Wielaard
Modified: 2017-10-20 12:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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