From: Paul Brook <paul@codesourcery.com>
To: Alexander Graf <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
riku.voipio@iki.fi, qemu-devel@nongnu.org,
"Bernhard M. Wiedemann" <bwiedemann@suse.de>
Subject: Re: [Qemu-devel] ARM brk bug
Date: Sat, 3 Mar 2012 21:17:37 +0000 [thread overview]
Message-ID: <201203032117.39190.paul@codesourcery.com> (raw)
In-Reply-To: <93FCCE39-FC5B-43F1-B581-76D2AD1660A6@suse.de>
> 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
next prev parent reply other threads:[~2012-03-03 21:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 15:16 [Qemu-devel] ARM brk bug Bernhard M. Wiedemann
2012-02-27 15:32 ` Peter Maydell
2012-02-27 17:03 ` Bernhard M. Wiedemann
2012-02-27 17:04 ` Peter Maydell
2012-03-02 17:49 ` Peter Maydell
2012-03-03 1:42 ` Alexander Graf
2012-03-03 21:02 ` Alexander Graf
2012-03-03 21:05 ` Alexander Graf
2012-03-03 21:17 ` Paul Brook [this message]
2012-03-03 22:08 ` Andreas Schwab
2012-03-03 21:23 ` malc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201203032117.39190.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=agraf@suse.de \
--cc=bwiedemann@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).