]> Cypherpunks repositories - gostls13.git/commit
runtime: correct caller PC/SP offsets in walltime1/nanotime1
authorCherry Zhang <cherryyz@google.com>
Tue, 11 Feb 2020 20:09:39 +0000 (15:09 -0500)
committerCherry Zhang <cherryyz@google.com>
Thu, 13 Feb 2020 19:49:45 +0000 (19:49 +0000)
commit3eab754cd061bf90ee7b540546bc0863f3ad1d85
treeaf3dc202cb9218aae18787578b0547ea013c5c36
parent123f7dd3e1eb90825ece57b8dde39438ca34f150
runtime: correct caller PC/SP offsets in walltime1/nanotime1

In walltime1/nanotime1, we save the caller's PC and SP for stack
unwinding. The code does that assumed zero frame size. Now that
the frame size is not zero, correct the offset. Rewrite it in a
way that doesn't depend on hard-coded frame size.

May fix #37127.

Change-Id: I47d6d54fc3499d7d5946c3f6a2dbd24fbd679de1
Reviewed-on: https://go-review.googlesource.com/c/go/+/219118
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s