From: Richard Henderson <rth@twiddle.net>
To: Bob Breuer <breuerr@mc.net>
Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>,
Kai Tietz <ktietz70@googlemail.com>,
qemu-devel <qemu-devel@nongnu.org>,
"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
Date: Mon, 17 Oct 2011 10:22:34 -0700 [thread overview]
Message-ID: <4E9C645A.5060200@twiddle.net> (raw)
In-Reply-To: <4E9C3703.3040109@mc.net>
On 10/17/2011 07:09 AM, Bob Breuer wrote:
> I don't think this is a free/g_free issue. If I use the following
> patch, then I at least get the openbios messages:
>
> diff --git a/cpu-exec.c b/cpu-exec.c
> index a9fa608..dfbd6ea 100644
> --- a/cpu-exec.c
> +++ b/cpu-exec.c
> @@ -180,6 +180,7 @@ static void cpu_handle_debug_exception(CPUState
> /* main execution loop */
>
> volatile sig_atomic_t exit_request;
> +register void *ebp asm("ebp");
>
> int cpu_exec(CPUState *env)
> {
> @@ -233,6 +234,8 @@ int cpu_exec(CPUState *env)
>
> /* prepare setjmp context for exception handling */
> for(;;) {
> + int dummy = 0;
> + ebp = &dummy;
See if
asm("" : : : "ebp");
also solves the problem.
> Google finds a mention of longjmp failing with -fomit-frame-pointer:
> http://lua-users.org/lists/lua-l/2005-02/msg00158.html
>
> Looks like gcc 4.6 turns on -fomit-frame-pointer by default.
Hmm. This is the first I've heard of a longjmp implementation
failing without a frame pointer. Presumably this is with the
mingw i.e. msvc libc?
This is something that could be worked around in gcc, I suppose.
We recognize longjmp for some things, we could force the use of
a frame pointer for msvc targets too.
For now it might be best to simply force -fno-omit-frame-pointer
for mingw host in the configure script.
r~
next prev parent reply other threads:[~2011-10-17 17:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 4:39 [Qemu-devel] qemu-system-sparc io-thread segfault on win32 Bob Breuer
[not found] ` <4E9C0497.2000605@siriusit.co.uk>
2011-10-17 14:09 ` Bob Breuer
2011-10-17 17:22 ` Richard Henderson [this message]
2011-10-17 19:14 ` [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp Blue Swirl
2011-10-17 20:11 ` Richard Henderson
2011-10-17 21:20 ` Bob Breuer
2011-10-17 21:31 ` Kai Tietz
2011-10-17 22:23 ` Bob Breuer
2011-10-17 22:56 ` Kai Tietz
2011-10-19 21:05 ` Bob Breuer
2011-10-19 22:19 ` Richard Henderson
2011-10-20 4:22 ` xunxun
2011-10-20 14:48 ` Kai Tietz
2011-10-20 15:34 ` Kai Tietz
[not found] ` <j7sgfi$i66$1@dough.gmane.org>
2011-10-22 5:13 ` xunxun
2011-10-22 5:21 ` xunxun
2011-10-22 11:19 ` Kai Tietz
2011-10-22 14:23 ` asmwarrior
2011-10-24 14:45 ` Bob Breuer
2011-10-24 16:18 ` Kai Tietz
2011-10-25 15:14 ` Bob Breuer
2011-10-20 13:04 ` jojelino
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=4E9C645A.5060200@twiddle.net \
--to=rth@twiddle.net \
--cc=breuerr@mc.net \
--cc=gcc@gcc.gnu.org \
--cc=ktietz70@googlemail.com \
--cc=mark.cave-ayland@siriusit.co.uk \
--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 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.