Summary: | valgrind does not correctly emulate prlimit64(..., RLIMIT_NOFILE, ...) | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Matthias Schwarzott <zzam> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | austinenglish, kde-bugs, tom |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | valgrind-improve-prlimit64-v5.patch |
Description
Matthias Schwarzott
2012-02-14 07:50:29 UTC
Created attachment 68897 [details]
valgrind-improve-prlimit64-v5.patch
The attached patch does this:
Change prlimit64 to behave like a combination of the existing setrlimit and getrlimit.
Run emulation only if ARG0 (pid) is 0 or equal getpid()
improve setrlimit (like new prlimit64) to return EINVAL if softlimit>hardlimit
Add tests (using getrlimit64 and setrlimit64)
TODO: Tests using prlimit and prlimit64 (perhaps with different pid
values)
on x86:
getrlimit -> syscall getrlimit
setrlimit -> syscall setrlimit
prlimit -> syscall prlimit64
getrlimit64 -> syscall prlimit64
setrlimit64 -> syscall prlimit64
prlimit64 -> syscall prlimit64
on amd64:
getrlimit -> syscall getrlimit
setrlimit -> syscall setrlimit
prlimit -> syscall prlimit64
getrlimit64 -> syscall getrlimit
setrlimit64 -> syscall setrlimit
prlimit64 -> syscall prlimit64
Committed as r12411. *** Bug 275673 has been marked as a duplicate of this bug. *** |