aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_windows.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-08-25 09:57:49 +0200
committerQuim Muntal <quimmuntal@gmail.com>2025-08-26 03:49:59 -0700
commitbfd130db02336a174dab781185be369f089373ba (patch)
treeeb26cfaace707cc67d7e51823878f176323746c4 /src/syscall/exec_windows.go
parentdae9e456ae6992b3c19a8c5039090ee9ca4d9b7d (diff)
downloadgo-bfd130db02336a174dab781185be369f089373ba.tar.xz
internal/poll: don't use stack-allocated WSAMsg parameters
WSAMsg parameters should be passed to Windows as heap pointers instead of stack pointers. This is because Windows might access the memory after the syscall returned in case of a non-blocking operation (which is the common case), and if the WSAMsg is on the stack, the Go runtime might have moved it around. Use a sync.Pool to cache WSAMsg structures to avoid a heap allocation every time a WSAMsg is needed. Fixes #74933 Cq-Include-Trybots: luci.golang.try:x_net-gotip-windows-amd64 Change-Id: I075e2ceb25cd545224ab3a10d404340faf19fc01 Reviewed-on: https://go-review.googlesource.com/c/go/+/698797 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/syscall/exec_windows.go')
0 files changed, 0 insertions, 0 deletions