]> Cypherpunks repositories - gostls13.git/commit
runtime: set vdsoSP to caller's SP consistently
authorCherry Mui <cherryyz@google.com>
Wed, 22 Sep 2021 22:32:45 +0000 (18:32 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 24 Sep 2021 14:52:47 +0000 (14:52 +0000)
commit217507eb035933bac6c990844f0d71d6000fd339
tree52f6e6218b248f92e0a2ad3f919143d16e5ea875
parentfe8347b61a5e33506c9e3827877ec318c90377e6
runtime: set vdsoSP to caller's SP consistently

m.vdsoSP should be set to the SP of the caller of nanotime1,
instead of the SP of nanotime1 itself, which matches m.vdsoPC.
Otherwise the unmatched vdsoPC and vdsoSP would make the stack
trace look like recursive.

We already do it correctly on AMD64, 386, and RISCV64. This CL
fixes the rest.

Fixes #47324.

Change-Id: I98b6fcfbe9fc6bdd28b8fe2a1299b7c505371dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/337590
Trust: Cherry Mui <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/runtime/pprof/pprof_test.go
src/runtime/sys_linux_arm.s
src/runtime/sys_linux_arm64.s
src/runtime/sys_linux_mips64x.s
src/runtime/sys_linux_ppc64x.s