Public bug reported:
Binary package hint: strace
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:
lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
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
** Affects: strace (Ubuntu)
Importance: Undecided
Status: New
--
amd64 strace misprints 64 bit i386 off_t
https://bugs.launchpad.net/bugs/267646
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs