]> Cypherpunks repositories - gostls13.git/commit
runtime: use gp->sched.sp for stack overflow check
authorRuss Cox <rsc@golang.org>
Thu, 27 Jun 2013 20:51:06 +0000 (16:51 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 27 Jun 2013 20:51:06 +0000 (16:51 -0400)
commitf0d73fbc7c24ea9d81f24732896a99778f623f80
treed108e3e4ac65ffd4c4142b69dc6902f2317b3318
parent4eb17ecd1f1c5d130a0fe5c6bbd03714d315c41a
runtime: use gp->sched.sp for stack overflow check

On x86 it is a few words lower on the stack than m->morebuf.sp
so it is a more precise check. Enabling the check requires recording
a valid gp->sched in reflect.call too. This is a good thing in general,
since it will make stack traces during reflect.call work better, and it
may be useful for preemption too.

R=dvyukov
CC=golang-dev
https://golang.org/cl/10709043
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_arm.s
src/pkg/runtime/stack.c