qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jay Foad <jay.foad@gmail.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] gcc 4.4 miscompiling cpu_exec() ?
Date: Tue, 23 Feb 2010 17:57:23 +0000	[thread overview]
Message-ID: <ee2e06e91002230957y27212a5avdf3d0a834d9f63a@mail.gmail.com> (raw)
In-Reply-To: <4B840A59.3060407@aurel32.net>

On 23 February 2010 17:03, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Jay Foad a écrit :
>> I'm building QEMU mipsel-linux-user with Ubuntu's GCC 4.4 on an x86
>> host. Whenever I try to run a trivial MIPS executable, QEMU segfaults
>> in cpu_loop() shortly after the call to cpu_mips_exec().
>>
>> The problem seems to be that cpu_exec() doesn't preserve ebp. It tries to:
>>
>>     saved_env_reg = (host_reg_t) env;
>>
>> where env is a global variable decorated with asm("ebp"). This saves
>> ebp to the stack, but later on, in some function inlined into
>> cpu_exec(), the value on the stack gets overwritten with something
>> else.
>>
>> Has anyone else seen this?
>>
>
> Yes, but only in qemu 0.12.0 to 0.12.1. The issue should be fixed in the
> stable branch and in head.

I'm seeing it today, with sources from git:

git://git.qemu.org/qemu.git
commit 724c689357211cb929c9b957e1556f211d2b56db

Thanks,
Jay.

  parent reply	other threads:[~2010-02-23 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 14:50 [Qemu-devel] gcc 4.4 miscompiling cpu_exec() ? Jay Foad
     [not found] ` <4B840A59.3060407@aurel32.net>
2010-02-23 17:57   ` Jay Foad [this message]
2010-02-23 17:58 ` [Qemu-devel] " Paolo Bonzini
2010-02-23 18:17   ` Jay Foad
2010-02-23 18:18     ` Paolo Bonzini
2010-02-23 18:21     ` [Qemu-devel] [PATCH] declare saved_env_reg as volatile Paolo Bonzini

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=ee2e06e91002230957y27212a5avdf3d0a834d9f63a@mail.gmail.com \
    --to=jay.foad@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /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).