From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNOj2-0004RM-NS for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:13:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNOix-0000nN-Ic for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:13:04 -0400 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:32890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNOix-0000n8-Dj for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:12:59 -0400 Received: by qged69 with SMTP id d69so57492539qge.0 for ; Thu, 06 Aug 2015 10:12:58 -0700 (PDT) Sender: Richard Henderson References: <1438337876-13558-1-git-send-email-berrange@redhat.com> <55BB6EED.2010805@redhat.com> <55BBB755.1060503@weilnetz.de> <20150805095246.GB16246@redhat.com> <55C1ED97.2080005@weilnetz.de> <55C2405B.4050008@redhat.com> <6E1223CD-97D8-4675-AAFE-DF2F8298C8E1@livius.net> <55C27257.1010806@weilnetz.de> <20150806084432.GB4701@noname.str.redhat.com> <55C33305.4040502@weilnetz.de> From: Richard Henderson Message-ID: <55C39595.4010406@twiddle.net> Date: Thu, 6 Aug 2015 10:12:53 -0700 MIME-Version: 1.0 In-Reply-To: <55C33305.4040502@weilnetz.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QEMU 2.4 for Windows - current status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , Kevin Wolf Cc: Liviu Ionescu , QEMU Developer , Paolo Bonzini On 08/06/2015 03:12 AM, Stefan Weil wrote: > (sig)setjmp/(sig)longjmp without TCG generated code on the stack > does not need special handling because stack unwinding works > for compiled normal C code. > > We only have a problem on 64 bit Windows with code generated > at run time by TCG because stack unwinding does not work there, > so a siglongjmp which tries to exit from that code will crash QEMU > when trying to unwind the call stack. I suppose we could fix that, for 2.5, anyway. It would appear that RtlAddFunctionTable is the proper interface. It would probably also help debugging just as much as adding the elf unwind info did. > As far as I see, the only siglongjmp exits from TCG generated code > are in cpu-exec.c (functions cpu_loop_exit and > cpu_resume_from_signal). The matching sigsetjmp is also in > cpu-exec.c, and here we have to disable stack unwinding > by calling _setjmp(cpu->jmp_env, NULL). That sounds right. r~