Skip to content

Commit

Permalink
cpu-exec: Also reload CPUClass *cc after longjmp return in cpu_exec()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Juergen Lock <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
  • Loading branch information
Juergen Lock authored and afaerber committed Oct 7, 2013
1 parent f8e6a11 commit 6c78f29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(;;) */

Expand Down

0 comments on commit 6c78f29

Please sign in to comment.