[Bug 243155] Linuxulator: broken fadvise64 for 32-bit applications on amd64
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jan 7 20:10:15 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243155
--- Comment #2 from Alex S <iwtcex at gmail.com> ---
(In reply to Mark Johnston from comment #1)
> Are you sure that this isn't just a truss bug?
Let's adjust the test a bit:
% cat fadvice_bug.c
#define _GNU_SOURCE
#include <assert.h>
#include <fcntl.h>
int main() {
int fd = open("/etc/passwd", O_RDONLY);
assert(fd > 0);
posix_fadvise(fd, 0, 0, -1);
return 0;
}
% /compat/linux/bin/gcc -m64 fadvice_bug.c -o fadvice_bug64
% truss ./fadvice_bug64
...
linux_fadvise64(0x3,0x0,0x0,0xffffffffffffffff) ERR#-22 'Invalid argument'
...
% /compat/linux/bin/gcc -m32 fadvice_bug.c -o fadvice_bug32
% truss ./fadvice_bug32
...
linux_fadvise64(0x3,0x0,0x0,0x0) = 0 (0x0)
...
> amd64's 32-bit Linux syscall definition for fadvise64 looks right.
That's the weird part. It looks right to me as well, at least at first sight.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-emulation
mailing list