]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: delay exiting while panic is running deferred functions
authorIan Lance Taylor <iant@golang.org>
Wed, 19 Apr 2017 14:32:34 +0000 (07:32 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 5 Jun 2017 22:42:48 +0000 (22:42 +0000)
commit2d86f4942868c1309051062237cf4d424d588e9c
tree83daa9155317bed206497703c0132b1bfc4a0265
parent3c745d750e8342b1dd4144a83488b559efb8b271
runtime: delay exiting while panic is running deferred functions

Try to avoid a race between the main goroutine exiting and a panic
occurring. Don't try too hard, to avoid hanging.

Updates #3934
Fixes #20018

Change-Id: I57a02b6d795d2a61f1cadd137ce097145280ece7
Reviewed-on: https://go-review.googlesource.com/41052
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/crash_test.go
src/runtime/panic.go
src/runtime/proc.go
src/runtime/runtime2.go
src/runtime/testdata/testprog/panicrace.go [new file with mode: 0644]