On Fri, Feb 18, 2011 at 04:20:24PM +0000, Grant Edwards wrote:
> On 2011-02-18, Dmitry V. Levin <[email protected]> wrote:
> > On Thu, Feb 17, 2011 at 11:29:27AM -0600, Grant Edwards wrote:
[...]
> >>  * Change the way that file descriptors are printed by the display
> >>    functions.  Instead of using "%s" and a function that returns a
> >>    formatted string, they now use a printfd() function analogous to
> >>    the printpath() function.
> >
> > BTW, there is a long standing bug in decoding of file descriptors on
> > 64bit architectures, and it's time to fix it in one place.
> >
> > For example,
> > $ cat close.c
> > int close(unsigned long fd);
> > int main(void){return !!close(0xffffffff00000000UL);}
> > $ gcc -Wall -O2 close.c -o close
> > $ strace -eclose -o'|tail -1' ./close
> > close(-4294967296)                      = 0
> > $ strace -y -eclose -o'|tail -1' ./close
> > close(-4294967296</dev/pts/1>)          = 0
> >
> > The fix is to change "fd" type in printfd() from long to int, and to print
> > it using %d format.
> 
> Done.

Thanks, I've merged this fix to HEAD.


-- 
ldv

Attachment: pgp3uKreLHr2R.pgp
Description: PGP signature

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to