qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cpu-exec(): also reload CPUClass *cc after longjmp return
@ 2013-10-03 14:09 Juergen Lock
  2013-10-03 16:05 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Lock @ 2013-10-03 14:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Dimitry Andric, Andreas Faerber

Local variable CPUClass *cc needs to be reloaded after return from longjmp
too.  (This fixes the mips-softmmu crash observed on FreeBSD when qemu is
built with clang.)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Found-by: Dimitry Andric <dim@FreeBSD.org>

--- 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(;;) */
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-07  7:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 14:09 [Qemu-devel] [PATCH] cpu-exec(): also reload CPUClass *cc after longjmp return Juergen Lock
2013-10-03 16:05 ` Peter Maydell
2013-10-04  7:15   ` Jan Kiszka
2013-10-05 17:54     ` Juergen Lock
2013-10-05 18:06       ` Stefan Weil
2013-10-05 21:45         ` Juergen Lock
2013-10-07  7:28           ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).