[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] ARM brk bug
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] ARM brk bug |
Date: |
Sat, 3 Mar 2012 02:42:41 +0100 |
On 02.03.2012, at 18:49, Peter Maydell wrote:
> 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...
Yikes - I just realized that git on armv7 also breaks due to this:
https://build.opensuse.org/package/live_build_log?arch=armv7l&package=git&project=openSUSE%3AFactory%3AARM&repository=standard
So how could we go with this? Give target_mmap a hint that we want to map at
some randomly defined address rather than let it to its automatic thing?
Alex