From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S23z5-0006Af-5t for qemu-devel@nongnu.org; Mon, 27 Feb 2012 12:03:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S23yy-0007l4-LK for qemu-devel@nongnu.org; Mon, 27 Feb 2012 12:03:35 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60266 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S23yy-0007l0-By for qemu-devel@nongnu.org; Mon, 27 Feb 2012 12:03:28 -0500 Message-ID: <4F4BB75E.2010000@suse.de> Date: Mon, 27 Feb 2012 18:03:26 +0100 From: "Bernhard M. Wiedemann" MIME-Version: 1.0 References: <4F4B9E6B.2020405@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] ARM brk bug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alexander Graf , riku.voipio@iki.fi, qemu-devel@nongnu.org, paul@codesourcery.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 > 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-----