|
@@ -5821,6 +5821,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
|
|
|
new_env = cpu_copy(env);
|
|
|
/* Init regs that differ from the parent. */
|
|
|
cpu_clone_regs_child(new_env, newsp, flags);
|
|
|
+ cpu_clone_regs_parent(env, flags);
|
|
|
new_cpu = env_cpu(new_env);
|
|
|
new_cpu->opaque = ts;
|
|
|
ts->bprm = parent_ts->bprm;
|
|
@@ -5917,6 +5918,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
|
|
|
if (flags & CLONE_CHILD_CLEARTID)
|
|
|
ts->child_tidptr = child_tidptr;
|
|
|
} else {
|
|
|
+ cpu_clone_regs_parent(env, flags);
|
|
|
fork_end(0);
|
|
|
}
|
|
|
}
|