diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-06 13:19:08 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-06 13:19:08 -0400 |
| commit | 8473695797d346f9adf72ee40013a8c8421a7c87 (patch) | |
| tree | 4ad85364166c67f15d548fb39068729413842ae4 /src/pkg/runtime/stack.c | |
| parent | 8620e2b04e0ca6296070fe36ca7f5952af3b90e9 (diff) | |
| download | go-8473695797d346f9adf72ee40013a8c8421a7c87.tar.xz | |
runtime: fix panic/wrapper/recover math
The gp->panicwrap adjustment is just fatally flawed.
Now that there is a Panic.argp field, update that instead.
That can be done on entry only, so that unwinding doesn't
need to worry about undoing anything. The wrappers
emit a few more instructions in the prologue but everything
else in the system gets much simpler.
It also fixes (without trying) a broken test I never checked in.
Fixes #7491.
LGTM=khr
R=khr
CC=dvyukov, golang-codereviews, iant, r
https://golang.org/cl/135490044
Diffstat (limited to 'src/pkg/runtime/stack.c')
| -rw-r--r-- | src/pkg/runtime/stack.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index 20a37046f9..18b3f40648 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -371,7 +371,6 @@ runtime·oldstack(void) gp->stackbase = top->stackbase; gp->stackguard = top->stackguard; gp->stackguard0 = gp->stackguard; - gp->panicwrap = top->panicwrap; runtime·stackfree(gp, old, top); runtime·casgstatus(gp, Gcopystack, oldstatus); // oldstatus is Grunning or Gsyscall runtime·gogo(&gp->sched); @@ -1033,9 +1032,6 @@ runtime·newstack(void) top->argp = moreargp; top->argsize = argsize; - top->panicwrap = gp->panicwrap; - gp->panicwrap = 0; - gp->stackbase = (uintptr)top; gp->stackguard = (uintptr)stk + StackGuard; gp->stackguard0 = gp->stackguard; |
