Commit 61c7480f authored by Leon Alrae's avatar Leon Alrae Committed by Riku Voipio
Browse files

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: default avatarLeon Alrae <leon.alrae@imgtec.com>
Reviewed-by: default avatarAndreas Färber <afaerber@suse.de>
Signed-off-by: default avatarRiku Voipio <riku.voipio@linaro.org>
parent 17644b36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3451,7 +3451,7 @@ CPUArchState *cpu_copy(CPUArchState *env)
{
    CPUState *cpu = ENV_GET_CPU(env);
    CPUState *new_cpu = cpu_init(cpu_model);
    CPUArchState *new_env = cpu->env_ptr;
    CPUArchState *new_env = new_cpu->env_ptr;
    CPUBreakpoint *bp;
    CPUWatchpoint *wp;