mirror of https://github.com/xqemu/xqemu.git
linux-user: fix broken cpu_copy()
New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
17644b3627
commit
61c7480fa3
|
@ -3451,7 +3451,7 @@ CPUArchState *cpu_copy(CPUArchState *env)
|
||||||
{
|
{
|
||||||
CPUState *cpu = ENV_GET_CPU(env);
|
CPUState *cpu = ENV_GET_CPU(env);
|
||||||
CPUState *new_cpu = cpu_init(cpu_model);
|
CPUState *new_cpu = cpu_init(cpu_model);
|
||||||
CPUArchState *new_env = cpu->env_ptr;
|
CPUArchState *new_env = new_cpu->env_ptr;
|
||||||
CPUBreakpoint *bp;
|
CPUBreakpoint *bp;
|
||||||
CPUWatchpoint *wp;
|
CPUWatchpoint *wp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue