qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 3/3] linux-user: fix broken cpu_copy()


From: riku . voipio
Subject: [Qemu-devel] [PULL 3/3] linux-user: fix broken cpu_copy()
Date: Mon, 23 Mar 2015 15:54:55 +0200

From: Leon Alrae <address@hidden>

New threads always point at the same env which is incorrect and usually
leads to a crash.

Signed-off-by: Leon Alrae <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index 31eb60f..a8adb04 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -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;
 
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]