This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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]

Re: MIPS N64 RLIM_INFINITY fix


On Fri, May 26, 2006 at 07:00:41PM +0000, Joseph S. Myers wrote:
> The value of RLIM_INFINITY in sysdeps/unix/sysv/linux/mips/bits/resource.h 
> does not reflect that used by the kernel in N64 mode (0xffffffffffffffff).  
> The N32 and O32 syscalls, however, do use 0x7fffffff.  This confuses N64 
> NPTL when computing the size of stack to allocate when run with unlimited 
> stack, since getrlimit returns a stack limit bigger than the incorrect 
> RLIM_INFINITY.  (make 3.81 unlimits the stack, so "make check" run with 
> make 3.81 shows up the problem.)
> 
> In this patch, I made N64 use the correct value as used by the kernel.  I 
> did not change the value used for 64-bit getrlimit for N32 or O32 
> (although I made it unsigned to match the rlim_t type); that value is 
> simply a glibc convention rather than anything seen by the kernel, so we 
> may as well stay compatible with existing O32 and N32 binaries built with 
> _FILE_OFFSET_BITS=64 and linked with the shared libc.  N64 binaries that 
> care about RLIM_INFINITY are currently broken because of the 
> incompatibility with the kernel, so I don't think changing the value for 
> them is a problem.
> 
> 2006-05-26  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY,
> 	RLIM64_INFINITY): Define appropriately for N64.  Use unsigned
> 	types.

I agree with your reasoning; committed.

-- 
Daniel Jacobowitz
CodeSourcery


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