diff options
| author | Austin Clements <austin@google.com> | 2015-06-05 11:07:21 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-06-05 15:53:07 +0000 |
| commit | 7529314ed37fdb94af2a25405edcb26ccb243b8e (patch) | |
| tree | 058e8c9105a76693183c44c69aa1f2ed4ae0c5bb /src/runtime/stack_test.go | |
| parent | 24de40a8461a48f814c1bd37a1a6b911c922366f (diff) | |
| download | go-7529314ed37fdb94af2a25405edcb26ccb243b8e.tar.xz | |
runtime: use correct SP when installing stack barriers
Currently the stack barriers are installed at the next frame boundary
after gp.sched.sp + 1024*2^n for n=0,1,2,... However, when a G is in a
system call, we set gp.sched.sp to 0, which causes stack barriers to
be installed at *every* frame. This easily overflows the slice we've
reserved for storing the stack barrier information, and causes a
"slice bounds out of range" panic in gcInstallStackBarrier.
Fix this by using gp.syscallsp instead of gp.sched.sp if it's
non-zero. This is the same logic that gentraceback uses to determine
the current SP.
Fixes #11049.
Change-Id: Ie40eeee5bec59b7c1aa715a7c17aa63b1f1cf4e8
Reviewed-on: https://go-review.googlesource.com/10755
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/stack_test.go')
0 files changed, 0 insertions, 0 deletions
