qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] ARM brk bug


From: Peter Maydell
Subject: Re: [Qemu-devel] ARM brk bug
Date: Fri, 2 Mar 2012 17:49:16 +0000

On 27 February 2012 15:16, Bernhard M. Wiedemann <address@hidden> wrote:
> I found that running a debian arm5 bash with qemu runs into varying
> problems with -R but works without.

So I had a look at this this afternoon, and what seems to be happening
is that with -R, the call to target_mmap() in elfload.c:setup_arg_pages()
(which creates the stack) is putting the stack immediately after the
bash BSS segment in the address space. This means that brk() will
never be able to expand, and it looks like something in either bash
or libc's locale code isn't correctly handling the failure, so we
crash. (The segfault is from a strlen(NULL) from setlocale() I think.)

We should probably try to put the stack somewhere more sensible than
where it currently ends up...

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]