oslib-posix: Print errors before aborting on qemu_alloc_stack()
commite916a6e88a4ff6c39cd6f62fb162a561c6b89de8
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 29 Aug 2017 21:20:53 +0000 (29 18:20 -0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 30 Aug 2017 08:33:49 +0000 (30 09:33 +0100)
tree3ddd5ad2e3ddf81f538e4b30965010df868e56ba
parentd942feec979b1ad669ba43b8c9540a7e3cf75a3f
oslib-posix: Print errors before aborting on qemu_alloc_stack()

If QEMU is running on a system that's out of memory and mmap()
fails, QEMU aborts with no error message at all, making it hard
to debug the reason for the failure.

Add perror() calls that will print error information before
aborting.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170829212053.6003-1-ehabkost@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/oslib-posix.c