commit 3b001d133aa0e1661f64d2df0a683aa6d10bc955 Author: Russ Cox Date: Sun Mar 2 14:31:15 2025 -0500 sys/src/9k: fix bug aliasing parent and child FP state after fork The state would get unaliased by a future exec, because it would become fpustate == Init, which would in turn recompute up->fpusave. But until then, parent and child would share the FPU state. diff --git a/sys/src/9k/k10/fpu.c b/sys/src/9k/k10/fpu.c index 1fe2db54..b9db40ba 100755 --- a/sys/src/9k/k10/fpu.c +++ b/sys/src/9k/k10/fpu.c @@ -163,7 +163,7 @@ fpusysrforkchild(Proc* child, Proc* parent) * Copy the parent FPU state to the child. */ child->fpustate = parent->fpustate; - child->fpusave = (void*)((PTR2UINT(up->fxsave) + 15) & ~15); + child->fpusave = (void*)((PTR2UINT(child->fxsave) + 15) & ~15); if(child->fpustate == Init) return;