42b16184d0
print_syscall_err() relies on the sign of the returned value to know
if it is an errno value or not.
But in some cases the returned value can have the most signicant bit
set without being an errno.
This patch restores previous behaviour that was also checking if
we can decode the errno to validate it.
This patch fixes this kind of problem (qemu-m68k):
root@sid:/# QEMU_STRACE= ls
3 brk(NULL) = -1 errno=21473607683 uname(0x407fff8a) = 0
to become:
root@sid:/# QEMU_STRACE= ls
3 brk(NULL) = 0x8001e000
3 uname(0xffffdf8a) = 0
Fixes:
|
||
---|---|---|
.. | ||
aarch64 | ||
alpha | ||
arm | ||
cris | ||
generic | ||
host | ||
hppa | ||
i386 | ||
m68k | ||
microblaze | ||
mips | ||
mips64 | ||
nios2 | ||
openrisc | ||
ppc | ||
riscv | ||
s390x | ||
sh4 | ||
sparc | ||
sparc64 | ||
tilegx | ||
x86_64 | ||
xtensa | ||
cpu_loop-common.h | ||
elfload.c | ||
errno_defs.h | ||
exit.c | ||
fd-trans.c | ||
fd-trans.h | ||
flat.h | ||
flatload.c | ||
ioctls.h | ||
linux_loop.h | ||
linuxload.c | ||
main.c | ||
Makefile.objs | ||
mmap.c | ||
qemu.h | ||
safe-syscall.S | ||
signal-common.h | ||
signal.c | ||
socket.h | ||
strace.c | ||
strace.list | ||
syscall_defs.h | ||
syscall_types.h | ||
syscall.c | ||
target_flat.h | ||
trace-events | ||
uaccess.c | ||
uname.c | ||
uname.h | ||
vm86.c |