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: Paul Brook
Subject: Re: [Qemu-devel] ARM brk bug
Date: Sat, 3 Mar 2012 21:17:37 +0000
User-agent: KMail/1.13.7 (Linux/3.2.0-1-amd64; KDE/4.6.5; x86_64; ; )

> In QEMU with -R <high>
> 
> $ qemu-arm -R $(( 0x10000000 )) ./brk
> mmap: 0x935000
> current brk: 0xffffffff
> 00000000-00008000 ---p 00000000 00:00 0
> 00008000-00009000 r-xp 00000000 08:09 1248935408          /brk
> 00009000-00010000 ---p 00000000 00:00 0
> 00010000-00011000 r--p 00000000 08:09 1248935408          /brk
> 00011000-00012000 rw-p 00001000 08:09 1248935408          /brk
> 00012000-00013000 ---p 00000000 00:00 0
> 00013000-00813000 rw-p 00000000 00:00 0

Would tell us a lot more if (a) you gave us the map before the strace call, 
and (b) the requested size wasn't the same as the default stack size.  
> 
> qemu's strace says:
> 15545 mmap2(NULL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0)
> = 0x00834000 [...]
> 15545
> mmap2(0x00005000,65536,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,0,0)
> = 0x00935000 [...]
> 15545 brk(NULL) = 0x00012000
> 15545 brk(0x00812000) = 0x00012000

This is your bug.  According to the trace above, the brk call fails, but 
returns success anyway.  A quick look at do_brk confirms this suspicion.

Paul



reply via email to

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