Commit graph

25831 commits

Author SHA1 Message Date
Brad Fitzpatrick ddc25081d2 log/syslog: document that syslog is frozen
Try to reduce feature request bug reports.

Change-Id: I713bb715d25d23e084b054aea8e1c3197dde90d4
Reviewed-on: https://go-review.googlesource.com/18222
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-05 22:56:07 +00:00
Brad Fitzpatrick 7de71c8526 net/http: make Client use Request.Cancel for timeouts instead of CancelRequest
In the beginning, there was no way to cancel an HTTP request.

We later added Transport.CancelRequest to cancel an in-flight HTTP
request by breaking its underlying TCP connection, but it was hard to
use correctly and didn't work in all cases. And its error messages
were terrible. Some of those issues were fixed over time, but the most
unfixable problem was that it didn't compose well. All RoundTripper
implementations had to choose to whether to implement CancelRequest
and both decisions had negative consequences.

In Go 1.5 we added Request.Cancel, which composed well, worked in all
phases, had nice error messages, etc. But we forgot to use it in the
implementation of Client.Timeout (a timeout which spans multiple
requests and reading request bodies).

In Go 1.6 (upcoming), we added HTTP/2 support, but now Client.Timeout
didn't work because the http2.Transport didn't have a CancelRequest
method.

Rather than add a CancelRequest method to http2, officially deprecate
it and update the only caller (Client, for Client.Cancel) to use
Request.Cancel instead.

The http2 Client timeout tests are enabled now.

For compatibility, we still use CancelRequest in Client if we don't
recognize the RoundTripper type. But documentation has been updated to
tell people that CancelRequest is deprecated.

Fixes #13540

Change-Id: I15546b90825bb8b54905e17563eca55ea2642075
Reviewed-on: https://go-review.googlesource.com/18260
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-05 22:55:22 +00:00
Robert Griesemer 212bdd95e0 spec: New year, new spec update (to refer to Unicode 8.0).
Slightly rephrased sentence to emphasize the contents of the
Unicode categories w/o repeating the full category name each
time.

Fixes #13414.

Change-Id: Icd32ff1547fa81e866c5937a631c3344bb6087c6
Reviewed-on: https://go-review.googlesource.com/18265
Reviewed-by: Rob Pike <r@golang.org>
2016-01-05 22:39:26 +00:00
Brad Fitzpatrick 7fa9846749 net/http: tighten protocol between Transport.roundTrip and persistConn.readLoop
In debugging the flaky test in #13825, I discovered that my previous
change to tighten and simplify the communication protocol between
Transport.roundTrip and persistConn.readLoop in
https://golang.org/cl/17890 wasn't complete.

This change simplifies it further: the buffered-vs-unbuffered
complexity goes away, and we no longer need to re-try channel reads in
the select case. It was trying to prioritize channels in the case that
two were readable in the select. (it was only failing in the race builder
because the race builds randomize select scheduling)

The problem was that in the bodyless response case we had to return
the idle connection before replying to roundTrip. But putIdleConn
previously both added it to the free list (which we wanted), but also
closed the connection, which made the caller goroutine
(Transport.roundTrip) have two readable cases: pc.closech, and the
response. We guarded against similar conditions in the caller's select
for two readable channels, but such a fix wasn't possible here, and would
be overly complicated.

Instead, switch to unbuffered channels. The unbuffered channels were only
to prevent goroutine leaks, so address that differently: add a "callerGone"
channel closed by the caller on exit, and select on that during any unbuffered
sends.

As part of the fix, split putIdleConn into two halves: a part that
just returns to the freelist, and a part that also closes. Update the
four callers to the variants each wanted.

Incidentally, the connections were closing on return to the pool due
to MaxIdleConnsPerHost (somewhat related: #13801), but this bug
could've manifested for plenty of other reasons.

Fixes #13825

Change-Id: I6fa7136e2c52909d57a22ea4b74d0155fdf0e6fa
Reviewed-on: https://go-review.googlesource.com/18282
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-01-05 22:33:16 +00:00
Austin Clements 59ca8789fb runtime/pprof: skip TestStackBarrierProfiling
This test triggers a large number of usleep(100)s. linux/arm, openbsd,
and solaris have very poor timer resolution on the builders, so
usleep(100) actually gives up the whole scheduling quantum. On Linux
and OpenBSD (and probably Solaris), profiling signals are only
generated when a process completes a whole scheduling quantum, so this
test often gets zero profiling signals and fails.

Until we figure out what to do about this, skip this test on these
platforms.

Updates #13405.

Change-Id: Ica94e4a8ae7a8df3e5a840504f83ee2ec08727df
Reviewed-on: https://go-review.googlesource.com/18252
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
2016-01-05 18:48:19 +00:00
Ian Lance Taylor 2c67c8c303 runtime: fix exit status when killed by signal
Previously, when a program died because of a SIGHUP, SIGINT, or SIGTERM
signal it would exit with status 2.  This CL fixes the runtime to exit
with a status indicating that the program was killed by a signal.

Change-Id: Ic2982a2562857edfdccaf68856e0e4df532af136
Reviewed-on: https://go-review.googlesource.com/18156
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2016-01-05 18:00:33 +00:00
Ian Lance Taylor 81b35117d9 runtime: set SIGCONT to _SigNotify + _SigDefault
Use the current ability to say that we don't do anything with SIGCONT by
default, but programs can catch it using signal.Notify if they want.

Fixes #8953.

Change-Id: I67d40ce36a029cbc58a235cbe957335f4a58e1c5
Reviewed-on: https://go-review.googlesource.com/18185
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-05 17:44:46 +00:00
David Chase ab5d2bf92f cmd/compile: suppress export of Note field within exported bodies
Added a format option to inhibit output of .Note field in
printing, and enabled that option during export.
Added test.

Fixes #13777.

Change-Id: I739f9785eb040f2fecbeb96d5a9ceb8c1ca0f772
Reviewed-on: https://go-review.googlesource.com/18217
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: David Chase <drchase@google.com>
2016-01-05 15:42:12 +00:00
Russ Cox d731315cdb net: run all timeout tests in parallel
For #10571.

Change-Id: I9a42226078b9c52dbe0c65cb101b5f452233e911
Reviewed-on: https://go-review.googlesource.com/18205
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-05 14:19:39 +00:00
Russ Cox f2c36df9a2 misc/cgo/testcshared: print a little more about GOROOT on failure
For #13789.

Change-Id: I83973298a35afcf55627f0a72223098306a51f4b
Reviewed-on: https://go-review.googlesource.com/18233
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-05 14:19:24 +00:00
Russ Cox 906f979119 cmd/dist: wait for pending tests before exiting
When 'go tool dist test' stops, it was intended that it first wait for
pending background tests, like a failed compilation waits for pending
background compiles. But these three lines prevented that.
Fix by deleting them. (The actual loop already contains the correct
logic to avoid running the others and to wait for what's left.)

Change-Id: I4e945495ada903fb0af567910626241bc1c52ba6
Reviewed-on: https://go-review.googlesource.com/18232
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-05 14:18:38 +00:00
Brad Fitzpatrick 4b0bc7c3a1 net/http: relax recently-updated rules and behavior of CloseNotifier
The CloseNotifier implementation and documentation was
substantially changed in https://golang.org/cl/17750 but it was a bit
too aggressive.

Issue #13666 highlighted that in addition to breaking external
projects, even the standard library (httputil.ReverseProxy) didn't
obey the new rules about not using CloseNotifier until the
Request.Body is fully consumed.

So, instead of fixing httputil.ReverseProxy, dial back the rules a
bit. It's now okay to call CloseNotify before consuming the request
body. The docs now say CloseNotifier may wait to fire before the
request body is fully consumed, but doesn't say that the behavior is
undefined anymore. Instead, we just wait until the request body is
consumed and start watching for EOF from the client then.

This CL also adds a test to ReverseProxy (using a POST request) that
would've caught this earlier.

Fixes #13666

Change-Id: Ib4e8c29c4bfbe7511f591cf9ffcda23a0f0b1269
Reviewed-on: https://go-review.googlesource.com/18144
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-05 04:39:11 +00:00
Matthew Dempsky 66f1f89dc0 cmd/internal/obj: fix PCSP table at runtime.morestack calls
Fixes #13346.

Change-Id: Ic903ee90575e8dbe23905d0678d3295745d1d47f
Reviewed-on: https://go-review.googlesource.com/18154
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-05 01:48:31 +00:00
Ian Lance Taylor b80ea53200 os: remove unused import to fix build
Change-Id: Ia8c1c77590115a5ffda144962436d489ed77a423
Reviewed-on: https://go-review.googlesource.com/18227
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-05 01:21:26 +00:00
Ian Lance Taylor 58c73de7d0 os, runtime: better EPIPE behavior for command line programs
Old behavior: 10 consecutive EPIPE errors on any descriptor cause the
program to exit with a SIGPIPE signal.

New behavior: an EPIPE error on file descriptors 1 or 2 cause the
program to raise a SIGPIPE signal.  If os/signal.Notify was not used to
catch SIGPIPE signals, this will cause the program to exit with SIGPIPE.
An EPIPE error on a file descriptor other than 1 or 2 will simply be
returned from Write.

Fixes #11845.
Update #9896.

Change-Id: Ic85d77e386a8bb0255dc4be1e4b3f55875d10f18
Reviewed-on: https://go-review.googlesource.com/18151
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-05 00:32:50 +00:00
Ian Lance Taylor a7d2b4d7ce runtime: disable a signal by restoring the original disposition
Fixes #13034.
Fixes #13042.
Update #9896.

Change-Id: I189f381090223dd07086848aac2d69d2c00d80c4
Reviewed-on: https://go-review.googlesource.com/18062
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-05 00:25:50 +00:00
Aaron Jacobs 6c8a141a6d cmd/go: update out of date help text about vendoring
Change-Id: I2b61f3b3ecf28d8f6a8dff94d194b6d3d450ea22
Reviewed-on: https://go-review.googlesource.com/17996
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-04 20:50:18 +00:00
Russ Cox 7f4443d5fa testing: add clear panic for duplicate call to t.Parallel
Change-Id: I155633b58e1823344a26c3edf11f5626fae080ee
Reviewed-on: https://go-review.googlesource.com/18204
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-04 20:10:17 +00:00
Russ Cox 9d549b5b62 runtime/pprof: shorten a few tests
For #10571.

Change-Id: I4bdad64e2dfd692ef2adccf2e5e82e9b1996a8ea
Reviewed-on: https://go-review.googlesource.com/18206
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
2016-01-04 20:10:10 +00:00
Russ Cox 83746fd55a cmd/link: use current GOROOT for source file paths for standard library
This CL changes the source file information in the
standard library's .a files to say "$GOROOT/src/runtime/chan.go"
(with a literal "$GOROOT") instead of spelling out the actual directory.
The linker then substitutes the actual $GOROOT (or $GOROOT_FINAL)
as appropriate.

If people download a binary distribution to an alternate location,
following the instructions at https://golang.org/doc/install#install,
the code before this CL would end up with source paths pointing to
/usr/local/go no matter where the actual sources were.
Now the source paths for built binaries will point to the actual sources
(hopefully).

The source line information in distributed binaries is not affected:
those will still say /usr/local/go. But binaries people build themselves
(their own programs, not the go distribution programs) will be correct.

Fixing this path also fixes the lookup of the runtime-gdb.py file.

Fixes #5533.

Change-Id: I03729baae3fbd8cd636e016275ee5ad2606e4663
Reviewed-on: https://go-review.googlesource.com/18200
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-04 20:09:57 +00:00
Didier Spezia dc5315c341 build: prevent the entire repo to be wiped out by cgo test scripts
Following the parallelization of some tests, a race condition can
occur in testcarchive, testshared and testcshared.

In some cases, it can result in the go env GOROOT command returning
corrupted data, which are then passed to a rm command.

Make the shell script more robust by not trusting the result of
the go env GOROOT command. It does not really fix the issue, but
at least prevent the entire repository to be deleted.

Updates #13789

Change-Id: Iaf04a7bd078ed3a82e724e35c4b86e6f756f2a2f
Reviewed-on: https://go-review.googlesource.com/18173
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-04 19:56:30 +00:00
Brad Fitzpatrick 28b95edff2 net/http: deflake tests in full mode after t.Parallel additions
https://golang.org/cl/18087 added a bunch of t.Parallel calls, which
aren't compatible with the afterTest func. But in short mode, afterTest
is a no-op. To keep all.bash (short mode) fast, conditionally set
t.Parallel when in short mode, but keep it unset for compatibility with
afterFunc otherwise.

Fixes #13804

Change-Id: Ie841fbc2544e1ffbee43ba1afbe895774e290da0
Reviewed-on: https://go-review.googlesource.com/18143
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-04 19:23:17 +00:00
Ian Lance Taylor fa8384dfb9 runtime: remove now-unused test string constants
Change-Id: I491197e1505d02cd107a8788e5377cf1d0a9828c
Reviewed-on: https://go-review.googlesource.com/18157
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-04 19:07:26 +00:00
Ian Lance Taylor 956535f5cb runtime: implement setsigstack for Solaris
Change-Id: I0280d478b7d0a59d8e2082aa87fab6d7d9f36a18
Reviewed-on: https://go-review.googlesource.com/18158
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2016-01-04 16:33:58 +00:00
Benny Siegert e2093cdeef doc: fix typo in install-source.html.
Change-Id: I6ea7339ff9412111319e46f2962c6b3880987a1e
Reviewed-on: https://go-review.googlesource.com/18174
Reviewed-by: Minux Ma <minux@golang.org>
2016-01-03 20:52:07 +00:00
Ian Lance Taylor 3fd19fdc51 runtime: treat SIGTSTP/SIGCANCEL on Solaris as we do on GNU/Linux
Change-Id: I617abd53f5fc883b972a1ef090886b85607e00bb
Reviewed-on: https://go-review.googlesource.com/18155
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2016-01-02 17:34:25 +00:00
Shenghou Ma ca9876dd2f doc: fix typo
Fixes #13780.

Change-Id: I629e2ba79b74d693e04c3747812c9a686cae5335
Reviewed-on: https://go-review.googlesource.com/18218
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-01 05:00:12 +00:00
David Symonds 043ae50feb doc: 2016 is the Year of the Gopher.
Change-Id: I85caba8c743dcd82954de75df947053b3d206bdc
Reviewed-on: https://go-review.googlesource.com/18117
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-12-31 13:11:06 +00:00
Alex Brainman ca47157395 os: change Open(C:) to open current directory on C:
Open(`C:`) currently opens root directory on C:. Change that to open
current directory on C:. Just like cmd.exe's "dir C:" command does.
Just like FindFirstFile("C:*") Windows API does. It is also consistent
with what filepath.Join("C:", "a") currently does.

Fixes #13763

Change-Id: I60b6e7d80215d110bbbb6265c9f32717401638c6
Reviewed-on: https://go-review.googlesource.com/18184
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
2015-12-31 00:20:54 +00:00
Evan Shaw e35901fd65 database/sql: fix doc typos
Change-Id: I374dabed6bf9783839d637e9d7fd6f4e61c7eecf
Reviewed-on: https://go-review.googlesource.com/18183
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-30 07:27:12 +00:00
Hiroshi Ioka 4601776901 os: fix race condition between (*os.File).Stat and os.Chdir on windows
Fixes #13752

Change-Id: I53cfc4ecae90c35b6f1074f3be08489c408a6464
Reviewed-on: https://go-review.googlesource.com/18181
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-12-30 06:37:08 +00:00
Russ Cox 8d5ff2e182 runtime: move test programs out of source code, coalesce
Now there are just three programs to compile instead of many,
and repeated tests can reuse the compilation result instead of
rebuilding it.

Combined, these changes reduce the time spent testing runtime
during all.bash on my laptop from about 60 to about 30 seconds.
(All.bash itself runs in 5½ minutes.)

For #10571.

Change-Id: Ie2c1798b847f1a635a860d11dcdab14375319ae9
Reviewed-on: https://go-review.googlesource.com/18085
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
2015-12-29 21:16:59 +00:00
Brad Fitzpatrick a699320512 net/http: update docs on Request.Proto, ProtoMajor, ProtoMinor
Change-Id: I4a6928b4674b6aaab3611cad7526347923a0015f
Reviewed-on: https://go-review.googlesource.com/18153
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-29 18:54:39 +00:00
Russ Cox f034ee8c22 cmd/dist: apply final edits from CL 18199.
I broke the rule: never click the Submit button on the web.

Change-Id: If81a5cc31c1f28664960bad124cc596f5cab1222
Reviewed-on: https://go-review.googlesource.com/18203
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-29 17:25:06 +00:00
Russ Cox d513ee774c cmd/dist: run shards of test dir in parallel
Saves 15 seconds from all.bash on my laptop (3:20 -> 3:05).

Change-Id: Ic5dc3c7804e78b584789dd856a3dada94000a8e2
Reviewed-on: https://go-review.googlesource.com/18199
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29 17:18:04 +00:00
Russ Cox b6473ff132 cmd/dist: run wiki, shootout etc tests only on builders
These find approximately nothing.
Takes 5% off my all.bash run time.

For #10571.

Change-Id: I21d3a844af756eb37f59bba0064f24995626da0d
Reviewed-on: https://go-review.googlesource.com/18198
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29 16:26:50 +00:00
Russ Cox baa928a782 cmd/dist: run various one-off tests in parallel
Takes 15% off my all.bash run time
(after this and earlier CLs, now down to 3½ from 5½ minutes).

For #10571.

Change-Id: Iac316ffb730c9ff0a0faa7cc3b82ed4f7e6d4361
Reviewed-on: https://go-review.googlesource.com/18088
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-29 15:50:04 +00:00
Russ Cox f41378e225 cmd/dist: run limited tests in race and libgcc=none modes
Mostly we just care that the test binaries link and start up.
No need to run the full test suites.

Takes 12% off my all.bash run time.

For #10571.

Change-Id: I01af618f3d51deb841ea638424e1389a2df7d746
Reviewed-on: https://go-review.googlesource.com/18086
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2015-12-29 15:48:04 +00:00
Russ Cox 04d732b4c2 build: shorten a few packages with long tests
Takes 3% off my all.bash run time.

For #10571.

Change-Id: I8f00f523d6919e87182d35722a669b0b96b8218b
Reviewed-on: https://go-review.googlesource.com/18087
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-29 15:46:44 +00:00
Russ Cox acc1500139 api/go1.6.txt: add debug.SetTraceback, build.Package.InvalidGoFiles
Change-Id: Ib00e866e29681631f6fa3a14e7d81c25fc3c8500
Reviewed-on: https://go-review.googlesource.com/18052
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29 15:20:51 +00:00
Russ Cox f70f277875 cmd/dist: make test default to --no-rebuild
I'm tired of having to remember it on every command.
Rebuilding everything is the wrong default.

This CL updates the build script, but the builders may
(or may not) need work, depending on whether they
rebuild using the test command (I doubt it).

Change-Id: I21f202a2f13e73df3f6bd54ae6a317c467b68151
Reviewed-on: https://go-review.googlesource.com/18084
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29 15:20:00 +00:00
Mikio Hara 6766a293ef os: add missing copyright notice
Change-Id: I496b701e2fcc944c764002643c7b0b2ce9e08806
Reviewed-on: https://go-review.googlesource.com/18182
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-12-29 09:02:28 +00:00
Austin Clements c7c7c7031d runtime: fix, simplify, and improve scan state in goroutine header
Currently goroutineheader goes through some convolutions to *almost*
print the scan state of a G. However, the code path that would print
the scan state of the G refers to gStatusStrings where it almost
certainly meant to refer to gScanStatusStrings (which is unused), so
it winds up printing the regular status string without the scan state
either way. Furthermore, if the G is in _Gwaiting, we override the
status string and lose where this would indicate the scan state if it
worked.

This commit fixes this so the runtime prints the scan state. However,
rather than using a parallel list of status strings, this simply adds
a conditional print if the scan bit is set. This lets us remove the
string list, prints the scan state even in _Gwaiting, and lets us
strip off the scan bit at the beginning of the function, which
simplifies the rest of it.

Change-Id: Ic0adbe5c05abf4adda93da59f93b578172b28e3d
Reviewed-on: https://go-review.googlesource.com/18092
Reviewed-by: Keith Randall <khr@golang.org>
2015-12-28 01:12:24 +00:00
Dan Peterson 0f3c229030 runtime: fix sigaltstack test Skipf format string
Change-Id: I9485ecbd9d546893e4f0db846b08d835fa7515d7
Reviewed-on: https://go-review.googlesource.com/18140
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-24 18:34:18 +00:00
Ian Lance Taylor f7e51c1320 runtime: adjust gsignal stack to current signal stack
If non-Go code calls sigaltstack before a signal is received, use
sigaltstack to determine the current signal stack and set the gsignal
stack to use it.  This makes the Go runtime more robust in the face of
non-Go code.  We still can't handle a disabled signal stack or a signal
triggered with SA_ONSTACK clear, but we now give clear errors for those
cases.

Fixes #7227.
Update #9896.

Change-Id: Icb1607e01fd6461019b6d77d940e59b3aed4d258
Reviewed-on: https://go-review.googlesource.com/18102
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2015-12-24 17:00:04 +00:00
Nigel Tao e4dcf5c8c2 image/color: have NYCbCrA.RGBA work in 16-bit color.
This makes NYCbCrA consistent with YCbCr.

Fixes #13706.

Change-Id: Ifced84372e4865925fa6efef9ca2f1de43da70e0
Reviewed-on: https://go-review.googlesource.com/18115
Reviewed-by: Rob Pike <r@golang.org>
2015-12-24 06:55:33 +00:00
Jonathan Boulle 5b5e19ea65 net/http: fix typo in docstring
s/activitiy/activity

Change-Id: Ib2bbc929b38b1993000da57daed2d795f4a93997
Reviewed-on: https://go-review.googlesource.com/18131
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-24 01:28:11 +00:00
Rob Pike 54641818c9 crypto/cipher: fix typo from last change
s/encrypt/decrypt/

The text is unsafe to cut and paste...

Change-Id: Iab19ddf8182d087e9a4b4d34a9eeabd1d2aa02d6
Reviewed-on: https://go-review.googlesource.com/18104
Reviewed-by: Rob Pike <r@golang.org>
2015-12-22 23:26:12 +00:00
Rob Pike 4e6750af81 crypto/cipher: improve documentation for AEAD
Give a link to the wikipedia page describing the mechanism and
explain better how to use the same buffer for input and output.

Change-Id: If6dfd6cf9c6dff0517cb715f60a11349dbdd91e0
Reviewed-on: https://go-review.googlesource.com/18103
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-22 21:45:53 +00:00
Ian Lance Taylor 94ff47939a misc/cgo/testcarchive: skip test4 on darwin/{arm,arm64}
Fixes #13701.

Change-Id: I9825864d23aeba1971cf5f581e1e59ac4c9b87fd
Reviewed-on: https://go-review.googlesource.com/18090
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-12-22 16:16:02 +00:00