Bug 416285 - Use prlimit64 in VG_(getrlimit) and VG_(setrlimit)
Summary: Use prlimit64 in VG_(getrlimit) and VG_(setrlimit)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.15 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 10:56 UTC by Stefan Maksimovic
Modified: 2020-04-23 16:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch (4.56 KB, text/plain)
2020-01-15 10:56 UTC, Stefan Maksimovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Maksimovic 2020-01-15 10:56:23 UTC
Created attachment 125143 [details]
patch

Amend the recent update to VG_(getrlimit) and VG_(setrlimit)

[get|set]rlimit system calls are becoming deprecated.
Coregrind should use prlimit64 as the first candidate in order to achieve
"rlimit" functionality.

There are also systems that do not even support older "rlimits".

Modify the previously added support VG_(getrlimit)
and VG_(setrlimit) using __NR_prlimit64 by making it
similar to the glibc implementation.




This change has been tested on x86 and mips and we would like feedback on how
it behaves on other architectures/systems.
Comment 1 Stefan Maksimovic 2020-02-06 16:31:10 UTC
Did anyone have a chance to take a look at this in the meantime?
Comment 2 Petar Jovanovic 2020-04-17 18:35:42 UTC
Anyone against this patch?
Comment 3 Mark Wielaard 2020-04-23 16:21:28 UTC
This looks correct. Whenever possible we should use prlimit64.