On 02/05/14 14:15, James Hogan wrote: > When strace is built with large file support definitions in CFLAGS (as > may be provided by buildroot) the C library headers may expose a 64-bit > rlim_t even though the struct rlimit fields used by the system call > interface are only 32-bit. The SIZEOF_RLIM_T will then be 8 which > results in bad decoding of the getrlimit and setrlimit syscalls. > > This is fixed by removing the "#if SIZEOF_RLIM_T == 4 || > SUPPORTED_PERSONALITIES > 1" conditional, since the remaining code > already handles multiple personalities based on the value of > current_wordsize, which is set correctly even for a single personality. > > Signed-off-by: James Hogan <james.ho...@imgtec.com>
Hi, does this patch look okay? Thanks James > --- > resource.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/resource.c b/resource.c > index 5f92b39..b191ec2 100644 > --- a/resource.c > +++ b/resource.c > @@ -135,8 +135,6 @@ decode_rlimit64(struct tcb *tcp, unsigned long addr) > print_rlimit64(tcp, addr); > } > > -#if SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1 > - > static const char * > sprint_rlim32(uint32_t lim) > { > @@ -187,12 +185,6 @@ decode_rlimit(struct tcb *tcp, unsigned long addr) > } > } > > -#else /* SIZEOF_RLIM_T == 8 && SUPPORTED_PERSONALITIES == 1 */ > - > -# define decode_rlimit decode_rlimit64 > - > -#endif /* SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1 */ > - > int > sys_getrlimit(struct tcb *tcp) > { > ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel