]> Cypherpunks repositories - gostls13.git/commit
runtime: account for spill slots in Windows callback compilation
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 21 May 2021 20:30:02 +0000 (20:30 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 24 May 2021 16:47:51 +0000 (16:47 +0000)
commit4356e7e85fcd8f59de6bc1fd1db6e4f01a92f19e
treebd1c1fcd59d30d700f410321dee30c20d87f4a73
parent52d7033ff6d56094b7fa852bbdf51b4525bd6bb2
runtime: account for spill slots in Windows callback compilation

The Go ABI, as it stands, requires spill space to be reserved for
register arguments. syscall.NewCallback (because of compileCallback)
does not actually reserve this space, leading to issues if the Go code
it invokes actually makes use of it.

Fixes #46301.

Change-Id: Idbc3578accaaaa29e4ba32291ef08d464da0b7b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/322029
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Egon Elbre <egonelbre@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/syscall_windows.go
src/runtime/syscall_windows_test.go