aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/panic.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-08-09 12:53:35 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-08-09 12:53:35 +0400
commit01f1e3da484f74a7229c3c1eb719403b4e8c7a1c (patch)
tree339ea64dccf5684e6ab21ae19acbae5e5654a354 /src/pkg/runtime/panic.c
parente0405b73187fddbcd685490550681d4fb742105d (diff)
downloadgo-01f1e3da484f74a7229c3c1eb719403b4e8c7a1c.tar.xz
runtime: traceback running goroutines
Introduce freezetheworld function that is a best-effort attempt to stop any concurrently running goroutines. Call it during crash. Fixes #5873. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12054044
Diffstat (limited to 'src/pkg/runtime/panic.c')
-rw-r--r--src/pkg/runtime/panic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c
index 3211415266..78b3068749 100644
--- a/src/pkg/runtime/panic.c
+++ b/src/pkg/runtime/panic.c
@@ -419,6 +419,7 @@ runtime·startpanic(void)
g->writebuf = nil;
runtime·xadd(&runtime·panicking, 1);
runtime·lock(&paniclk);
+ runtime·freezetheworld();
}
void