]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] runtime: check that stack barrier unwind is in sync
authorAustin Clements <austin@google.com>
Wed, 26 Aug 2015 19:06:43 +0000 (15:06 -0400)
committerChris Broadfoot <cbro@golang.org>
Tue, 8 Sep 2015 18:02:06 +0000 (18:02 +0000)
commitf265044a489c9e572ffc141ed2d0e95f05d451c9
treeb87bbfe692e7a3521cfc96a244e1c3429a6bfc27
parentc0dd2011132f179e77f7f6e1ccd88b5a0e0ee659
[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: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14241
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/asm_amd64.s