Re: strace on FC2 with 64 bit lseek

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

It's the standard FC2 strace. 4.5.5-1

And it's not my code - note the kernel returns the proper results after 
the seek (I was seeking on /dev/hda - living dangerously I know, but 
that's what I needed it for anyway) so the proper value obviously reaches 
the kernel - so it must be strace's problem (or a strace/kernel interface 
although that's very unlikely).

strace likely takes two 32 bit registers and combines them into one 64bit 
register improperly, doing something like
  int32 eax, edx;
  int64 value = (int64(edx) << 32) + eax;
(or judging from the printout, using uint64 instead)

Cheers,
MaZe.

On Tue, 19 Oct 2004, Ulrich Drepper wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Maciej Żenczykowski wrote:
> > on 32bit x86 the 64bit _llseek seems to be badly parsed by strace.
> > 
> > lseek64(fd,0x80000000ULL,SEEK_SET);
> > 
> > results in a strace:
> > 
> > _llseek(3, 18446744071562067968, [2147483648], SEEK_SET) = 0
> 
> Which strace version?  I cannot reproduce this at all here (well, I did
> not have a large enough file so my call fails but this doesn't matter
> since the first two parameters are printed before the syscall).
> 
> Did you compile your code with -W -Wall and fix all problems.  This
> might very well be a bug in your code.
> 
> - --
> ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> 
> iD8DBQFBdXbr2ijCOnn/RHQRAh3eAKC/ESDJlPV6Lg34P4sTEWg5J1xjzQCcDFq3
> MBhtxH6IBKX307cCcbVwpGg=
> =ZnVS
> -----END PGP SIGNATURE-----
> 
> 


[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]