qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrog@zabor.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: strange crash on FreeBSD-current/amd64 (pointer truncation?)
Date: Fri, 2 Feb 2007 23:27:29 +0100	[thread overview]
Message-ID: <fb249edb0702021427i63e03deka766d9ae84539bb1@mail.gmail.com> (raw)
In-Reply-To: <20070202214525.GA10125@saturn.kn-bremen.de>

On 02/02/07, Juergen Lock <nox@jelal.kn-bremen.de> wrote:
> On Fri, Feb 02, 2007 at 04:02:00AM +0000, Thiemo Seufer wrote:
> > Juergen Lock wrote:
> > > On Wed, Jan 24, 2007 at 09:00:19PM +0100, Juergen Lock wrote:
> > > > Hi!
> > > >
> > > >  I got a report of qemu segfaulting here on FreeBSD-current/amd64:
> > > >
> > > > > #0  main_loop () at /usr/ports-cvs/emulators/qemu/work/qemu-snapshot-2007-01-11_05/vl.c:6125
> > > > > 6125                    env = env->next_cpu;
> > > > > [New Thread 0x801e10190 (LWP 100214)]
> > > > > (gdb) print env
> > > > > $1 = (CPUX86State *) 0xac10000
> > > > > (gdb) print first_cpu
> > > > > $2 = (CPUX86State *) 0x80ac10000
> > >
> > > Ok Jung-uk Kim found the following fix: (Thanx!)
> > >
> > > --- qemu/cpu-exec.c.orig    Wed Jan 31 16:58:03 2007
> > > +++ qemu/cpu-exec.c Wed Jan 31 17:08:11 2007
> > > @@ -226,9 +226,9 @@
> > >
> > >  int cpu_exec(CPUState *env1)
> > >  {
> > > -    int saved_T0, saved_T1;
> > > +    long saved_T0, saved_T1;
> > >  #if defined(reg_T2)
> > > -    int saved_T2;
> > > +    long saved_T2;
> >
> > I used target_ulong instead.
>
> Isn't that 32 bit for 32 bit targets?  Then it wouldn't fix the bug,

Well, it just happens that target_ulong is 64 bit even for 32 bit
target on a 64 bit host (as a workaround for something I think, was
wondering about it too. I asked on IRC once but no one knew the actual
reason). This however doesn't change the fact that target_ulong
shouldn't be used here.

Regards,
Andrew

  parent reply	other threads:[~2007-02-02 22:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 20:00 [Qemu-devel] strange crash on FreeBSD-current/amd64 (pointer truncation?) Juergen Lock
2007-02-01 20:00 ` [Qemu-devel] " Juergen Lock
2007-02-02  4:02   ` Thiemo Seufer
2007-02-02 21:45     ` Juergen Lock
2007-02-02 22:24       ` Thiemo Seufer
2007-02-03  1:43         ` Juergen Lock
2007-02-03 18:12           ` Gwenole Beauchesne
2007-02-04 13:38             ` Paul Brook
2007-02-02 22:27       ` andrzej zaborowski [this message]
2007-02-02 22:40         ` Paul Brook
2007-02-02 22:57           ` andrzej zaborowski

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=fb249edb0702021427i63e03deka766d9ae84539bb1@mail.gmail.com \
    --to=balrog@zabor.org \
    --cc=balrogg@gmail.com \
    --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).