KO Myung-Hun wrote:
getrlimit() was implemented in kLIBC and works well. Strangely,
however, it crashes due to 'stack overflow' or 'SIGSEGV' when used in
GNU M4.
This needs explanation in the form of a brief comment in the source code.
Also, I don't see how it can be said to work "well" if it crashes. Most likely,
kLIBC getrlimit is buggy, or is being compiled with the wrong options, or
something like that. The implementation of kLIBC getrlimit is incorrectly
attempting to stuff a 32-bit unsigned value into a 32-bit signed variable, and
it could be something as simple as that.