]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.3] runtime: fix panic stack during runtime.Goexit during panic
authorRuss Cox <rsc@golang.org>
Sat, 7 Jun 2014 02:07:32 +0000 (22:07 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 7 Jun 2014 02:07:32 +0000 (22:07 -0400)
commitc70654f7e134d42f38c471f79e53a8ac83070d65
treec934be3577012a2e4a1e35ff9ad89a70aed649e7
parente16c88a5e7b36aae7bef804d946a03af76f29960
[release-branch.go1.3] runtime: fix panic stack during runtime.Goexit during panic

««« CL 102220043 / 00224712f89e
runtime: fix panic stack during runtime.Goexit during panic

A runtime.Goexit during a panic-invoked deferred call
left the panic stack intact even though all the stack frames
are gone when the goroutine is torn down.
The next goroutine to reuse that struct will have a
bogus panic stack and can cause the traceback routines
to walk into garbage.

Most likely to happen during tests, because t.Fatal might
be called during a deferred func and uses runtime.Goexit.

This "not enough cleared in Goexit" failure mode has
happened to us multiple times now. Clear all the pointers
that don't make sense to keep, not just gp->panic.

Fixes #8158.

LGTM=iant, dvyukov
R=iant, dvyukov
CC=golang-codereviews
https://golang.org/cl/102220043
»»»

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/108780044
src/pkg/runtime/proc.c
test/fixedbugs/issue8158.go [new file with mode: 0644]