]> Cypherpunks repositories - gostls13.git/log
gostls13.git
8 years agocmd/go: ensure streaming test's stdout, stderr are same as cmd/go's
Brad Fitzpatrick [Tue, 6 Dec 2016 18:22:42 +0000 (18:22 +0000)]
cmd/go: ensure streaming test's stdout, stderr are same as cmd/go's

Fixes #18153

Change-Id: Ie8a32dd6fe306f00e51cde77dd4ea353f7109940
Reviewed-on: https://go-review.googlesource.com/34010
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: mention more binary download architectures
Brad Fitzpatrick [Tue, 6 Dec 2016 22:15:12 +0000 (22:15 +0000)]
doc: mention more binary download architectures

Fixes #18207

Change-Id: Ibe85ab0acba7553b93603a31140b31bd9e4802cf
Reviewed-on: https://go-review.googlesource.com/34015
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: mention concurrent map write/iterate detector
Keith Randall [Thu, 1 Dec 2016 16:37:48 +0000 (08:37 -0800)]
doc: mention concurrent map write/iterate detector

Mention that the best-effort race detector on maps
was upgraded to detect write/iterate races.

Fixes #18137

Change-Id: Ib6e0adde47e965126771ea712386031a2a55eba3
Reviewed-on: https://go-review.googlesource.com/33768
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoreflect: add example for StructOf
Sebastien Binet [Tue, 6 Dec 2016 09:40:31 +0000 (10:40 +0100)]
reflect: add example for StructOf

This CL adds a simple example for StructOf.
The example shows how StructOf can be used in a JSON roundtrip.

Change-Id: I9ff1ea9cb8c0cf297c5fae74e68b89931076adfd
Reviewed-on: https://go-review.googlesource.com/33953
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
8 years agonet/http: update bundled http2
Brad Fitzpatrick [Tue, 6 Dec 2016 18:42:01 +0000 (18:42 +0000)]
net/http: update bundled http2

Updates bundled x/net/http2 to git rev 8dab9293 for:

    http2: make Transport retry on server's GOAWAY graceful shutdown
    https://golang.org/cl/33971

Fixes #18083

Change-Id: I676f5eb4b490a4d86356778bb17296c451f16d90
Reviewed-on: https://go-review.googlesource.com/34011
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
8 years agocmd/link: hash packages after loading all symbols
David Crawshaw [Tue, 6 Dec 2016 04:20:20 +0000 (23:20 -0500)]
cmd/link: hash packages after loading all symbols

Conditioning on the plugin.Open symbol existing before loading all
symbols means sometimes some packages don't have a hash value.

Fixes #17928

Change-Id: I2722449aa58eca08a25117d3ce976f11f805b5ac
Reviewed-on: https://go-review.googlesource.com/33925
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc/go1.8: remove mention of #16396
Shenghou Ma [Tue, 6 Dec 2016 04:47:54 +0000 (23:47 -0500)]
doc/go1.8: remove mention of #16396

Change-Id: I811e76c9f42505e974bea634d4ded2499e4893db
Reviewed-on: https://go-review.googlesource.com/33926
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/compile: fix static-initialization compilation failure
Matthew Dempsky [Mon, 5 Dec 2016 23:57:45 +0000 (15:57 -0800)]
cmd/compile: fix static-initialization compilation failure

Fixes #13263.

Change-Id: Ie1cafc62b6bfe6c5381c35d9a95563267b4cc9b0
Reviewed-on: https://go-review.googlesource.com/33970
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agodoc: document the mips port in install-source.html
Shenghou Ma [Fri, 2 Dec 2016 04:12:18 +0000 (23:12 -0500)]
doc: document the mips port in install-source.html

While we're at it, also mention OpenBSD/ARM support.

Change-Id: I4df4a158b67d11720146d05a235099d452295170
Reviewed-on: https://go-review.googlesource.com/33854
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agomisc/cgo/test: ignore "too many open files" in issue 18146 test
Ian Lance Taylor [Mon, 5 Dec 2016 22:10:46 +0000 (14:10 -0800)]
misc/cgo/test: ignore "too many open files" in issue 18146 test

Seen on the OpenBSD/AMD64 builder:
https://build.golang.org/log/fa34df1bcd3af12d4fc0fb0e60e3c6197a2a6f75

Update #18146.

Change-Id: I2646621488be84d50f47c312baa0817c72e3c058
Reviewed-on: https://go-review.googlesource.com/33907
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet/http: fix typo in Request.GetBody's doc string
Chris Broadfoot [Tue, 6 Dec 2016 01:28:51 +0000 (17:28 -0800)]
net/http: fix typo in Request.GetBody's doc string

Change-Id: I84043b6fe4b20a2514d47217e07e44f26bec52ab
Reviewed-on: https://go-review.googlesource.com/33973
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoruntime/cgo: retry pthread_create on EAGAIN for OpenBSD
Ian Lance Taylor [Mon, 5 Dec 2016 19:17:59 +0000 (11:17 -0800)]
runtime/cgo: retry pthread_create on EAGAIN for OpenBSD

For reasons that I do not know, OpenBSD does not call pthread_create
directly, but instead looks it up in libpthread.so. That means that we
can't use the code used on other systems to retry pthread_create on
EAGAIN, since that code simply calls pthread_create.

This patch copies that code to an OpenBSD-specific version.

Also, check for an EAGAIN failure in the test, as that seems to be the
underlying cause of the test failure on several systems including OpenBSD.

Fixes #18146.

Change-Id: I3bceaa1e03a7eaebc2da19c9cc146b25b59243ef
Reviewed-on: https://go-review.googlesource.com/33905
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agomisc/cgo/test: skip Test18146 on DragonFly
Ian Lance Taylor [Mon, 5 Dec 2016 19:23:38 +0000 (11:23 -0800)]
misc/cgo/test: skip Test18146 on DragonFly

Fails on builder for unknown reasons.

Fixes #18198.
Update #18146.

Change-Id: Iaa85826655eee57d86e0c73d06c930ef3f4647ec
Reviewed-on: https://go-review.googlesource.com/33906
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc/go1.8: document mips port requirements
Shenghou Ma [Fri, 2 Dec 2016 04:07:53 +0000 (23:07 -0500)]
doc/go1.8: document mips port requirements

Fixes #18140.

Change-Id: I527719576bc7198c79bb8bc51d258a71b2d5b296
Reviewed-on: https://go-review.googlesource.com/33853
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoruntime/cgo: retry pthread_create on EAGAIN
Ian Lance Taylor [Fri, 2 Dec 2016 23:32:55 +0000 (15:32 -0800)]
runtime/cgo: retry pthread_create on EAGAIN

Update #18146.

Change-Id: Ib447aabae9f203a8b61fb8c984b57d8e2bfe69c2
Reviewed-on: https://go-review.googlesource.com/33894
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoruntime: don't skip TestCgoCallbackGC on FreeBSD
Ian Lance Taylor [Mon, 5 Dec 2016 18:00:38 +0000 (10:00 -0800)]
runtime: don't skip TestCgoCallbackGC on FreeBSD

Seems to be fixed according to discussion on issue 16396.

Fixes #16396.

Change-Id: Ibac7037a24280204e48cb4d3000af524f65afd36
Reviewed-on: https://go-review.googlesource.com/33903
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoruntime: check that Version does not contain \r \n
Russ Cox [Mon, 5 Dec 2016 16:11:47 +0000 (11:11 -0500)]
runtime: check that Version does not contain \r \n

Change-Id: I8982cfa7337ec457b5235a207ebfda00ef6a2e5a
Reviewed-on: https://go-review.googlesource.com/33917
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/compile: find last StoreWB explicitly
Cherry Zhang [Sun, 4 Dec 2016 00:17:16 +0000 (19:17 -0500)]
cmd/compile: find last StoreWB explicitly

In writebarrier phase, a chain of StoreWBs is rewritten to branchy
code to invoke write barriers, and the last store in the chain is
spliced into a Phi op to join the memory of the two branches. We
must find the last store explicitly, since the values are not
scheduled and they may not come in dependency order.

Fixes #18169.

Change-Id: If547e3c562ef0669bc5622c1bb711904dc36314d
Reviewed-on: https://go-review.googlesource.com/33915
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
8 years agocmd/go: give useful error when msan isn't supported
Dhananjay Nakrani [Sat, 3 Dec 2016 05:17:29 +0000 (21:17 -0800)]
cmd/go: give useful error when msan isn't supported

Fixes #18180.

Change-Id: I7006fe6cf08139e5aaaf35412b962a4e82109f59
Reviewed-on: https://go-review.googlesource.com/33898
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agohtml/template: lock in application/json as valid JS test
Emmanuel Odeke [Sun, 4 Dec 2016 02:45:50 +0000 (18:45 -0800)]
html/template: lock in application/json as valid JS test

CL https://go-review.googlesource.com/33899 added
application/json as a mimeType for valid JS. Let's
lock that fix in with a test.

Updates #18159

Change-Id: Ic4dfd8929aebfc5410f796688f081ca06630f672
Reviewed-on: https://go-review.googlesource.com/33901
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Nodir Turakulov <nodir@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agohtml/template: escape JS in application/json script tag
Nodir Turakulov [Sat, 3 Dec 2016 19:37:05 +0000 (11:37 -0800)]
html/template: escape JS in application/json script tag

Since ffd1c781b77aab542713b66ef387fa9307e4060b HTML templates check
MIME type in the "type" attribute of "script" tag to decide if contents
should be escaped as JavaScript. The whitelist of MIME types did not
include application/json. Include it in this CL.

Fixes #18159

Change-Id: I17a8a38f2b7789b4b7e941d14279de222eaf2b6a
Reviewed-on: https://go-review.googlesource.com/33899
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/dist: remove special test timeout scale for Windows
Brad Fitzpatrick [Fri, 2 Dec 2016 23:30:09 +0000 (23:30 +0000)]
cmd/dist: remove special test timeout scale for Windows

In https://golang.org/cl/33804 I screwed up a GOOS == "windows"
check into a bogus comparison against GOARCH == "windows".

But turns out the builders are happy anyway, so remove the windows
special case.

Change-Id: I820b1d49d5b3e8cbffe4516fc39f514326dc39f8
Reviewed-on: https://go-review.googlesource.com/33893
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agoruntime: skip GDB tests on mips64
Brad Fitzpatrick [Fri, 2 Dec 2016 23:27:02 +0000 (23:27 +0000)]
runtime: skip GDB tests on mips64

Updates #18173

Change-Id: I4c667c89ba3bf16433a4cef7cb01054f1798667d
Reviewed-on: https://go-review.googlesource.com/33892
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/go: add missing newline at end of error message
Josh Bleecher Snyder [Sat, 3 Dec 2016 00:34:03 +0000 (16:34 -0800)]
cmd/go: add missing newline at end of error message

Change-Id: I9277e869e171d9e051ff9a70ac578b8127fa74f8
Reviewed-on: https://go-review.googlesource.com/33897
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agotest: add test case for which gccgo generated incorrect GC info
Ian Lance Taylor [Thu, 1 Dec 2016 17:15:39 +0000 (09:15 -0800)]
test: add test case for which gccgo generated incorrect GC info

Change-Id: I5e33db9e63f70706882b85ab124a48509797b05a
Reviewed-on: https://go-review.googlesource.com/33790
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: fix grammar in go1.8.html > crypto/tls
Filippo Valsorda [Fri, 2 Dec 2016 19:09:08 +0000 (19:09 +0000)]
doc: fix grammar in go1.8.html > crypto/tls

Change-Id: If8200e54b3650f789c5312f10cce32201a199b80
Reviewed-on: https://go-review.googlesource.com/33775
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/link: don't overalign ELF reloc sections
Ian Lance Taylor [Fri, 2 Dec 2016 06:48:52 +0000 (22:48 -0800)]
cmd/link: don't overalign ELF reloc sections

Internal linking on an ELF system creates two reloc sections, which
must be adjacent. The default is to base section alignment on the
section size, but doing that for ELF reloc sections can introduce a
gap. Set the reloc section alignment explicitly to avoid that.

Fixes #18044.

Change-Id: I8ccc131e60937d30c5f715a34c7803258833fc2f
Reviewed-on: https://go-review.googlesource.com/33872
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agodoc: correct the number of changes to the language in go1.8.html
Brad Fitzpatrick [Fri, 2 Dec 2016 06:49:17 +0000 (06:49 +0000)]
doc: correct the number of changes to the language in go1.8.html

And link it.

Change-Id: Ic0105468435299fb1638f86522f4f3ce417ec1c2
Reviewed-on: https://go-review.googlesource.com/33871
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/compile/internal/syntax: remove dead type declaration
Robert Griesemer [Fri, 2 Dec 2016 06:06:41 +0000 (22:06 -0800)]
cmd/compile/internal/syntax: remove dead type declaration

Change-Id: I8a3ce0fa513ff943009c5669531132cd23ecf155
Reviewed-on: https://go-review.googlesource.com/33870
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agovendor/golang_org/x/crypto/chacha20poly1305: revendor to pick up fix for #18154
Shenghou Ma [Fri, 2 Dec 2016 05:46:10 +0000 (00:46 -0500)]
vendor/golang_org/x/crypto/chacha20poly1305: revendor to pick up fix for #18154

Fixes #18154.

Change-Id: I1836b63a380b7fc2f9965e909859b1a89a3ae5d5
Reviewed-on: https://go-review.googlesource.com/33856
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: update suggested Go installation version
Kevin Burke [Fri, 2 Dec 2016 01:45:26 +0000 (17:45 -0800)]
doc: update suggested Go installation version

Previously the docs suggested downloading 1.7.2 (no good) or 1.7.3 (has
security flaw).

Change-Id: Ifabe85908df8d6591c0957ef4bb1b800fc145793
Reviewed-on: https://go-review.googlesource.com/33808
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: CL 32796 was reverted, so remove it from go1.8.html
Ian Lance Taylor [Fri, 2 Dec 2016 00:25:07 +0000 (16:25 -0800)]
doc: CL 32796 was reverted, so remove it from go1.8.html

Reversion CL was 33770.

Change-Id: I119f26796bb2b66d302e132dd118847ac3bd6633
Reviewed-on: https://go-review.googlesource.com/33807
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agonet/http: revert change making NewRequest set ContentLength -1
Brad Fitzpatrick [Thu, 1 Dec 2016 22:01:35 +0000 (22:01 +0000)]
net/http: revert change making NewRequest set ContentLength -1

The introduction of NoBody and related body-peeking bug fixes also
added a "cleanup" of sorts to make NewRequest set the returned
Requests's ContentLength to -1 when it didn't know it.

Using -1 to mean unknown is what the documentation says, but then
people apparently(?) depended on it being zero so they could do this:

    req, _ := http.NewRequest("POST", url, someNonNilReaderWithUnkownSize)
    req.Body = nil
    res, err := http.DefaultClient.Do(req)

... and expect it to work.

After https://golang.org/cl/31445 the contrived(?) code above stopped
working, since Body was nil and ContentLength was -1, which has been
disallowed since Go 1.0.

So this restores the old behavior of NewRequest, not setting it to -1.
That part of the fix isn't required as of https://golang.org/cl/31726
(which added NoBody)

I still don't know whether this bug is hypothetical or actually
affected people in practice.

Let's assume it's real for now.

Fixes #18117

Change-Id: I42400856ee92a1a4999b5b4668bef97d885fbb53
Reviewed-on: https://go-review.googlesource.com/33801
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/dist: adjust default timeout scale for mips
Brad Fitzpatrick [Thu, 1 Dec 2016 23:27:25 +0000 (23:27 +0000)]
cmd/dist: adjust default timeout scale for mips

Per recommendation from imgtec.com folk.

Change-Id: I9b6f30572f257acce59842ac55362f52fe36c5ab
Reviewed-on: https://go-review.googlesource.com/33804
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/go: check MustHaveExternalNetwork before `go get` tests
Ian Lance Taylor [Thu, 1 Dec 2016 22:27:06 +0000 (14:27 -0800)]
cmd/go: check MustHaveExternalNetwork before `go get` tests

Also change a couple of `go get` tests to use MustHaveExternalNetwork
rather than checking testing.Short.

Change-Id: I98ccc05b8b0354f1b7486e28dac5f8341c342a07
Reviewed-on: https://go-review.googlesource.com/33802
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/internal/obj: rename obj.go to line.go
Matthew Dempsky [Thu, 1 Dec 2016 22:59:21 +0000 (14:59 -0800)]
cmd/internal/obj: rename obj.go to line.go

This file is entirely about the implementation of LineHist, and I can
never remember which generic filename in cmd/internal/obj has it.
Rename to line.go to match the already existing line_test.go.

Change-Id: Id01f3339dc550c9759569d5610d808b17bca44d0
Reviewed-on: https://go-review.googlesource.com/33803
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodatabase/sql: ensure Commit and Rollback return ErrTxDone
Daniel Theophanes [Thu, 1 Dec 2016 19:07:11 +0000 (11:07 -0800)]
database/sql: ensure Commit and Rollback return ErrTxDone

Ensure documented behavior of returning ErrTxDone if the Tx has
already been committed or rolled back.

Fixes #18147

Change-Id: I07dc75bef4dbd4dd88dd252c96dc8ab99f28c00e
Reviewed-on: https://go-review.googlesource.com/33793
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agocmd/compile: correctly parse //line filename:line where filename contains ':'
Robert Griesemer [Thu, 1 Dec 2016 21:03:54 +0000 (13:03 -0800)]
cmd/compile: correctly parse //line filename:line where filename contains ':'

This was a regression from 1.7. See the issue for details.

Fixes #18149.

Change-Id: Ic8f5a35d14edf9254b1275400316cff7aff32a27
Reviewed-on: https://go-review.googlesource.com/33799
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agodoc: fix typo in go1.8.html
Chris Broadfoot [Thu, 1 Dec 2016 21:27:32 +0000 (13:27 -0800)]
doc: fix typo in go1.8.html

Change-Id: I853da2666ed2b5f8b80bd9438f8c352f233b9c89
Reviewed-on: https://go-review.googlesource.com/33800
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet/http: teach NewRequest that NoBody has ContentLength zero
Brad Fitzpatrick [Wed, 30 Nov 2016 18:45:56 +0000 (18:45 +0000)]
net/http: teach NewRequest that NoBody has ContentLength zero

NoBody is new in Go 1.8.

Found while investigating #18117

Change-Id: I6bda030f358e2270f090d108cb3a89c8a2665fcb
Reviewed-on: https://go-review.googlesource.com/33714
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: document go1.7.4 and go1.6.4
Chris Broadfoot [Thu, 1 Dec 2016 20:12:23 +0000 (12:12 -0800)]
doc: document go1.7.4 and go1.6.4

Change-Id: I0728afe6a1d1e0aee4701e51a5548fa9fd637b66
Reviewed-on: https://go-review.googlesource.com/33795
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: document go1.7.3 and add note to go1.7.2 that it should not be used
Chris Broadfoot [Wed, 19 Oct 2016 00:32:26 +0000 (17:32 -0700)]
doc: document go1.7.3 and add note to go1.7.2 that it should not be used

Change-Id: I3dd1513e927733ce5c63928da772cb81760ba869
Reviewed-on: https://go-review.googlesource.com/31442
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/33794

8 years agonet: fix writev tests on Android
Elias Naur [Thu, 1 Dec 2016 19:30:22 +0000 (20:30 +0100)]
net: fix writev tests on Android

Change-Id: Iacced25363f54ee2cc1e00a71605dba7fb447162
Reviewed-on: https://go-review.googlesource.com/33772
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/compile: generate frame pointers for otherwise frameless functions
Keith Randall [Thu, 1 Dec 2016 00:15:32 +0000 (16:15 -0800)]
cmd/compile: generate frame pointers for otherwise frameless functions

func f() {
    g()
}

We mistakenly don't add a frame pointer for f.  This means f
isn't seen when walking the frame pointer linked list.  That
matters for kernel-gathered profiles, and is an impediment for
issues like #16638.

To fix, allocate a stack frame even for otherwise frameless functions
like f.  It is a bit tricky because we need to avoid some runtime
internals that really, really don't want one.

No test at the moment, as only kernel CPU profiles would catch it.
Tests will come with the implementation of #16638.

Fixes #18103

Change-Id: I411206cc9de4c8fdd265bee2e4fa61d161ad1847
Reviewed-on: https://go-review.googlesource.com/33754
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
8 years agocrypto/x509: read Darwin trust settings for root CAs
Quentin Smith [Wed, 30 Nov 2016 20:16:37 +0000 (15:16 -0500)]
crypto/x509: read Darwin trust settings for root CAs

Darwin separately stores bits indicating whether a root certificate
should be trusted; this changes Go to read and use those when
initializing SystemCertPool.

Unfortunately, the trust API is very slow. To avoid a delay of up to
0.5s in initializing the system cert pool, we assume that
the trust settings found in kSecTrustSettingsDomainSystem will always
indicate trust. (That is, all root certs Apple distributes are trusted.)
This is not guaranteed by the API but is true in practice.

In the non-cgo codepath, we do not have that benefit, so we must check
the trust status of every certificate. This causes about 0.5s of delay
in initializing the SystemCertPool.

On OS X 10.11 and older, the "security" command requires a certificate
to be provided in a file and not on stdin, so the non-cgo codepath
creates temporary files for each certificate, further slowing initialization.

Updates #18141.

Change-Id: If681c514047afe5e1a68de6c9d40ceabbce54755
Reviewed-on: https://go-review.googlesource.com/33721
Run-TryBot: Quentin Smith <quentin@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agocmd/compile: do not inline functions marked cgo_unsafe_args
David Lazar [Wed, 30 Nov 2016 22:09:07 +0000 (17:09 -0500)]
cmd/compile: do not inline functions marked cgo_unsafe_args

Now the net tests pass with -gcflags '-l=4'.

Fixes #18125.

Change-Id: I4e3a46eb0cb3a93b203e74f5bc99c5822331f535
Reviewed-on: https://go-review.googlesource.com/33722
Reviewed-by: Keith Randall <khr@golang.org>
8 years agocmd/objdump: copy gosym.PCValue into internal package
Keith Randall [Thu, 1 Dec 2016 18:10:17 +0000 (10:10 -0800)]
cmd/objdump: copy gosym.PCValue into internal package

... so we don't have to export gosym.PCValue.

Change-Id: Ie8f196d5e5ab63e3e69d1d7b4bfbbf32b7b5e4f5
Reviewed-on: https://go-review.googlesource.com/33791
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/go: hide the "TERM" environment variable from "go bug"
Mohit Agarwal [Thu, 1 Dec 2016 17:50:03 +0000 (23:20 +0530)]
cmd/go: hide the "TERM" environment variable from "go bug"

Fixes #18128

Change-Id: I5530c9d774a1e398cd759a05bbf308e6e42f0007
Reviewed-on: https://go-review.googlesource.com/33810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agonet/http: clarify Request.Context's lifetime
Brad Fitzpatrick [Thu, 1 Dec 2016 16:50:00 +0000 (16:50 +0000)]
net/http: clarify Request.Context's lifetime

Reverts https://golang.org/cl/23672 and tweaks the text to clarify
HTTP/2 request cancelations also cancel the context (not just closing
the TCP conn).

Fixes #18143

Change-Id: I9f838e09b906d455c98f676e5bc5559f8f7ecb17
Reviewed-on: https://go-review.googlesource.com/33769
Reviewed-by: Chris Broadfoot <cbro@golang.org>
8 years agodatabase/sql: document expectations for named parameters
Daniel Theophanes [Wed, 23 Nov 2016 17:10:30 +0000 (09:10 -0800)]
database/sql: document expectations for named parameters

Require parameter names to not begin with a symbol.

Change-Id: I5dfe9d4e181f0daf71dad2f395aca41c68678cbe
Reviewed-on: https://go-review.googlesource.com/33493
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agoruntime: fix incorrect comment about bitvector layout
Austin Clements [Wed, 30 Nov 2016 20:48:33 +0000 (15:48 -0500)]
runtime: fix incorrect comment about bitvector layout

Commit 303b69fe packed bitvectors more tightly, but missed a comment
describing their old layout. Update that comment.

Change-Id: I095ccb01f245197054252545f37b40605a550dec
Reviewed-on: https://go-review.googlesource.com/33718
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
8 years agodoc: remove space in "Go 1. 8"
Brad Fitzpatrick [Thu, 1 Dec 2016 16:26:17 +0000 (16:26 +0000)]
doc: remove space in "Go 1. 8"

And reflow paragraph while I'm at it.

Change-Id: Ia13bb364783790fbd9f8b69ef268f8a4b71679cb
Reviewed-on: https://go-review.googlesource.com/33767
Reviewed-by: Chris Broadfoot <cbro@golang.org>
8 years agodoc: clarify zip behavior in go1.8.html
Brad Fitzpatrick [Thu, 1 Dec 2016 03:14:58 +0000 (03:14 +0000)]
doc: clarify zip behavior in go1.8.html

Updates #17929

Change-Id: I03b8847384c6cd8c43fe8bf2d75cd26db7063b8b
Reviewed-on: https://go-review.googlesource.com/33762
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
8 years agodoc: update go1.8 release notes to say NamedArg not NamedParam
Daniel Theophanes [Thu, 1 Dec 2016 15:10:21 +0000 (07:10 -0800)]
doc: update go1.8 release notes to say NamedArg not NamedParam

Fixes #18135

Change-Id: I54ef9d6fc804d0fb77b729a04367a138e40f9ddf
Reviewed-on: https://go-review.googlesource.com/33766
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoRevert "runtime: handle SIGPIPE in c-archive and c-shared programs"
Elias Naur [Thu, 1 Dec 2016 09:31:08 +0000 (09:31 +0000)]
Revert "runtime: handle SIGPIPE in c-archive and c-shared programs"

This reverts commit d24b57a6a1a3530e590b7c0a72dc78043e198630.

Reason for revert: Further complications arised (issue 18100). We'll try again in Go 1.9.

Change-Id: I5ca93d2643a4be877dd9c2d8df3359718440f02f
Reviewed-on: https://go-review.googlesource.com/33770
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>

8 years agodoc/go1.8.html: announce 1.8 will be the last to support linux/arm prior to ARMv6K
Shenghou Ma [Wed, 23 Nov 2016 02:15:52 +0000 (21:15 -0500)]
doc/go1.8.html: announce 1.8 will be the last to support linux/arm prior to ARMv6K

Updates #17082.

Change-Id: I0bf330d1a1ebb7e31e42d03287160b474522c332
Reviewed-on: https://go-review.googlesource.com/33455
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/dist: add -check-armv6k command to check for ARMv6K
Shenghou Ma [Wed, 30 Nov 2016 04:29:49 +0000 (23:29 -0500)]
cmd/dist: add -check-armv6k command to check for ARMv6K

so that our release note can reference a simple command to check if
the processor implements ARMv6K or not.

Updates #17082.

Change-Id: I9ca52051e5517394a7cd6b778fb822c3ee435f84
Reviewed-on: https://go-review.googlesource.com/33686
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agosort: add Slice example
Brad Fitzpatrick [Thu, 1 Dec 2016 04:29:12 +0000 (04:29 +0000)]
sort: add Slice example

Change-Id: I34ba4eaf1d232b639998ad3bbb0d075dd097722b
Reviewed-on: https://go-review.googlesource.com/33763
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dominik Honnef <dominik@honnef.co>
8 years agoapi: promote next.txt to go1.8.txt, update go tool go1.8beta1
Chris Broadfoot [Thu, 1 Dec 2016 02:43:28 +0000 (18:43 -0800)]
api: promote next.txt to go1.8.txt, update go tool

Change-Id: I37f2893ce14009efe095aac3bc811d650c66bf2a
Reviewed-on: https://go-review.googlesource.com/33761
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoapi: update next.txt (remove database/sql.NamedParam)
Chris Broadfoot [Thu, 1 Dec 2016 02:37:18 +0000 (18:37 -0800)]
api: update next.txt (remove database/sql.NamedParam)

Updates #18099

Change-Id: I16b4b2dd881d63cbb406d14a4fd960f0a777a452
Reviewed-on: https://go-review.googlesource.com/33760
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/cgo: fix cgo checking when fetching errno value
Ian Lance Taylor [Wed, 30 Nov 2016 23:46:37 +0000 (15:46 -0800)]
cmd/cgo: fix cgo checking when fetching errno value

Fixes #18126.

Change-Id: I7ae090945ef203673b06eb94817cc5c894b5eadc
Reviewed-on: https://go-review.googlesource.com/33752
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: go1.8.html review feedback
Brad Fitzpatrick [Thu, 1 Dec 2016 01:59:07 +0000 (01:59 +0000)]
doc: go1.8.html review feedback

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: Ic6d449e7822daa70f3fe17e942e9d29233547019
Reviewed-on: https://go-review.googlesource.com/33759
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoencoding/binary: document the new bool support
Brad Fitzpatrick [Thu, 1 Dec 2016 00:48:51 +0000 (00:48 +0000)]
encoding/binary: document the new bool support

Updates #16856

Change-Id: I57af6b0c0d5ecdaf19cf6f969b05ec9ec03058f1
Reviewed-on: https://go-review.googlesource.com/33756
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/go: document GOPATH default exception
Russ Cox [Wed, 30 Nov 2016 22:16:32 +0000 (17:16 -0500)]
cmd/go: document GOPATH default exception

Doesn't get defaulted if $HOME/go is a GOROOT.

Change-Id: I6ac8211a74029e4ad70a50f6e7884a039a27ab05
Reviewed-on: https://go-review.googlesource.com/33720
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc, cmd/go: adjust documentation for default GOPATH
Russ Cox [Wed, 30 Nov 2016 19:56:58 +0000 (14:56 -0500)]
doc, cmd/go: adjust documentation for default GOPATH

Replaces CL 33356.

Fixes #17262.

Change-Id: Idfb2343e90771775e51a66c63760f458737a288c
Reviewed-on: https://go-review.googlesource.com/33730
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/compile: generate code that type checks when inlining variadic functions
David Lazar [Mon, 28 Nov 2016 22:39:31 +0000 (17:39 -0500)]
cmd/compile: generate code that type checks when inlining variadic functions

This fixes a bug in -l=3 or higher.

To inline a variadic function, the compiler generates code that constructs
a slice of arguments for the variadic parameter. Consider the function

  func Foo(xs ...string)

and the call Foo("hello", "world"). To inline the call to Foo, the
compiler used to generate

  xs := [2]string{"hello", "world"}[:]

which doesn't type check:

  invalid operation [2]string literal[:] (slice of unaddressable value).

Now, the compiler generates

  xs := []string{"hello", "world"}

which does type check.

Fixes #18116.

Change-Id: I0ee531ef2e6cc276db6fb12602b25a46d6d5db21
Reviewed-on: https://go-review.googlesource.com/33671
Reviewed-by: Keith Randall <khr@golang.org>
8 years agodoc: document default GOPATH in go1.8.html
Brad Fitzpatrick [Wed, 30 Nov 2016 19:15:01 +0000 (19:15 +0000)]
doc: document default GOPATH in go1.8.html

And fix a bad link.

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: Ib16cf55cdc4a5340f2f4f96ad5934a9fe7d49d75
Reviewed-on: https://go-review.googlesource.com/33716
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodatabase/sql: deflake query cancel tests
Daniel Theophanes [Wed, 30 Nov 2016 17:30:31 +0000 (09:30 -0800)]
database/sql: deflake query cancel tests

Rather then using a sleep in the fake DB, go to a channel
select and wait for the context to be done.

Fixes #18115

Change-Id: I6bc3a29db58c568d0a7ea06c2a354c18c9e798b2
Reviewed-on: https://go-review.googlesource.com/33712
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoruntime: fix undead arguments in cgocall
Austin Clements [Wed, 30 Nov 2016 15:50:40 +0000 (10:50 -0500)]
runtime: fix undead arguments in cgocall

From the garbage collector's perspective, time can move backwards in
cgocall. However, in the midst of this time warp, the pointer
arguments to cgocall can go from dead back to live. If a stack growth
happens while they're dead and then a GC happens when they become live
again, GC can crash with a bad heap pointer.

Specifically, the sequence that leads to a panic is:

1. cgocall calls entersyscall, which saves the PC and SP of its call
site in cgocall. Call this PC/SP "X". At "X" both pointer arguments
are live.

2. cgocall calls asmcgocall. Call the PC/SP of this call "Y". At "Y"
neither pointer argument is live.

3. asmcgocall calls the C code, which eventually calls back into the
Go code.

4. cgocallbackg remembers the saved PC/SP "X" in some local variables,
calls exitsyscall, and then calls cgocallbackg1.

5. The Go code causes a stack growth. This stack unwind sees PC/SP "Y"
in the cgocall frame. Since the arguments are dead at "Y", they are
not adjusted.

6. The Go code returns to cgocallbackg1, which calls reentersyscall
with the recorded saved PC/SP "X", so "X" gets stashed back into
gp.syscallpc/sp.

7. GC scans the stack. It sees there's a saved syscall PC/SP, so it
starts the traceback at PC/SP "X". At "X" the arguments are considered
live, so it scans them, but since they weren't adjusted, the pointers
are bad, so it panics.

This issue started as of commit ca4089ad, when the compiler stopped
marking arguments as live for the whole function.

Since this is a variable liveness issue, fix it by adding KeepAlive
calls that keep the arguments live across this whole time warp.

The existing issue7978 test has all of the infrastructure for testing
this except that it's currently up to chance whether a stack growth
happens in the callback (it currently only happens on the
linux-amd64-noopt builder, for example). Update this test to force a
stack growth, which causes it to fail reliably without this fix.

Fixes #17785.

Change-Id: If706963819ee7814e6705693247bcb97a6f7adb8
Reviewed-on: https://go-review.googlesource.com/33710
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
8 years agoruntime: use standard comment style in cgocall
Austin Clements [Wed, 30 Nov 2016 15:43:14 +0000 (10:43 -0500)]
runtime: use standard comment style in cgocall

Change-Id: I9f2c2da4aa512729ae40562b06601da95ba50d6f
Reviewed-on: https://go-review.googlesource.com/33689
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
8 years agodatabase/sql: rename NamedParam to NamedArg and Param to Named
Daniel Theophanes [Tue, 29 Nov 2016 17:57:17 +0000 (09:57 -0800)]
database/sql: rename NamedParam to NamedArg and Param to Named

Be consistent with the argument names already provided. Also
parameter is the variable, argument is the value.

Fixes #18099

Change-Id: Idb3f4e9ffc214036c721ddb4f614ec6c95bb7778
Reviewed-on: https://go-review.googlesource.com/33660
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agonet/http: document how headers are forwarded by Client
Joe Tsai [Tue, 29 Nov 2016 22:42:22 +0000 (14:42 -0800)]
net/http: document how headers are forwarded by Client

Fixes #18096

Change-Id: I22e1abb75dc19c4d1985b6857c79a81b9db5a76c
Reviewed-on: https://go-review.googlesource.com/33670
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: update go1.8.html to remove mention of logging of bad requests
Brad Fitzpatrick [Wed, 30 Nov 2016 05:20:25 +0000 (05:20 +0000)]
doc: update go1.8.html to remove mention of logging of bad requests

TBR=See https://golang.org/cl/33244

Updates #18095

Change-Id: I80f3a0462e6cc431b03927fa919cda4f6eee8d97
Reviewed-on: https://go-review.googlesource.com/33687
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: remove two go1.8.txt items
Brad Fitzpatrick [Wed, 30 Nov 2016 04:15:17 +0000 (04:15 +0000)]
doc: remove two go1.8.txt items

Change-Id: I9035d1c9e81c4f772512958fed92d14335b8a9de
Reviewed-on: https://go-review.googlesource.com/33685
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: more go1.8.html
Brad Fitzpatrick [Wed, 30 Nov 2016 04:12:33 +0000 (04:12 +0000)]
doc: more go1.8.html

Mutex profiling, syscall, fmt, go/types, html/template.

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I1ba0649171d6f6a69646a90eb65db6674cb903af
Reviewed-on: https://go-review.googlesource.com/33684
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: remove some TODOs from go1.8.html
Brad Fitzpatrick [Wed, 30 Nov 2016 03:24:40 +0000 (03:24 +0000)]
doc: remove some TODOs from go1.8.html

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I5d92bd62b6560d245f77fa042c7e35d9eddc4994
Reviewed-on: https://go-review.googlesource.com/33683
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet/http: fix test TestServeMuxHandlerRedirects
Shenghou Ma [Tue, 29 Nov 2016 01:31:18 +0000 (20:31 -0500)]
net/http: fix test TestServeMuxHandlerRedirects

The code was intended to test that mux handler should redirect at
most once, but the added loop condition defeated that. Remove the
loop condition and document the intention better.

Fixes #18068.

Change-Id: I2a4ea041eae27168b45a09aa46e740ac03921594
Reviewed-on: https://go-review.googlesource.com/33654
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agodoc: add tool sections to go1.8.html
Brad Fitzpatrick [Wed, 30 Nov 2016 02:04:09 +0000 (02:04 +0000)]
doc: add tool sections to go1.8.html

Some still in TODO form.

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I63547bed3c6ce34b706821a3c150ae03d7d82cf8
Reviewed-on: https://go-review.googlesource.com/33682
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: add release notes for os and os/signal packages
Ian Lance Taylor [Wed, 30 Nov 2016 01:58:46 +0000 (17:58 -0800)]
doc: add release notes for os and os/signal packages

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I2e5b24fb0b110d833a8b73bccfbf399cb6e37ea2
Reviewed-on: https://go-review.googlesource.com/33681
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: more go1.8.html additions
Brad Fitzpatrick [Wed, 30 Nov 2016 01:44:15 +0000 (01:44 +0000)]
doc: more go1.8.html additions

And start deleting from go1.8.txt.

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I71011d97b23a7ba94cd51e16ae61fda18e8b96eb
Reviewed-on: https://go-review.googlesource.com/33680
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: remove remaining cmd/go entries from go1.8.txt
Ian Lance Taylor [Wed, 30 Nov 2016 01:04:31 +0000 (17:04 -0800)]
doc: remove remaining cmd/go entries from go1.8.txt

None of them need to be called out in the release notes.

Change-Id: I143a1879b25063574e4107c1e89264434d45d1d5
Reviewed-on: https://go-review.googlesource.com/33676
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agonet/http: remove logging on bad client requests
Kenny Grant [Tue, 29 Nov 2016 20:40:40 +0000 (20:40 +0000)]
net/http: remove logging on bad client requests

As discussed in #18095 the server should not log for bad user input.

Change-Id: I628a796926eff3a971e5b04abec17ea377c3f9b7
Reviewed-on: https://go-review.googlesource.com/33617
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/compile/internal/gc: document variables and functions
Kevin Burke [Sat, 12 Nov 2016 00:56:07 +0000 (16:56 -0800)]
cmd/compile/internal/gc: document variables and functions

Change-Id: I01b2278eb50585331b8ff7ff5e3c1f9c5ba52b63
Reviewed-on: https://go-review.googlesource.com/33156
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
8 years agodoc: note net/UnixListener.SetUnlinkOnClose in go1.8.html
Dan Peterson [Tue, 29 Nov 2016 23:46:34 +0000 (16:46 -0700)]
doc: note net/UnixListener.SetUnlinkOnClose in go1.8.html

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I201ffe489842ff17277424be4a012558d161f0a7
Reviewed-on: https://go-review.googlesource.com/33672
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agogo/ast: fix doc string for ast.GenDecl
Robert Griesemer [Tue, 29 Nov 2016 22:39:06 +0000 (14:39 -0800)]
go/ast: fix doc string for ast.GenDecl

Fixes #18109.

Change-Id: I5e3a44422794b7bae7741523fb7cacb6ba147af7
Reviewed-on: https://go-review.googlesource.com/33669
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet: expand nss myhostname fallback detection
Dan Peterson [Wed, 23 Nov 2016 18:35:17 +0000 (11:35 -0700)]
net: expand nss myhostname fallback detection

Expand myhostname fallback detection to properly detect the local
hostname in addition to other supported special names and suffixes.

Fixes #17967

Change-Id: I1fe141fd9838b25886c08b6f2fd325e58be60457
Reviewed-on: https://go-review.googlesource.com/33550
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agodoc: add note about gccgo go go1.8.html
Ian Lance Taylor [Tue, 29 Nov 2016 22:20:58 +0000 (14:20 -0800)]
doc: add note about gccgo go go1.8.html

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I28559724322007d4259810c209a92ec1cc10f338
Reviewed-on: https://go-review.googlesource.com/33668
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: add notes about cgo to go1.8.html
Ian Lance Taylor [Tue, 29 Nov 2016 22:17:35 +0000 (14:17 -0800)]
doc: add notes about cgo to go1.8.html

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I0215a7873977be81f2f84374f0b628abaf0e57c1
Reviewed-on: https://go-review.googlesource.com/33667
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocrypto/tls: update CBC Lucky13 warning a bit
Brad Fitzpatrick [Tue, 29 Nov 2016 20:41:29 +0000 (20:41 +0000)]
crypto/tls: update CBC Lucky13 warning a bit

Some countermeasures were implemented in https://golang.org/cl/18130

Updates #13385

Change-Id: I723e1e3be0fa6d13767b65b145d90c89e92b2774
Reviewed-on: https://go-review.googlesource.com/33665
Reviewed-by: Adam Langley <agl@golang.org>
8 years agodoc: more additions to go1.8.html
Brad Fitzpatrick [Tue, 29 Nov 2016 20:39:47 +0000 (20:39 +0000)]
doc: more additions to go1.8.html

Adds crypto/tls, crypto/x509, math/big, mime.

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I3fa3739e56f8c005e2a43c19f525cc5e2d981935
Reviewed-on: https://go-review.googlesource.com/33666
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: more go1.8.html tweaks and new context additions section
Brad Fitzpatrick [Tue, 29 Nov 2016 19:36:44 +0000 (19:36 +0000)]
doc: more go1.8.html tweaks and new context additions section

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: Id5d5472cf1e41472d8d0f82ee133c7387257ba2b
Reviewed-on: https://go-review.googlesource.com/33664
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/compile/internal/syntax: remove unused node field
Robert Griesemer [Tue, 29 Nov 2016 18:18:06 +0000 (10:18 -0800)]
cmd/compile/internal/syntax: remove unused node field

The doc field is not yet used - remove it for now (we may end up
with a different solution for 1.9). This reduces memory consumption
for parsing all of std lib by about 40MB and makes parsing slightly
faster.

Change-Id: Iafb00b9c7f1be9c66fdfb29096d3da5049b2fcf5
Reviewed-on: https://go-review.googlesource.com/33661
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
8 years agodatabase/sql: do not bypass the driver locks with Context methods
Daniel Theophanes [Fri, 28 Oct 2016 17:10:46 +0000 (10:10 -0700)]
database/sql: do not bypass the driver locks with Context methods

When context methods were initially added it was attempted to unify
behavior between drivers without Context methods and those with
Context methods to always return right away when the Context expired.
However in doing so the driver call could be executed outside of the
scope of the driver connection lock and thus bypassing thread safety.

The new behavior waits until the driver operation is complete. It then
checks to see if the context has expired and if so returns that error.

Change-Id: I4a5c7c3263420c57778f36a5ed6fa0ef8cb32b20
Reviewed-on: https://go-review.googlesource.com/32422
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/go: report position info in package errors
Dhananjay Nakrani [Sat, 26 Nov 2016 19:21:01 +0000 (11:21 -0800)]
cmd/go: report position info in package errors

Also refactor common position filling code into a function.

Fixes #18011

Change-Id: I76528626da67a7309193fa92af1e361c8e2fcf84
Reviewed-on: https://go-review.googlesource.com/33631
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agointernal/pprof/profile: parse mutex profile including comments
Hana Kim [Tue, 22 Nov 2016 21:09:28 +0000 (16:09 -0500)]
internal/pprof/profile: parse mutex profile including comments

Skip lines if they are empty or starting with "#" which are valid
legacy pprof output format.

Fixes #18025

Change-Id: I7aee439171496932637b8ae3188700911f569b16
Reviewed-on: https://go-review.googlesource.com/33454
Reviewed-by: Peter Weinberger <pjw@google.com>
8 years agonet/http/httptest: fix typo in doc comment
Michal Bohuslávek [Tue, 29 Nov 2016 09:58:35 +0000 (09:58 +0000)]
net/http/httptest: fix typo in doc comment

Change-Id: I89f276b32015882437e128814573343a4ca53569
Reviewed-on: https://go-review.googlesource.com/33615
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/compile: don't panic on syntax error in select statement
Robert Griesemer [Tue, 29 Nov 2016 06:34:50 +0000 (22:34 -0800)]
cmd/compile: don't panic on syntax error in select statement

Fixes #18092.

Change-Id: I54e2da2e0f168c068f5e4a1b22ba508d78259168
Reviewed-on: https://go-review.googlesource.com/33658
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
8 years agoruntime: fall back to /proc/self/auxv in Android libs
Austin Clements [Mon, 28 Nov 2016 23:03:16 +0000 (18:03 -0500)]
runtime: fall back to /proc/self/auxv in Android libs

Android's libc doesn't provide access to auxv, so currently the Go
runtime synthesizes a fake, minimal auxv when loaded as a library on
Android. This used to be sufficient, but now we depend on auxv to
retrieve the system physical page size and panic if we can't retrieve
it.

Fix this by falling back to reading auxv from /proc/self/auxv if the
loader-provided auxv is empty and removing the synthetic auxv vectors.

Fixes #18041.

Change-Id: Ia2ec2c764a6609331494a5d359032c56cbb83482
Reviewed-on: https://go-review.googlesource.com/33652
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
8 years agoruntime: extract Linux auxv handling
Austin Clements [Mon, 28 Nov 2016 19:54:38 +0000 (14:54 -0500)]
runtime: extract Linux auxv handling

This refactoring is in preparation for handling auxv differently in
Android shared libraries.

Updates #18041.

Change-Id: If0458a309f9c804e7abd0a58b5a224d89f8da257
Reviewed-on: https://go-review.googlesource.com/33651
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
8 years agodoc: more go1.8.html updates
Brad Fitzpatrick [Tue, 29 Nov 2016 05:57:18 +0000 (05:57 +0000)]
doc: more go1.8.html updates

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: I648df63aeb67aa2229c7b4fc23676a78b31140a0
Reviewed-on: https://go-review.googlesource.com/33657
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>