[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] linux-user/mmap: Should not return NULL on guest call m
Re: [Qemu-devel] linux-user/mmap: Should not return NULL on guest call mmap(NULL, ...), causes crash inside glibc
Sat, 6 Jan 2018 18:02:26 +0100
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
On 05.01.18 22:13, Maximilian Riemensberger wrote:
> On 05.01.18 19:38, Peter Maydell wrote:
>> On 5 January 2018 at 18:13, Maximilian Riemensberger
>> <address@hidden> wrote:
>>> yesterday I hit the following problem when running an arm linux executable
>>> qemu-2.10 (qemu-arm-static through binfmt_misc)
>>> = 0x00000000
>>> 1879 write(2,0xf6fd39d0,79) stx_test: allocatestack.c:514: allocate_stack:
>>> Assertion `mem != NULL' failed.
>>> The issue comes up when the executable creates and joins lots of
>>> threads in a loop (it's a unit test). Eventually, glibc allocatestack
>>> hits the mmap(NULL, ...) == NULL. Judging from the posix and linux
>>> manuals mmap(NULL, ...) never returns NULL. Either it fails with MAP_FAILED
>>> or it succeeds and returns non-NULL address.
>> Given the heavy use of threading, can you retest with QEMU 2.11,
>> please? We fixed a couple of threading issues in linux-user there.
> Same error with fresh qemu-2.11 build.
I just sent out a online patch that fixes the issue for me.