From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
QEMU Developer <qemu-devel@nongnu.org>,
Andrew Baumann <Andrew.Baumann@microsoft.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] Use special code for sigsetjmp only in cpu-exec.c
Date: Tue, 1 Mar 2016 12:22:51 +0000 [thread overview]
Message-ID: <CAFEAcA_g2mYVECDDEVX8Gs_374oL5Qy6t+unpbfaNKd5dT5pLg@mail.gmail.com> (raw)
In-Reply-To: <56D58309.10206@weilnetz.de>
On 1 March 2016 at 11:54, Stefan Weil <sw@weilnetz.de> wrote:
> Am 01.03.2016 um 10:59 schrieb Peter Maydell:
>> I don't understand this patch. Why doesn't it work to have
>> sigsetjmp() be implemented the same way for every use that
>> QEMU makes of it?
> It does, as long as the "same way" is the correct one, namely
> the one without stack unwinding.
>
> The current code used to work, but re-arranged include files
> broke the working code somewhere in the past:
>
> include/sysemu/os-win32.h does the right thing at the
> wrong place. Its correct definition of sigsetjmp is overwritten by
> the definition from a Mingw-w64 system header file which
> triggers stack unwinding. Stack unwinding is fatal for
> QEMU's generated code.
>
> My patch makes sure that the critical code in cpu-exec.c
> gets the correct definition of sigsetjmp.
I think we should fix this by making sure that osdep.h
does the right thing -- ie that it gives us the correct
definition and prevents mingw's headers from overriding it
with the wrong thing (by ensuring that the offending system
header is included before we redefine things, or however
necessary). This is what osdep.h's purpose is -- to hide
annoying system-header workarounds and hacks rather than
putting them in the rest of QEMU code.
> In addition, it removes code which might or might not
> change the default definition of sigsetjmp (depending
> on the order of include files). Now all other files beside
> cpu-exec.c will use the default behaviour with stack
> unwinding.
That seems wrong -- we should have the same behaviour for
sigsetjmp/siglongjmp everywhere we use it.
thanks
-- PMM
next prev parent reply other threads:[~2016-03-01 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 5:07 [Qemu-devel] [PATCH] Use special code for sigsetjmp only in cpu-exec.c Stefan Weil
2016-03-01 6:23 ` Andrew Baumann
2016-03-01 9:59 ` Peter Maydell
2016-03-01 11:54 ` Stefan Weil
2016-03-01 12:22 ` Peter Maydell [this message]
2016-03-01 13:15 ` Stefan Weil
2016-03-01 17:46 ` Andrew Baumann
2016-03-01 17:53 ` Paolo Bonzini
2016-03-01 17:54 ` Peter Maydell
2016-03-01 19:08 ` Stefan Weil
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=CAFEAcA_g2mYVECDDEVX8Gs_374oL5Qy6t+unpbfaNKd5dT5pLg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=Andrew.Baumann@microsoft.com \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
/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).