From e5ef5d46932d8f1fbe581ba22fb1d1144fedac5c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 18 Dec 2015 11:29:15 -0500 Subject: [PATCH] doc: add mention of debug.SetTraceback Change-Id: I59829029769ae08c6c54208a1e38a0794868c5db Reviewed-on: https://go-review.googlesource.com/18045 Reviewed-by: Ian Lance Taylor --- doc/go1.6.html | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/doc/go1.6.html b/doc/go1.6.html index 46cbe31ee8..69a7fab27b 100644 --- a/doc/go1.6.html +++ b/doc/go1.6.html @@ -33,7 +33,7 @@ We expect almost all Go programs to continue to compile and run as before.

The release adds new ports to Linux on 64-bit MIPS and Android on 32-bit x86; defined and enforced rules for sharing Go pointers with C; -transparent, automatic support for HTTP/2; +transparent, automatic support for HTTP/2; and a new mechanism for template reuse.

@@ -258,7 +258,7 @@ to implementations of the

Core library

-

HTTP/2

+

HTTP

Go 1.6 adds transparent support in the @@ -289,6 +289,18 @@ functions.

Runtime

+

+The runtime has added lightweight, best-effort detection of concurrent misuse of maps. +As always, if one goroutine is writing to a map, no other goroutine should be +reading or writing the map concurrently. +If the runtime detects this condition, it prints a diagnosis and crashes the program. +The best way to find out more about the problem is to run the program +under the +race detector, +which will more reliably identify the race +and give more detail. +

+

For program-ending panics, the runtime now by default prints only the stack of the running goroutine, @@ -298,20 +310,19 @@ so omitting the others significantly reduces irrelevant output in a crash message. To see the stacks from all goroutines in crash messages, set the environment variable GOTRACEBACK to all -and rerun the program. +or call +debug.SetTraceback +before the crash, and rerun the program. See the runtime documentation for details.

-The runtime has added lightweight, best-effort detection of concurrent misuse of maps. -As always, if one goroutine is writing to a map, no other goroutine should be -reading or writing the map concurrently. -If the runtime detects this condition, it prints a diagnosis and crashes the program. -The best way to find out more about the problem is to run the program -under the -race detector, -which will more reliably identify the race -and give more detail. +Updating: +Uncaught panics intended to dump the state of the entire program, +such as when a timeout is detected or when explicitly handling a received signal, +should now call debug.SetTraceback("all") before panicking. +Searching for uses of +signal.Notify may help identify such code.

Reflect

@@ -686,7 +697,7 @@ and
  • Also in the net/http package, -there are a few changes related to the handling of a +there are a few change related to the handling of a Request data structure with its Method field set to the empty string. An empty Method field has always been documented as an alias for "GET" and it remains so. -- 2.50.0