Commit 6e316ab65a for qemu.org

commit 6e316ab65af537044c52a74ed5c2af3ac9be8796
Author: Warner Losh <imp@bsdimp.com>
Date:   Wed Jun 17 12:18:17 2026 -0600

    bsd-user: Initialize per-arch child registers

    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Signed-off-by: Warner Losh <imp@bsdimp.com>

diff --git a/bsd-user/freebsd/os-thread.c b/bsd-user/freebsd/os-thread.c
index 15872f03fd..eaab062d3d 100644
--- a/bsd-user/freebsd/os-thread.c
+++ b/bsd-user/freebsd/os-thread.c
@@ -1629,6 +1629,9 @@ abi_long do_freebsd_thr_new(CPUArchState *env,

     new_env = cpu_copy(env);

+    /* Init regs that differ from the parent. */
+    target_cpu_clone_regs(new_env, 0);
+
     new_cpu = env_cpu(new_env);
     new_cpu->opaque = ts;
     ts->bprm = parent_ts->bprm;