All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, zealot351@gmail.com, maria.klimushenkova@ispras.ru
Subject: Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls
Date: Mon, 09 Feb 2015 20:47:50 +0100	[thread overview]
Message-ID: <54D90EE6.50402@weilnetz.de> (raw)
In-Reply-To: <001b01d0443f$798174e0$6c845ea0$@Dovgaluk@ispras.ru>

Am 09.02.2015 um 09:07 schrieb Pavel Dovgaluk:
>> From: Stefan Weil [mailto:sw@weilnetz.de]
>> Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk:
>>> On w64, setjmp is implemented by _setjmp which needs a second parameter.
>>> This parameter should be NULL to allow using longjump from generated code.
>>> This patch replaces all usages of setjmp.h with new header files which
>>> replaces setjmp with _setjmp function on win64 platform.
>>>
>>> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>> Please have a look at include/sysemu/os-win32.h. I think that your patch
>> is not needed because the current code already uses _setjmp.
> Right, but some of the files (e.g. include/qom/cpu.h) include setjmp.h directly.
> Then we have the following for compiling cpu-exec.c:
>
> cpu-exec.c:
> ...
> os-win32.h
> ...
> setjmp.h
> ...
>
> In this situation cpu-exec will call incorrect setjmp function.
>
> Pavel Dovgalyuk


It won't call the wrong setjmp function, at least not in my tests. 
cpu-exec.c gets the setjmp declaration from os-win32.h. Without it, QEMU 
would be unusable because it would crash very soon during the emulation.

Do you see problems caused by a wrong setjmp with latest QEMU? If yes: 
which build environment do you use (host, compiler, version of MinGW*)?

  reply	other threads:[~2015-02-09 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09  7:55 [Qemu-devel] [PATCH] win64: perform correct setjmp calls Pavel Dovgalyuk
2015-02-09  8:04 ` Stefan Weil
2015-02-09  8:07   ` Pavel Dovgaluk
2015-02-09 19:47     ` Stefan Weil [this message]
2015-02-10  5:50       ` Pavel Dovgaluk

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=54D90EE6.50402@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zealot351@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.