This patchset is intended to fix some problems with the ARM semihosting SYS_HEAPINFO call. Patch 1 fixes a bug in do_brk() which meant that using SYS_HEAPINFO tended to result in our accidentally unmapping the host libc. Patch 2 fixes the bug https://bugs.launchpad.net/qemu/+bug/656285 by correcting the check for failure of do_brk(). Patch 3 does the same for the equivalent code in m68k-semi.c, but note that I have only tested that it compiles.
(linux-user/m68k-sim.c also has a suspicious error check on do_brk(), but since I don't have any specs of what the simcalls there are supposed to do on error I haven't attempted to fix this one.) Peter Maydell (3): linux-user: Don't use MAP_FIXED in do_brk() arm-semi.c: Use correct check for failure of do_brk() m68k-semi.c: Use correct check for failure of do_brk() arm-semi.c | 5 +++-- linux-user/syscall.c | 29 ++++++++++++++++++++--------- m68k-semi.c | 5 +++-- 3 files changed, 26 insertions(+), 13 deletions(-)