qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Windows build crash problem
Date: Sun, 16 Dec 2007 13:45:48 +0100	[thread overview]
Message-ID: <fb249edb0712160445t17eaa81au72acf520da1712e8@mail.gmail.com> (raw)
In-Reply-To: <200712121625.AA00056@your-04ece94a0d.m1.interq.or.jp>

Hi,

On 12/12/2007, 武田 俊也 <t-takeda@m1.interq.or.jp> wrote:
> I encountered the crash problem with windows build on Core-Duo host.
> Qemu crashes in cpu_interrupt() called from host_alarm_handler() in vl.c
> because CPUState *env = next_cpu is null.
>
> I tried the patch to check env is not null in host_alarm_handler()
> and now qemu does not crash.
>
>         CPUState *env = next_cpu;
> +       if(env) {
>         /* stop the currently executing cpu because a timer occured */
>         cpu_interrupt(env, CPU_INTERRUPT_EXIT);
> #ifdef USE_KQEMU
>         if (env->kqemu_enabled) {
>             kqemu_cpu_interrupt(env);
>         }
> #endif
> +       }
>         event_pending = 1;
> }
>
> This is very temporary patch and I need to investigate
> why next_cpu is null but sorry now I dont have enough time.

It is NULL before main_loop starts. I thought the alarm wouldn't occur
before main_loop but apparently it happens. A better solution might be
not scheduling SIG_ALRM if next_cpu is unset, but that would be more
messy. _rearm must execute at least as many times as
host_alarm_handler so a check there would be less optimal. I committed
your patch.
Cheers

      parent reply	other threads:[~2007-12-16 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 16:25 [Qemu-devel] Windows build crash problem 武田 俊也
2007-12-12 16:32 ` Filip Navara
2007-12-16 12:45 ` andrzej zaborowski [this message]

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=fb249edb0712160445t17eaa81au72acf520da1712e8@mail.gmail.com \
    --to=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).