This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug libc/21510] Linux setrlimit consolidation breaks LTP: setrlimit02


https://sourceware.org/bugzilla/show_bug.cgi?id=21510

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
This bug is invalid in imho, LTP is relying on undefined behavior by providing
an invalid pointer as 'struct rlimit' object location. What you states as
'documented behavior' is in fact the Linux man pages with current behavior, not
the conformance standard (POSIX in this case) or any other contract for
extension or such alike.

POSIX in this specific case [1] states EINVAL `shall` be returned for:

[EINVAL]
An invalid resource was specified; or in a setrlimit() call, the new rlim_cur
exceeds the new rlim_max.

And 'may' fail with:

[EINVAL]
An invalid resource was specified; or in a setrlimit() call, the new rlim_cur
exceeds the new rlim_max.

Pointer valid is out the scope and thus I think LTP should be adjusted to
correctly check for the POSIX interface (which is what GLIBC aims to provide)
or call the syscall directly to check for the Linux kernel ABI.

I will close this bug as INVALID.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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