[Bug 697742] Re: strace: on i386, prints sync_file_range() arguments wrongly
Adrien Nader
697742 at bugs.launchpad.net
Thu Mar 6 10:38:45 UTC 2025
I think that if this has not been fixed, this is not relevant anymore as
people would instead strace from the 64-bit side. Moreover, these cross-
world operations can be very difficult and are unlikely to change
further in the future even if this still happens.
** Changed in: strace (Ubuntu)
Status: New => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to strace in Ubuntu.
https://bugs.launchpad.net/bugs/697742
Title:
strace: on i386, prints sync_file_range() arguments wrongly
Status in strace package in Ubuntu:
Won't Fix
Bug description:
Binary package hint: strace
Package: strace
Version: 4.5.20-2ubuntu2
strace on i386 does not print the arguments to sync_file_range
correctly:
cam-vm-266:maverick:qemu$ cat /tmp/sync_file_range.c
#define _GNU_SOURCE
#include <stdio.h>
#include <fcntl.h>
int main(void) {
int r;
printf("calling sync_file_range()...\n");
r = sync_file_range(42, 0x123456789abcdefULL, 0x1122334455667788ULL, 273750);
printf("returned %d\n", r);
return 0;
}
cam-vm-266:maverick:qemu$ gcc -g -Wall -o /tmp/sync_file_range /tmp/sync_file_range.c
cam-vm-266:maverick:qemu$ strace /tmp/sync_file_range 2>&1 | grep '^sync_file_range'
sync_file_range(0x2a, 0x89abcdef, 0x1234567, 0x55667788) = -1 EINVAL (Invalid argument)
I think this is because strace doesn't know that the 2nd and 3rd
arguments here are both off64_t so it's assuming it takes four 32 bit
arguments. On x86_64 where a 64 bit value fits into one register
anyway this bug doesn't occur.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/strace/+bug/697742/+subscriptions
More information about the foundations-bugs
mailing list