This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/4] Alpha: Fix getrlimit/setrlimit with RLIM_INFINITY

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]