aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-17api: create go1.6.txtgo1.6beta1Brad Fitzpatrick
Change-Id: If2b30ab412d6799c8be01eb007462d6b58660ece Reviewed-on: https://go-review.googlesource.com/18014 Reviewed-by: Chris Broadfoot <cbro@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-17src: remove reference to since-deleted dist -s flagBrad Fitzpatrick
(Found while debugging release problems with go1.6beta1) Updates #12002 Change-Id: Iec197a754205e7fd28be154f27f17f3315886364 Reviewed-on: https://go-review.googlesource.com/18011 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-17doc: change go1.6 http headingBrad Fitzpatrick
Change-Id: Iae05082530891175e9c86da244e610bc92759561 Reviewed-on: https://go-review.googlesource.com/17918 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-17doc: Americanise spelling of wilfulBrad Fitzpatrick
Fixes #13660 Change-Id: I05bcb4efcb865192a1ef6756e9dccef83505934c Reviewed-on: https://go-review.googlesource.com/17990 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-17net/http: document ResponseWriter and Handler more; add testBrad Fitzpatrick
Update docs on ResponseWriter and Handler around concurrency. Also add a test. The Handler docs were old and used "object" a lot. It was also too ServeMux-centric. Fixes #13050 Updates #13659 (new issue found in http2 while writing the test) Change-Id: I25f53d5fa54f1c9d579d3d0f191bf3d94b1a251b Reviewed-on: https://go-review.googlesource.com/17982 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/link: reject non-package main toplevel.a file, remove dead codeRuss Cox
The test for non-package main top-level inputs is done while parsing the export data. Issue #13468 happened because we were not parsing the export data when using compiler-generated archives (that is, when using go tool compile -pack). Fix this by parsing the export data even for archives. However, that turns up a different problem: the export data check reports (one assumes spurious) skew errors now, because it has not been run since Go 1.2. (Go 1.3 was the first release to use go tool compile -pack.) Since the code hasn't run since Go 1.2, it can't be that important. Since it doesn't work today, just delete it. Figuring out how to make this code work with Robert's export format was one of the largest remaining TODOs for that format. Now we don't have to. Fixes #13468 and makes the world a better place. Change-Id: I40a4b284cf140d49d48b714bd80762d6889acdb9 Reviewed-on: https://go-review.googlesource.com/17976 Reviewed-by: Robert Griesemer <gri@golang.org>
2015-12-17cmd/go: for go get -insecure, do not fall back to HTTP for non-200 responsesRuss Cox
Since we allow non-200 responses from HTTPS in normal operation, it seems odd to reject them in -insecure operation. Fixes #13037 (again). Change-Id: Ie232f7544ab192addfad407525888db6b967befe Reviewed-on: https://go-review.googlesource.com/17945 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: fix processing of HTTPS 404 without -insecureRuss Cox
The change here is to move the closeBody call into the if block. The logging adjustments are just arranging to tell the truth: in particular if we're not in insecure mode and we get a non-200 error then we do not actually ignore the response (except as caused by closing the body incorrectly). As the comment below the change indicates, it is intentional that we process non-200 pages. The code does process them, because the if err != nil || status != 200 block does not return. But that block does close the body, which depending on timing can apparently poison the later read from the body. See #13037's initial report: $ go get -v bosun.org/cmd/bosun/cache Fetching https://bosun.org/cmd/bosun/cache?go-get=1 ignoring https fetch with status code 404 Parsing meta tags from https://bosun.org/cmd/bosun/cache?go-get=1 (status code 404) import "bosun.org/cmd/bosun/cache": parsing bosun.org/cmd/bosun/cache: http: read on closed response body package bosun.org/cmd/bosun/cache: unrecognized import path "bosun.org/cmd/bosun/cache" The log print about ignoring the https fetch is not strictly true, since the next thing that happened was parsing the body of that fetch. But the read on the closed response body failed during parsing. Moving the closeBody to happen only when we're about to discard the result and start over (that is, only in -insecure mode) fixes the parse. At least it should fix the parse. I can't seem to break the parse anymore, because of #13648 (close not barring future reads anymore), but this way is clearly better than the old way. If nothing else the old code closed the body twice when err != nil and -insecure was not given. Fixes #13037. Change-Id: Idf57eceb6d5518341a2f7f75eb8f8ab27ed4e0b4 Reviewed-on: https://go-review.googlesource.com/17944 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17Revert "cmd/go: allow omitted user name in git ssh repo syntax"Russ Cox
This caused #13657. Reverting fixes #13657. I was trying to be helpful by fixing #12313, but I don't need the fix myself. Will leave for someone with more motivation. This reverts commit 3e9f0636709de7cd86a08785f2e64487580bf5ea. Change-Id: Ifc78a6196f23e0f58e3b9ad7340e207a2d5de0a6 Reviewed-on: https://go-review.googlesource.com/17977 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17net/http: don't accept invalid bytes in server request headersBrad Fitzpatrick
Fixes #11207 Change-Id: I7f00b638e749fbc7907dc1597347ea426367d13e Reviewed-on: https://go-review.googlesource.com/17980 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17net/http: be more consistent about Request.Method "" vs "GET"Brad Fitzpatrick
Patch from Russ. No bug identified, but I didn't search exhaustively. The new code is easier to read. Fixes #13621 Change-Id: Ifda936e4101116fa254ead950b5fe06adb14e977 Reviewed-on: https://go-review.googlesource.com/17981 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17cmd/go: fix git submodule fetchRuss Cox
Thanks to @toxeus on GitHub for the test case. Fixes #12612. Change-Id: I0c32fbe5044f3552053460a5347c062568093dff Reviewed-on: https://go-review.googlesource.com/17974 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17net/http: update bundled http2, add tests reading response Body after CloseBrad Fitzpatrick
Updates to golang.org/x/net/http2 git rev 28273ec9 for https://golang.org/cl/17937 Fixes #13648 Change-Id: I27c77524b2e4a172c5f8be08f6fbb0f2e2e4b200 Reviewed-on: https://go-review.googlesource.com/17938 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: runtime and runtime/internal packages depend on runtime/internal/sysIan Lance Taylor
Fixes #13655. Change-Id: I764019aecdd59743baa436b7339499e6c2126268 Reviewed-on: https://go-review.googlesource.com/17916 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17cmd/go: respect umask when creating executablesRuss Cox
Also update many call sites where I forgot that the permission argument is going to be masked by umask. Fixes #12692. Change-Id: I52b315b06236122ca020950447863fa396b68abd Reviewed-on: https://go-review.googlesource.com/17950 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17net: fix the build even harderBrad Fitzpatrick
Should fix nacl. Follow-up to https://golang.org/cl/17936 (fix race) and https://golang.org/cl/17914 (fix build) for https://golang.org/cl/16953 (broke the build) Third time's a charm. Change-Id: I23930d5cff4235209546952ce2231f165ab5bf8a Reviewed-on: https://go-review.googlesource.com/17939 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17runtime: disable gdb test when a GOROOT_FINAL move is pendingRuss Cox
Fixes #13577. Change-Id: I0bb8157d6210b0c7c09380c2163b7d7349495732 Reviewed-on: https://go-review.googlesource.com/17970 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17net/http: updated bundled http2 to finish trailer supportBrad Fitzpatrick
This updates the bundled copy of x/net/http2 to git rev d2ecd08 for https://golang.org/cl/17912 (http2: send client trailers) and enables the final Trailer test for http2. Fixes #13557 Change-Id: Iaa15552b82bf7a2cb01b7787a2e1ec5ee680a9d3 Reviewed-on: https://go-review.googlesource.com/17935 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17net: include both ipv4 and ipv6 netsh output in TestInterfacesWithNetshAlex Brainman
Also include test for interface state (up or down). Updates #13606 Change-Id: I03538d65525ddd9c2d0254761861c2df7fc5bd5a Reviewed-on: https://go-review.googlesource.com/17850 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Russ Cox <rsc@golang.org>
2015-12-17net: fix race in testBrad Fitzpatrick
Fixes race builders, broken in https://golang.org/cl/16953 Change-Id: Id61171672b69d0ca412de4b44bf2c598fe557906 Reviewed-on: https://go-review.googlesource.com/17936 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17cmd/go: allow ~ as first char of path element in general git import pathsRuss Cox
This makes go get gitserver/~user/repo.git/foo work. Fixes #9193. Change-Id: I8c9d4096903288f7f0e82d6ed1aa78bf038fb81a Reviewed-on: https://go-review.googlesource.com/17952 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: don't be clever about mtime precision in testRuss Cox
This doesn't happen enough in the tests to be worth debugging. Empirically, I expect this to add 5 seconds to the overall 'go test -short cmd/go' on systems with precise file systems, and nothing on systems without them (like my Mac). Fixes #12205. Change-Id: I0a17cb37bdedcfc0f921c5ee658737f1698c153b Reviewed-on: https://go-review.googlesource.com/17953 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17cmd/go: document that package documentation is ignoredRuss Cox
Fixes #11801. Change-Id: I2caeac7fdddc7f29015d6db8d4b3e296c8b9c423 Reviewed-on: https://go-review.googlesource.com/17954 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17net/http: document a few ServeMux behaviorsRuss Cox
Fixes #13639. Fixes #11757. Change-Id: Iecf9ebcd652c23c96477305a41082e5b63b41d83 Reviewed-on: https://go-review.googlesource.com/17955 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: allow omitted user name in git ssh repo syntaxRuss Cox
No test because the code has no test. Fixes #12313. Change-Id: I2cfd0a0422c0cd76f0371c2d3bbbdf5bb3b3f1eb Reviewed-on: https://go-review.googlesource.com/17951 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: document that tests run in the source directoryRuss Cox
Fixes #13538. Change-Id: I621bbe2befe838d16d3664d7a5e30d5d7cceae33 Reviewed-on: https://go-review.googlesource.com/17949 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: document where get writes, and not vendor directoriesRuss Cox
Fixes #12260. Change-Id: I95c27aad6de8064b9a205d4ee507bce75926f16d Reviewed-on: https://go-review.googlesource.com/17948 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/go: document that go generate accepts all build flagsRuss Cox
Fixes #12544. Change-Id: I5e2fd1fbb21816e9f6fb022e2664484a71093b04 Reviewed-on: https://go-review.googlesource.com/17947 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17os/signal: document signal handlingIan Lance Taylor
This is an attempt to document the current state of signal handling. It's not intended to describe the best way to handle signals. Future changes to signal handling should update these docs as appropriate. update #9896. Change-Id: I3c50af5cc641357b57dfe90ae1c7883a7e1ec059 Reviewed-on: https://go-review.googlesource.com/17877 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17cmd/go: document that -p applies to test binary executionRuss Cox
Fixes #11521. Change-Id: I73615b881df4a0d5e2f5bc5059359d150ca8c105 Reviewed-on: https://go-review.googlesource.com/17946 Reviewed-by: Joe Shaw <joe@joeshaw.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/pprof: fix scaling of "gigabyte" unitBrad Fitzpatrick
Fixes #13654 Change-Id: Id2ce32c52efcfdbd66630725d62d2ca6bf0916d5 Reviewed-on: https://go-review.googlesource.com/17934 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17os,internal/syscall/windows: use ReadFile/MultiByteToWideChar to read from ↵mattn
console Fixes #6303 Change-Id: Ib2cd15ac6106ef8e6b975943db8efc8d8ab21052 Reviewed-on: https://go-review.googlesource.com/4310 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17net: fix buildBrad Fitzpatrick
https://golang.org/cl/16953 broke the world. Change-Id: I7cbd4105338ff896bd0c8f69a0b126b6272be2e5 Reviewed-on: https://go-review.googlesource.com/17914 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17net/http: document that ListenAndServe is a bit more than Listen+ServeBrad Fitzpatrick
Document that ListenAndServe and ListenAndServeTLS also set TCP keep-alives. Fixes #12748 Change-Id: Iba2e8a58dd657eba326db49a6c872e2d972883a4 Reviewed-on: https://go-review.googlesource.com/17681 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17archive/tar: document how Reader.Read handles header-only filesJoe Tsai
Commit dd5e14a7511465d20c6e95bf54c9b8f999abbbf6 ensured that no data could be read for header-only files regardless of what the Header.Size said. We should document this fact in Reader.Read. Updates #13647 Change-Id: I4df9a2892bc66b49e0279693d08454bf696cfa31 Reviewed-on: https://go-review.googlesource.com/17913 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17net: prefer error for original name on lookupsDan Peterson
With certain names and search domain configurations the returned error would be one encountered while querying a generated name instead of the original name. This caused confusion when a manual check of the same name produced different results. Now prefer errors encountered for the original name. Also makes the low-level DNS connection plumbing swappable in tests enabling tighter control over responses without relying on the network. Fixes #12712 Updates #13295 Change-Id: I780d628a762006bb11899caf20b5f97b462a717f Reviewed-on: https://go-review.googlesource.com/16953 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17crypto/x509: handle CRLDistributionPoints without FullNamesRuss Cox
Fixes #12910. Change-Id: If446e5dce236483bbb898cc5959baf8371f05142 Reviewed-on: https://go-review.googlesource.com/17550 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
2015-12-17cmd/go: use tags when evaluating file system wildcards like ./...Russ Cox
Thanks to Albert Hafvenström for the diagnosis. Fixes #11246. Change-Id: I2b9e670c0ecf6aa01e5bf4d7a402619e93cc4f4a Reviewed-on: https://go-review.googlesource.com/17942 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17cmd/go: disable use of -linkmode=external in tests when CGO_ENABLED=0Russ Cox
If cgo is turned off, there may not be an external linker available. Fixes #13450. Change-Id: Idbf3f3f57b4bb3908b67264f96d276acc952102a Reviewed-on: https://go-review.googlesource.com/17941 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-17cmd/dist: show output from failed compiler executionRuss Cox
Maybe it will say something that helps the user understand the problem. Note that we can't use os/exec.ExitError's new Stderr field because cmd/dist is compiled with Go 1.4. Fixes #13099. Change-Id: I4b5910434bf324d1b85107002a64684d8ba14dc8 Reviewed-on: https://go-review.googlesource.com/17940 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17cmd/cgo: gccgo support for cgoCheckPointerIan Lance Taylor
This uses weak declarations so that it will work with current versions of gccgo that do not support pointer checking. Change-Id: Ia34507e3231ac60517cb6834f0b673764715a256 Reviewed-on: https://go-review.googlesource.com/17429 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17archive/tar: spell license correctly in exampleJoe Tsai
Change-Id: Ice85d161f026a991953bd63ecc6ec80f8d06dfbd Reviewed-on: https://go-review.googlesource.com/17901 Run-TryBot: Joe Tsai <joetsai@digital-static.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17net/http: update Response.Trailer docBrad Fitzpatrick
I updated this in the previous commit (https://golang.org/cl/17931) but noticed a typo. and it still wasn't great. The Go 1.5 text was too brief to know how to use it: // Trailer maps trailer keys to values, in the same // format as the header. Change-Id: I33c49b6a4a7a3596735a4cc7865ad625809da900 Reviewed-on: https://go-review.googlesource.com/17932 Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17cmd/go: add -args to 'go test' to resolve -v ambiguityRuss Cox
The new flag -args stops flag processing, leaving the rest of the command line to be passed to the underlying test binary verbatim. Thus, both of these pass a literal -v -n on the test binary command line, without putting the go command into verbose mode or disabling execution of commands: go test . -args -v -n go test -args -v -n Also try to make the documentation a bit clearer. Fixes #7221. Fixes #12177. Change-Id: Ief9e830a6fbb9475d96011716a86e2524a35eceb Reviewed-on: https://go-review.googlesource.com/17775 Reviewed-by: Rob Pike <r@golang.org>
2015-12-17Revert "cmd/dist: fix build after "go test" argument order change"Russ Cox
No longer needed - the change to 'go test' was rolled back. This reverts commit 2c96e5d2fc0a0765397a86d1e0d7c9329479d4bb. Change-Id: Ibe9c5f48e3e4cbbbde2f5c8c516b2987ebba55ae Reviewed-on: https://go-review.googlesource.com/17776 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
2015-12-17go/build: disable test on nacl (and a few others, unnecessarily)Russ Cox
Fixes build. Change-Id: Ia71fc031cc8eb575e5ab5323ff4084147d143744 Reviewed-on: https://go-review.googlesource.com/17867 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-17net/http: update bundled copy of http2, enable TestTrailersServerToClient testsBrad Fitzpatrick
This CL updates the bundled copy of x/net/http2 to include https://golang.org/cl/17930 and enables the previously-skipped tests TestTrailersServerToClient_h2 and TestTrailersServerToClient_Flush_h2. It also updates the docs on http.Response.Trailer to describe how to use it. No change in rules. Just documenting the old unwritten rules. (there were tests locking in the behavior, and misc docs and examples scattered about, but not on http.Response.Trailer itself) Updates #13557 Change-Id: I6261d439f6c0d17654a1a7928790e8ffed16df6c Reviewed-on: https://go-review.googlesource.com/17931 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com>
2015-12-17crypto/rsa: check CRT result.Adam Langley
This change adds a check after computing an RSA signature that the signature is correct. This prevents an error in the CRT computation from leaking the private key. See references in the linked bug. benchmark old ns/op new ns/op delta BenchmarkRSA2048Sign-3 5713305 6225215 +8.96% Fixes #12453 Change-Id: I1f24e0b542f7c9a3f7e7ad4e971db3dc440ed3c1 Reviewed-on: https://go-review.googlesource.com/17862 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-16net: make windows (*netFD).connect work like its unix versionAlex Brainman
CL 17821 used syscall.CancelIoEx to cancel outstanding connect call, but did not check for syscall.CancelIoEx return value. Also I am worried about introducing race here. We should use proper tools available for us instead. For example, we could use fd.setWriteDeadline just like unix version does. Do that. Change-Id: Idb9a03c8c249278ce3e2a4c49cc32445d4c7b065 Reviewed-on: https://go-review.googlesource.com/17920 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
2015-12-16cmd/cgo: map C unsigned char back to _Ctype_uchar in error messagesShenghou Ma
Fixes #13635. Change-Id: Icab4a45567f435f002a8f6c85db9538acf054a70 Reviewed-on: https://go-review.googlesource.com/17863 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>