Commit f265044a authored by Austin Clements's avatar Austin Clements Committed by Chris Broadfoot
Browse files

[release-branch.go1.5] runtime: check that stack barrier unwind is in sync

Currently the stack barrier stub blindly unwinds the next stack
barrier from the G's stack barrier array without checking that it's
the right stack barrier. If through some bug the stack barrier array
position gets out of sync with where we actually are on the stack,
this could return to the wrong PC, which would lead to difficult to
debug crashes. To address this, this commit adds a check to the amd64
stack barrier stub that it's unwinding the correct stack barrier.

Updates #12238.

Change-Id: If824d95191d07e2512dc5dba0d9978cfd9f54e02
Reviewed-on: https://go-review.googlesource.com/13948


Reviewed-by: default avatarRuss Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14241


Reviewed-by: default avatarAustin Clements <austin@google.com>
parent c0dd2011
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment