runtime: mark stdcallN functions cgo_unsafe_args
These functions take the address of an argument and expect to be able to reach later arguments from that pointer. This means they must be laid out sequentially in memory (using ABI0) and all arguments must be live even though they don't all appear to be referenced. This is exactly what go:cgo_unsafe_args does. Without this, GOEXPERIMENT=regabi,regabiargs on windows/amd64 crashes on runtime startup because the stdcall functions are called with their arguments in registers, so taking the address of one of them has no bearing on the memory locations of the following arguments. With this, GOEXPERIMENT=regabi,regabiargs on windows/amd64 passes all.bash. For #40724. Change-Id: I4a4d6a913f85799b43f61c234d21ebb113a9b527 Reviewed-on: https://go-review.googlesource.com/c/go/+/310733 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:Michael Knyszek <mknyszek@google.com> Reviewed-by:
Cherry Zhang <cherryyz@google.com>
Loading
Please sign in to comment