diff options
| author | Rhys Hiltner <rhys@justin.tv> | 2016-10-25 11:56:29 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2016-11-11 21:29:53 +0000 |
| commit | e0aedfb496f414e1a869d27175b4dfcc6baef407 (patch) | |
| tree | d34ac33c7025c6f1004237bce14c8fa0d78d8a3a /src/encoding/json/encode_test.go | |
| parent | 10d2efd0b0e3f4f92f9470435f63211cbeb82008 (diff) | |
| download | go-e0aedfb496f414e1a869d27175b4dfcc6baef407.tar.xz | |
runtime: include pre-panic/throw logs in core dumps
When a Go program crashes with GOTRACEBACK=crash, the OS creates a
core dump. Include the text-formatted output of some of the cause of
that crash in the core dump.
Output printed by the runtime before crashing is maintained in a
circular buffer to allow access to messages that may be printed
immediately before calling runtime.throw.
The stack traces printed by the runtime as it crashes are not stored.
The information required to recreate them should be included in the
core file.
Updates #16893
There are no tests covering the generation of core dumps; this change
has not added any.
This adds (reentrant) locking to runtime.gwrite, which may have an
undesired performance impact.
Change-Id: Ia2463be3c12429354d290bdec5f3c8d565d1a2c3
Reviewed-on: https://go-review.googlesource.com/32013
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/encoding/json/encode_test.go')
0 files changed, 0 insertions, 0 deletions
