Skip to content

Commit b7b1296

Browse files
authored
Fix issue with preemption on Windows ARM32
1 parent eb29beb commit b7b1296

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/runtime/os_windows.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,13 +1320,12 @@ func preemptM(mp *m) {
13201320
// Push LR. The injected call is responsible
13211321
// for restoring LR. gentraceback is aware of
13221322
// this extra slot. See sigctxt.pushCall in
1323-
// signal_arm.go, which is similar except we
1324-
// subtract 1 from IP here.
1323+
// signal_arm.go.
13251324
sp := c.sp()
13261325
sp -= goarch.PtrSize
13271326
c.set_sp(sp)
13281327
*(*uint32)(unsafe.Pointer(sp)) = uint32(c.lr())
1329-
c.set_lr(newpc - 1)
1328+
c.set_lr(newpc)
13301329
c.set_ip(targetPC)
13311330

13321331
case "arm64":

0 commit comments

Comments
 (0)