]> Cypherpunks repositories - gostls13.git/commit
runtime: on stack copy, adjust BP
authorKeith Randall <khr@golang.org>
Fri, 2 Dec 2016 23:17:52 +0000 (15:17 -0800)
committerKeith Randall <khr@golang.org>
Wed, 7 Dec 2016 16:59:25 +0000 (16:59 +0000)
commit1ea60c136a5782eadb9abf92064e3c1985fe1cdd
tree2f2bd64cab8a29e6dfe5200da85f30958912a76d
parent8e0c4639f11e9febd34fc1e2465138b37411b9d5
runtime: on stack copy, adjust BP

When we copy the stack, we need to adjust all BPs.
We correctly adjust the ones on the stack, but we also
need to adjust the one that is in g.sched.bp.

Like CL 33754, no test as only kernel-gathered profiles will notice.
Tests will come (in 1.9) with the implementation of #16638.

The invariant should hold that every frame pointer points to
somewhere within its stack.  After this CL, it is mostly true, but
something about cgo breaks it.  The runtime checks are disabled
until I figure that out.

Update #16638
Fixes #18174

Change-Id: I6023ee64adc80574ee3e76491d4f0fa5ede3dbdb
Reviewed-on: https://go-review.googlesource.com/33895
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/asm_amd64.s
src/runtime/stack.go