From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVhl4-0003oW-TL for qemu-devel@nongnu.org; Fri, 15 Jan 2010 03:42:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVhl0-0003io-7c for qemu-devel@nongnu.org; Fri, 15 Jan 2010 03:42:18 -0500 Received: from [199.232.76.173] (port=38978 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVhkz-0003ig-WB for qemu-devel@nongnu.org; Fri, 15 Jan 2010 03:42:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19615) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVhkz-0003v0-Gt for qemu-devel@nongnu.org; Fri, 15 Jan 2010 03:42:13 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0F8gCW6001221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jan 2010 03:42:12 -0500 Received: from localhost.localdomain (vpn2-8-52.ams2.redhat.com [10.36.8.52]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0F8gAia030958 for ; Fri, 15 Jan 2010 03:42:11 -0500 From: Paolo Bonzini Date: Fri, 15 Jan 2010 09:42:07 +0100 Message-Id: <1263544930-18620-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1263544930-18620-1-git-send-email-pbonzini@redhat.com> References: <1263544930-18620-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] clean up env->current_tb List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org There are three paths from the innermost while loop of cpu_exec to the top of the outermost for loop. Two do not reset env->current_tb. Fix this. Signed-off-by: Paolo Bonzini --- cpu-exec.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 6f6ed14..9128df9 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -56,6 +56,7 @@ int qemu_cpu_has_work(CPUState *env) void cpu_loop_exit(void) { + env->current_tb = NULL; longjmp(env->jmp_env, 1); } @@ -107,6 +108,7 @@ static void cpu_exec_nocache(int max_cycles, TranslationBlock *orig_tb) env->current_tb = tb; /* execute the generated code */ next_tb = tcg_qemu_tb_exec(tb->tc_ptr); + env->current_tb = NULL; if ((next_tb & 3) == 2) { /* Restore PC. This may happen if async event occurs before -- 1.6.5.2