RFC: path display and path filtering features.
Dmitry V. Levin
ldv at altlinux.org
Sat Mar 5 14:27:55 UTC 2011
On Fri, Feb 18, 2011 at 04:20:24PM +0000, Grant Edwards wrote:
> On 2011-02-18, Dmitry V. Levin <ldv at altlinux.org> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110305/9f9ca0a9/attachment.bin>
More information about the Strace-devel
mailing list