]> Cypherpunks repositories - gostls13.git/commit
runtime: fix syscall9 on darwin/arm64
authorqmuntal <quimmuntal@gmail.com>
Wed, 10 Sep 2025 14:34:22 +0000 (16:34 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 12 Sep 2025 15:39:47 +0000 (08:39 -0700)
commit7acb0d044695ca0fbedf94dca7abfdfd991bc69a
treed1b9769bdb0c9eec3b9c028f79bf2dbdc17ca99a
parent60c1ee91834d6c9701c5058830645da6eaa0cee9
runtime: fix syscall9 on darwin/arm64

The aarch64 ABI says that only the first 8 arguments should be
passed as registers, subsequent  arguments should be put on
the stack.

Syscall9 is not putting the 9th argument on the stack, and it should.

The standard library hasn't hit this issue because it uses Syscall9
for functions that only require 7 or 8 parameters.

Change-Id: I1fafca5b16f977ea856e3f08b4ff3d0a2a7a4dfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/702297
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/sys_darwin_arm64.s
src/runtime/syscall_test.go [new file with mode: 0644]
src/runtime/testdata/testsyscall/testsyscall.go [new file with mode: 0644]
src/runtime/testdata/testsyscall/testsyscall.s [new file with mode: 0644]
src/runtime/testdata/testsyscall/testsyscallc/testsyscallc.go [new file with mode: 0644]