mirror of
https://github.com/golang/go.git
synced 2025-05-31 23:25:39 +00:00
The unsafe.Pointer -> uintptr conversion must happen when calling syscall.Syscall, not when calling the auto-generated wrapper function, else the Go compiler doesn't know that it has to keep the pointer alive. This can cause undefined behavior and stack corruption. Fixes #73135. Fixes #73112 (potentially). Fixes #73128 (potentially). Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-race Change-Id: Ib3ad8b99618d8997bfd0742c0e44aeda696856c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/662575 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Carlos Amedee <carlos@golang.org>