From: Juergen Lock Date: Thu, 3 Oct 2013 14:09:37 +0000 (+0200) Subject: cpu-exec: Also reload CPUClass *cc after longjmp return in cpu_exec() X-Git-Tag: qemu-xen-4.5.0-rc1~426^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6c78f29a2424622bfc9c30dfbbc13404481eacb6;p=qemu-xen.git cpu-exec: Also reload CPUClass *cc after longjmp return in cpu_exec() Local variable CPUClass *cc needs to be reloaded after return from longjmp, too. (This fixes a mips-softmmu crash observed on FreeBSD when QEMU is built with clang.) Reported-by: Dimitry Andric Signed-off-by: Juergen Lock Signed-off-by: Andreas Färber --- diff --git a/cpu-exec.c b/cpu-exec.c index 5a4399509e..30cfa2a63a 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -681,6 +681,10 @@ int cpu_exec(CPUArchState *env) * local variables as longjmp is marked 'noreturn'. */ cpu = current_cpu; env = cpu->env_ptr; +#if !(defined(CONFIG_USER_ONLY) && \ + (defined(TARGET_M68K) || defined(TARGET_PPC) || defined(TARGET_S390X))) + cc = CPU_GET_CLASS(cpu); +#endif } } /* for(;;) */