]> Cypherpunks repositories - gostls13.git/commit
runtime: deduplicate context call injection on Windows
authorqmuntal <quimmuntal@gmail.com>
Fri, 14 Mar 2025 10:56:20 +0000 (11:56 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 21 Mar 2025 21:24:40 +0000 (14:24 -0700)
commit3108366214bb1fc15b0f261ba27f448e3bd0e685
tree38f8a67ce5893ea0a17cfb13fdb30b06e44b2c4f
parent2cc0ea46e410b295181c9e1efa85b0e2be495682
runtime: deduplicate context call injection on Windows

Injecting a call to a thread context is complex enough to warrant
a dedicated function so that we don't repeat the same code in multiple
places. Note that the unix sigctxt struct also follows the
same approach.

The behavior is unchanged, but the implementation semantics are now
clearer by using goarch.StackAlign instead of a mix of goarch.PtrSize,
goarch.StackAlign and hardcoded values.

While here, fix #68552.

Cq-Include-Trybots: luci.golang.try:gotip-windows-arm64
Change-Id: Ic29cd2bf322b520127fecccafd61577076945758
Reviewed-on: https://go-review.googlesource.com/c/go/+/657815
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
src/runtime/defs_windows_386.go
src/runtime/defs_windows_amd64.go
src/runtime/defs_windows_arm.go
src/runtime/defs_windows_arm64.go
src/runtime/os_windows.go
src/runtime/signal_windows.go