From b7b1296cd5745069e37587882877b24d727717fd Mon Sep 17 00:00:00 2001 From: wmjb <77227948+wmjb@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:57:03 +0000 Subject: [PATCH] Fix issue with preemption on Windows ARM32 --- src/runtime/os_windows.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index 7183e79f7df09..488703482fbf8 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -1320,13 +1320,12 @@ func preemptM(mp *m) { // Push LR. The injected call is responsible // for restoring LR. gentraceback is aware of // this extra slot. See sigctxt.pushCall in - // signal_arm.go, which is similar except we - // subtract 1 from IP here. + // signal_arm.go. sp := c.sp() sp -= goarch.PtrSize c.set_sp(sp) *(*uint32)(unsafe.Pointer(sp)) = uint32(c.lr()) - c.set_lr(newpc - 1) + c.set_lr(newpc) c.set_ip(targetPC) case "arm64":