]> Cypherpunks repositories - gostls13.git/commit
runtime: fix panic/wrapper/recover math
authorRuss Cox <rsc@golang.org>
Sat, 6 Sep 2014 17:19:08 +0000 (13:19 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 6 Sep 2014 17:19:08 +0000 (13:19 -0400)
commit8473695797d346f9adf72ee40013a8c8421a7c87
tree4ad85364166c67f15d548fb39068729413842ae4
parent8620e2b04e0ca6296070fe36ca7f5952af3b90e9
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
17 files changed:
src/liblink/obj5.c
src/liblink/obj6.c
src/liblink/obj8.c
src/pkg/reflect/value.go
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_amd64p32.s
src/pkg/runtime/asm_arm.s
src/pkg/runtime/cgocall.go
src/pkg/runtime/malloc.go
src/pkg/runtime/panic.go
src/pkg/runtime/panic1.go
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h
src/pkg/runtime/stack.c
src/pkg/runtime/stubs.go
test/recover.go