From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11233 invoked by alias); 17 Oct 2011 17:23:09 -0000 Received: (qmail 11224 invoked by uid 22791); 17 Oct 2011 17:23:08 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GJ,TW_TJ X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Oct 2011 17:22:41 +0000 Received: by wwe32 with SMTP id 32so2309973wwe.8 for ; Mon, 17 Oct 2011 10:22:40 -0700 (PDT) Received: by 10.227.196.79 with SMTP id ef15mr4042598wbb.112.1318872160440; Mon, 17 Oct 2011 10:22:40 -0700 (PDT) Received: from anchor.twiddle.net (c-71-227-161-214.hsd1.wa.comcast.net. [71.227.161.214]) by mx.google.com with ESMTPS id y10sm32259830wbm.14.2011.10.17.10.22.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Oct 2011 10:22:39 -0700 (PDT) Message-ID: <4E9C645A.5060200@twiddle.net> Date: Mon, 17 Oct 2011 21:20:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: Bob Breuer CC: Mark Cave-Ayland , qemu-devel , "gcc@gcc.gnu.org" , Kai Tietz Subject: gcc auto-omit-frame-pointer vs msvc longjmp References: <4E9BB180.6080506@mc.net> <4E9C0497.2000605@siriusit.co.uk> <4E9C3703.3040109@mc.net> In-Reply-To: <4E9C3703.3040109@mc.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00256.txt.bz2 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~