authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-09 01:40:41+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-09 17:53:03+02:00
log39caa63800c161bc7e403f5636147b19ed48ef38
treeb17d826d05a6ad4fb904258885818e6c242625af
parentbf66a7d6b7f17a1404f65e1c53ca08ef4442cec4
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux.riscv32: fix child stack alignment violation in clone assembly

Both LP64 and ILP32 calling conventions require the stack pointer to be aligned to a 16-byte boundary on function entry.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/linux/riscv32.zig+1-1
......@@ -118,7 +118,7 @@ pub fn clone() callconv(.naked) u32 {
118118 asm volatile (
119119 \\ andi a1, a1, -16
120120 \\ # Save func and arg to stack
121 \\ addi a1, a1, -8
121 \\ addi a1, a1, -16
122122 \\ sw a0, 0(a1)
123123 \\ sw a3, 4(a1)
124124 \\