linux-user: fix QEMU_STRACE=1 segfault
authorAlexander Graf <agraf@suse.de>
Mon, 21 Nov 2011 11:04:07 +0000 (12:04 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Thu, 2 Feb 2012 15:51:20 +0000 (17:51 +0200)
commit962b289ef35087fcd8764e4e29808d8ac90157f7
tree01641e19658a15ae9861350a18273b580c0faccc
parent583359a68922fb91b793a5ad3a2dd4536bf9b99e
linux-user: fix QEMU_STRACE=1 segfault

While debugging some issues with QEMU_STRACE I stumbled over segmentation
faults that were pretty reproducible. Turns out we tried to treat a
normal return value as errno, resulting in an access over array boundaries
for the resolution.

Fix this by allowing failure to resolve invalid errnos into strings.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/strace.c
linux-user/syscall.c