This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/4] Alpha: Fix getrlimit/setrlimit with RLIM_INFINITY
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-alpha at sourceware dot org
- Cc: Richard Henderson <rth at twiddle dot net>, Aurelien Jarno <aurelien at aurel32 dot net>
- Date: Sat, 30 Dec 2017 19:44:37 +0100
- Subject: [PATCH 0/4] Alpha: Fix getrlimit/setrlimit with RLIM_INFINITY
- Authentication-results: sourceware.org; auth=none
Since commit 045c13d185 ("Consolidate Linux setrlimit and getrlimit
implementation") which is in glibc 2.25, the getrlimit and setrlimit
functions are broken when used with RLIM_INFINITY on alpha. The commit
changed the syscalls behind these functions from getrlimit/setrlimit to
prlimit64. RLIM_INFINITY is not represented the same way in these
syscalls on alpha. The getrlimit/setrlimit syscalls use the same
definition than the GNU libc, that is 0x7fffffffffffffff while prlimit64
uses a standard value across all architectures which is 0xffffffffffffffff.
The commit therefore broke the getrlimit/setrlimit functions on alpha,
and is the reason why dozens of the glibc tests abort with:
allocatestack.c:480: allocate_stack: Assertion `size != 0' failed.
This patch series fixes that in two steps, the first patch adds a
wrapper to fix the value before/after the syscall and can be backported
to stable branches. The second add a new symbol so that the
RLIM_INFINITY value can be changed to the same value as in the kernel
and other architectures. The two later patches are just some cleanup
that I have seen possible while writing the two first patches.
Aurelien Jarno (4):
Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant
[BZ #22648]
Alpha: Fix the RLIM_INFINITY and RLIM64_INFINITY constants
Fix typos in getrlimit64.c and setrlimit64.c
Simplify getrlimit64.c
ChangeLog | 36 +++++++++++
sysdeps/unix/sysv/linux/alpha/Versions | 3 +
sysdeps/unix/sysv/linux/alpha/bits/resource.h | 6 +-
sysdeps/unix/sysv/linux/alpha/getrlimit64.c | 88 +++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/alpha/libc.abilist | 4 ++
sysdeps/unix/sysv/linux/alpha/setrlimit64.c | 83 +++++++++++++++++++++++++
sysdeps/unix/sysv/linux/getrlimit64.c | 6 +-
sysdeps/unix/sysv/linux/setrlimit64.c | 6 +-
8 files changed, 221 insertions(+), 11 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/alpha/getrlimit64.c
create mode 100644 sysdeps/unix/sysv/linux/alpha/setrlimit64.c
--
2.15.1