amd64 strace misprints 64 bit i386 off_t
- From: Ralf Neubauer <ralf@xxxxxxxxx>
- Date: Sun, 07 Sep 2008 17:31:57 +0200
Package: strace
Version: 4.5.15-1.1ubuntu1
Severity: normal
I compiled this program under 32 bit debian lenny:
#define _XOPEN_SOURCE 500
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main (int argc, char **argv)
{
int fd = open(argv[0], O_RDONLY);
char buf[1];
off_t offset = (off_t)0x100000001ULL;
fprintf(stderr, "%llu\n", (unsigned long long)offset);
pread(fd, buf, 1, offset);
return 0;
}
on this system strace prints:
[...]
open("stracetest", O_RDONLY|O_LARGEFILE) = 3
write(2, "4294967297\n"..., 114294967297
) = 11
pread64(3, ""..., 1, 4294967297) = 0
exit_group(0) = ?
on the 64 bit machine under hardy strace prints:
open("stracetest", O_RDONLY|O_LARGEFILE) = 3
write(2, "4294967297\n", 114294967297
) = 11
pread64(3, "", 1, 1) = 0
exit_group(0) = ?
I haven't looked further if this is a problem with 32 bit compatibility
in the kernel syscall entry or in strace but because strange things
should happen if this is a kernel problem I assume it is strace.
-- System Information:
Debian Release: lenny/sid
APT prefers hardy-updates
APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy'), (200, 'hardy-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-19-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages strace depends on:
ii libc6 2.7-10ubuntu3 GNU C Library: Shared libraries
strace recommends no packages.
-- no debconf information
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Prev by Date: Re: help needed for Ubuntu 8.04 on HP 6720s notebook
- Next by Date: Re: Extra disks
- Previous by thread: gnome-power-manager: no power management, no suspend, no hibernate
- Next by thread: Re: Cell BroadBand Engine Simulator on Ubuntu
- Index(es):
Relevant Pages
|