qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alexander Graf <agraf@suse.de>,
	riku.voipio@iki.fi, qemu-devel@nongnu.org, paul@codesourcery.com
Subject: Re: [Qemu-devel] ARM brk bug
Date: Mon, 27 Feb 2012 18:03:26 +0100	[thread overview]
Message-ID: <4F4BB75E.2010000@suse.de> (raw)
In-Reply-To: <CAFEAcA-Fpv-j6X=_7Ff6LXUhzS80aWPkVYaQaHYxaJszCujQ=g@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/27/2012 04:32 PM, Peter Maydell wrote:
> On 27 February 2012 15:16, Bernhard M. Wiedemann
> <bwiedemann@suse.de> wrote:
>> I found that running a debian arm5 bash with qemu runs into
>> varying problems with -R but works without. Also works fine on
>> both armv5 and armv7hf hardware.
>> 
>> 
>> This happened with both master and 1.0 builds:
>> 
>> curl www.zq1.de/~bernhard/temp/debian-bash-bug-nss-minimal.tar.gz
>> |\ tar xz cd debian-bash-bug-nss-minimal 
>> path/to/qemu/arm-linux-user/qemu-arm -R 500M -L . bin/bash qemu:
>> uncaught target signal 11 (Segmentation fault) - core dumped 
>> Segmentation fault
> 
>> but otherwise it failed with messages like bash: xmalloc:
>> ../bash/variables.c:1971: cannot allocate 2 bytes (8192 bytes
>> allocated)
> 
> So, er, don't do that then? This looks suspiciously like we're 
> failing an mmap() (because of the limited guest address space
> you've asked for with -R) and then bash is either failing to handle
> it and crashing or printing a message about the allocation
> failure.
> 
> -- PMM

apparently, we patched qemu for openSUSE to always use -R because
otherwise java did not work (with the binfmt chroot magic).

even when I used the highest possible value for -R it did not work:

qemu-arm -R 4026M -L . bin/bash
bash: xmalloc: ../bash/variables.c:1971: cannot allocate 2 bytes (8192
bytes allocated)

even though it worked with any other arm binary I tried (including
openSUSE's bash, Debians dash etc).


Ciao
Bernhard M.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9Lt14ACgkQSTYLOx37oWTt4ACghJYkfju/iG/jDS/51RasTwzn
HUMAoNyKiuJ3ApeLpWM4EIPAaMHVsGaT
=QN4N
-----END PGP SIGNATURE-----

  reply	other threads:[~2012-02-27 17:03 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 [this message]
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
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=4F4BB75E.2010000@suse.de \
    --to=bwiedemann@suse.de \
    --cc=agraf@suse.de \
    --cc=paul@codesourcery.com \
    --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).