diff options
| author | Russ Cox <rsc@golang.org> | 2013-09-11 12:00:37 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2013-09-11 12:00:37 -0400 |
| commit | ab38e2a498f432fc33dc1f91815756cf2c56af72 (patch) | |
| tree | 2e7e8bec406b40f7ea9dadc36818679123dc9a44 /src/pkg/runtime/panic.c | |
| parent | fa4984d535b23c0d2b14650a8842d63083893af3 (diff) | |
| download | go-ab38e2a498f432fc33dc1f91815756cf2c56af72.tar.xz | |
runtime: show m stack during crash on m stack
The various throwing > 0 finish a change started
in a previous CL, which sets throwing = -1 to mean
"don't show the internals". That gets set during the
"all goroutines are asleep - deadlock!" crash, and it
should also be set during any other expected crash
that does not indicate a problem within the runtime.
Most runtime.throw do indicate a problem within the
runtime, however, so we should be able to enumerate
the ones that should be silent. The goroutine sleeping
deadlock is the only one I can think of.
Update #5139
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13662043
Diffstat (limited to 'src/pkg/runtime/panic.c')
| -rw-r--r-- | src/pkg/runtime/panic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index 4fbbed1071..c14d52016c 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -443,7 +443,7 @@ runtime·dopanic(int32 unused) runtime·printf("\n"); runtime·goroutineheader(g); runtime·traceback((uintptr)runtime·getcallerpc(&unused), (uintptr)runtime·getcallersp(&unused), 0, g); - } else if(t >= 2) { + } else if(t >= 2 || m->throwing > 0) { runtime·printf("\nruntime stack:\n"); runtime·traceback((uintptr)runtime·getcallerpc(&unused), (uintptr)runtime·getcallersp(&unused), 0, g); } |
