aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-06[release-branch.go1.10] go1.10.3go1.10.3Filippo Valsorda
Change-Id: If2abf35c922737d48ec72881428dc3353b016f7f Reviewed-on: https://go-review.googlesource.com/116763 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-06-06[release-branch.go1.10] doc: document Go 1.10.3Filippo Valsorda
Change-Id: Ifc774bb9267baa773e91c617204329d3e04bd4b7 Reviewed-on: https://go-review.googlesource.com/116363 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit b0951aff8f6a004fc2e73fdb98350125daea6c05) Reviewed-on: https://go-review.googlesource.com/116477 Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-06-06[release-branch.go1.10] doc: document Go 1.9.7Filippo Valsorda
Change-Id: I10dededb41162a99dbc42792a9d314c6dabddcca Reviewed-on: https://go-review.googlesource.com/116362 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit bbf4a3024b1001ef2f01a8d12b5d7469915e4a8d) Reviewed-on: https://go-review.googlesource.com/116476 Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-06-04[release-branch.go1.10] cmd/go: fix 'go get' compatibility for direct ↵Russ Cox
download of vgo-aware module CL 109340 added “minimal module-awareness for legacy operation.” One part of that is reinterpreting imports inside code trees with go.mod files as using semantic import versioning, and converting them back to legacy import paths by stripping the major version element (for example, interpreting import "x.com/foo/v2/bar" as import "x.com/foo/bar"). This rewrite was not being applied during "go get", with the effect that once you had the target code downloaded already, everything was fine, but it didn't download and build successfully the first time. Fixes #25687. Cherry-pick fixes #25690. Change-Id: I3e122efdc8fd9a0a4e66f5aa3e6a99f90c7df779 Reviewed-on: https://go-review.googlesource.com/115797 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-on: https://go-review.googlesource.com/116176
2018-05-31[release-branch.go1.10] cmd/go: accept more safe CFLAGS/LDFLAGSIan Lance Taylor
Fixes #23749 Fixes #24703 Fixes #24858 Change-Id: Ib32d8efee294004c70fdd602087df2da0867f099 Reviewed-on: https://go-review.googlesource.com/115415 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 886d5601a63bef0271e705cfa6b6ac6f5134ee60) Reviewed-on: https://go-review.googlesource.com/115435 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-05-30[release-branch.go1.10] cmd/go: add minimal module-awareness for legacy ↵Russ Cox
operation We want authors to be able to publish code that works with both the current standard go command and the planned new go command support for modules. If authors have tagged their code v2 or later, semantic import versioning means the import paths must include a v2 path element after the path prefix naming the module. One option for making this convention compatible with original go get is to move code into a v2 subdirectory of the root. That makes sense for some authors, but many authors would prefer not to move all the code into a v2 subdirectory for a transition and then move it back up once we everyone has a module-aware go command. Instead, this CL teaches the old (non-module-aware) go command a tiny amount about modules and their import paths, to expand the options for authors who want to publish compatible packages. If an author has a v2 of a package, say my/thing/v2/sub/pkg, in the my/thing repo's sub/pkg subdirectory (no v2 in the file system path), then old go get continues to import that package as my/thing/sub/pkg. But when go get is processing code in any module (code in a tree with a go.mod file) and encounters a path like my/thing/v2/sub/pkg, it will check to see if my/thing/go.mod says "module my/thing/v2". If so, the go command will read the import my/thing/v2/sub/pkg as if it said my/thing/sub/pkg, which is the correct "old" import path for the package in question. This CL will be back-ported to Go 1.10 and Go 1.9 as well. Once users have updated to the latest Go point releases containing this new logic, authors will be able to update to using modules within their own repos, including using semantic import paths with vN path elements, and old go get will still be able to consume those repositories. This CL also makes "go get" ignore meta go-import lines using the new "mod" VCS type. This allows a package to specify both a "mod" type and a "git" type, to present more efficient module access to module-aware go but still present a Git repo to the old "go get". Fixes #24751. Fixes #25069. Backport fixes #25139. Change-Id: I378955613a0d63834d4f50f121f4db7e4d87dc0a Reviewed-on: https://go-review.googlesource.com/114500 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-05-30[release-branch.go1.10] cmd/go: remove import path debugging hooksRuss Cox
These are no longer needed. Change-Id: Ie42a84f2bd24d2f59324bb66551c46e6af60c302 Reviewed-on: https://go-review.googlesource.com/109339 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-on: https://go-review.googlesource.com/114499 TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-26[release-branch.go1.10] strings: fix encoding of \u0080 in mapMartin Möhrmann
Fix encoding of PAD (U+0080) which has the same value as utf8.RuneSelf being incorrectly encoded as \x80 in strings.Map due to using <= instead of a < comparison operator to check one byte encodings for utf8. Fixes golang/go#25479 Change-Id: Ib6c7d1f425a7ba81e431b6d64009e713d94ea3bc Reviewed-on: https://go-review.googlesource.com/111286 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 8c62fc0ca3c96ecbd3a6e81546aa8c53e32ff500) Reviewed-on: https://go-review.googlesource.com/114635 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-05-26[release-branch.go1.10] doc: sync with masterFilippo Valsorda
A number of changes were applied to documentation in master, including a wide rewrite of the contribution guide. Backport them all to get them deployed on golang.org. $ git ch master -- doc $ git show-ref master 88756931d0a6e23aeaf61caa6a7363ac04be2063 refs/heads/master Change-Id: Ib45ff191f3b60723aa4421113992289c37d144aa Reviewed-on: https://go-review.googlesource.com/114503 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-24[release-branch.go1.10] crypto/x509: check EKUs like 1.9.Adam Langley
This change brings back the EKU checking from 1.9. In 1.10, we checked EKU nesting independent of the requested EKUs so that, after verifying a certifciate, one could inspect the EKUs in the leaf and trust them. That, however, was too optimistic. I had misunderstood that the PKI was /currently/ clean enough to require that, rather than it being desirable. Go generally does not push the envelope on these sorts of things and lets the browsers clear the path first. Fixes #25258 Change-Id: I18c070478e3bbb6468800ae461c207af9e954949 Reviewed-on: https://go-review.googlesource.com/113475 Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 180e0f8a1b149bd1d15df29b6527748266cacad9) Reviewed-on: https://go-review.googlesource.com/114035 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-05-23[release-branch.go1.10] doc: update Code of ConductAndrew Bonventre
Change-Id: I82c03dd026bb797a49b7361389373924acf6366c Reviewed-on: https://go-review.googlesource.com/114085 Reviewed-by: Russ Cox <rsc@golang.org> (cherry picked from commit 571d78267ff48f3a1220bfe7d342aa635008e35f) Reviewed-on: https://go-review.googlesource.com/114275 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-05-08[release-branch.go1.10] misc/cgo/testcshared: use file descriptor 30 for ↵Ian Lance Taylor
TestUnexportedSymbols Backport of CL 108537 to 1.10 release branch. We were using file descriptor 100, which requires the Linux kernel to grow the fdtable size. That step may sometimes require a long time, causing the test to fail. Switch to file descriptor 30, which should not require growing the fdtable. Updates #23784 Fixes #25277 Change-Id: I9d25986f3b59bdeb04aa52407b24aa94712aedff Reviewed-on: https://go-review.googlesource.com/111995 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-07[release-branch.go1.10] crypto/tls: copy and use adjusted ↵Alex Brainman
syscall.CertChainPolicyPara As discussed in issue #21376, it is unsafe to have syscall.CertChainPolicyPara.ExtraPolicyPara uintptr - it has to be a pointer type. So copy syscall.CertChainPolicyPara into crypto/tls package, make ExtraPolicyPara unsafe.Pointer, and use new struct instead of syscall.CertChainPolicyPara. Fixes #25033 Change-Id: If914af056cbbb0c4d93ffaa915b3d2cb5ecad0cd Reviewed-on: https://go-review.googlesource.com/111715 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com>
2018-04-30[release-branch.go1.10] go1.10.2go1.10.2Andrew Bonventre
Change-Id: I3d88ab55277e4386177cda06e2eb5a9b0e26cf93 Reviewed-on: https://go-review.googlesource.com/110338 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-04-30[release-branch.go1.10] doc: document Go 1.10.2Andrew Bonventre
Change-Id: I84334dfd02ad9a27b3fb6d46a6b1c015a3f03511 Reviewed-on: https://go-review.googlesource.com/110335 Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 4bced5e9461429ae90245b0048c6fa5ff39a3947) Reviewed-on: https://go-review.googlesource.com/110377 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-04-30[release-branch.go1.10] doc: document Go 1.9.6Andrew Bonventre
Change-Id: I9699b22d3a308cda685aa684b32dcde99333df46 Reviewed-on: https://go-review.googlesource.com/110315 Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 587416c1617c4d5c970ca382dead63f9576c0de5) Reviewed-on: https://go-review.googlesource.com/110376 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-04-28[release-branch.go1.10] cmd/internal/obj/mips: load/store even float ↵James Cowgill
registers first There is a bug in Octeon III processors where storing an odd floating point register after it has recently been written to by a double floating point operation will store the old value from before the double operation (there are some extra details - the operation and store must be a certain number of cycles apart). However, this bug does not occur if the even register is stored first. Currently the bug only happens on big endian because go always loads the even register first on little endian. Workaround the bug by always loading / storing the even floating point register first. Since this is just an instruction reordering, it should have no performance penalty. This follows other compilers like GCC which will always store the even register first (although you do have to set the ISA level to MIPS I to prevent it from using SDC1). Fixes golang/go#24995 Change-Id: I5e73daa4d724ca1df7bf5228aab19f53f26a4976 Reviewed-on: https://go-review.googlesource.com/97735 Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 423111081b87c6c4e61c4d94c94bfdf1853fa01f) Reviewed-on: https://go-review.googlesource.com/110078 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-04-27[release-branch.go1.10] cmd/internal/test2json: support subtests containing ↵Daniel Martí
colons The "updates" lines, such as RUN, do not contain a colon. However, test2json looked for one anyway, meaning that it would be thrown off if it encountered a line like: === RUN TestWithColons/[::1] In that case, it must not use the first colon it encounters to separate the action from the test name. Fixes golang/go#25027 Change-Id: I82eff23e24b83dae183c0cf9f85fc5f409f51c25 Reviewed-on: https://go-review.googlesource.com/98445 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 0c5cfec84424bb453ccd270f4b5c439f21ccf617) Reviewed-on: https://go-review.googlesource.com/110075 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-04-27[release-branch.go1.10] cmd/compile: fix evaluation of "" < sJosh Bleecher Snyder
Fixes #24935 Change-Id: Ifa79ab3dfe69297eeef85f7193cd5f85e5982bc5 Reviewed-on: https://go-review.googlesource.com/106655 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-on: https://go-review.googlesource.com/108944 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-04-27[release-branch.go1.10] cmd/go: fix go list .Stale computationRuss Cox
If X depends on Y and X was installed but Y is only present in the cache (as happens when you "go install X") then we should report X as up-to-date, not as stale. This applies whether X is a package or a main binary. Fixes golang/go#25026 Fixes golang/go#25032 Change-Id: I26a0b375b1f7f7ac909cc0db68e92f4e04529208 Reviewed-on: https://go-review.googlesource.com/107957 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit 9e0e6981fc536c9e51ce24c425141a3d09b39e3a) Reviewed-on: https://go-review.googlesource.com/110076 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-04-27[release-branch.go1.10] cmd/link: do not pass -no-pie to host linker when ↵Michael Hudson-Doyle
-linkshared is passed As the comment above the code I'm changing says, when building with -buildmode=exe, the default compiler flags produce code incompatible with PIE. But when -linkshared is passed, the default compiler flags are not used so this does not apply. And now I've found a system (linux/arm64 with glibc 2.27) where this combination of flags causes a problem, albeit for reasons I don't really understand, so stop passing -no-pie when -linkshared is passed. Fixes golang/go#24873 Change-Id: I412ec7941dc0cb89e6d1b171fc29288aadcb9f20 Reviewed-on: https://go-review.googlesource.com/104815 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 2d26a65f8f1a6fcb0948803589061d99b94fa993) Reviewed-on: https://go-review.googlesource.com/110035 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: skip TestVetWithOnlyCgoFiles when cgo is ↵David du Colombier
disabled CL 99175 added TestVetWithOnlyCgoFiles. However, this test is failing on platforms where cgo is disabled, because no file can be built. This change fixes TestVetWithOnlyCgoFiles by skipping this test when cgo is disabled. Fixes #24304. Change-Id: Ibb38fcd3e0ed1a791782145d3f2866f12117c6fe Reviewed-on: https://go-review.googlesource.com/99275 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit b1335037fad4c81ce296f652372aa631a29dcb48) Reviewed-on: https://go-review.googlesource.com/103223 Reviewed-by: David du Colombier <0intro@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] go1.10.1go1.10.1Andrew Bonventre
Change-Id: I0636f60e705f8182d6fba4ce6199c67f94c04e36 Reviewed-on: https://go-review.googlesource.com/103168 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] runtime: identify special functions by flag instead ↵Keith Randall
of address When there are plugins, there may not be a unique copy of runtime functions like goexit, mcall, etc. So identifying them by entry address is problematic. Instead, keep track of each special function using a field in the symbol table. That way, multiple copies of the same runtime function will be treated identically. Fixes #24351 Fixes #23133 Change-Id: Iea3232df8a6af68509769d9ca618f530cc0f84fd Reviewed-on: https://go-review.googlesource.com/100739 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/102793 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2018-03-29[release-branch.go1.10] doc: update 1.9.5 release notes to include ↵Andrew Bonventre
net/http/pprof Change-Id: I7c0716711a2cadd347fdf242c792b109539f7355 Reviewed-on: https://go-review.googlesource.com/103163 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-on: https://go-review.googlesource.com/103166 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] doc: update release notes for Go 1.9.5Andrew Bonventre
Change-Id: Idf88d289bac9603d852a9d19eb4b764f8589f8d9 Reviewed-on: https://go-review.googlesource.com/103159 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-on: https://go-review.googlesource.com/103162 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] doc: document Go 1.10.1Andrew Bonventre
Change-Id: Ibba5d4fd8124db9b1e4e50b8f37366f8dd23f47e Reviewed-on: https://go-review.googlesource.com/103217 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/103222 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] doc: document Go 1.9.5Andrew Bonventre
Change-Id: I8f12b188d2e13555e1d7634b9cc0319fc737cb1d Reviewed-on: https://go-review.googlesource.com/103216 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/103221 Reviewed-by: Andrew Bonventre <andybons@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] net/http/pprof: harden handler responsesAndrew Bonventre
A very small number of old browsers consider content as HTML even when it is explicitly stated in the Content-Type header that it is not. If content served is based on user-supplied input, then an XSS is possible. Introduce three mitigations: + Don't reflect user input in error strings + Set a Content-Disposition header when requesting a resource that should never be displayed in a browser window + Set X-Content-Type-Options: nosniff on all responses Change-Id: I81c9d6736e0439ebd1db99cd7fb701cc56d24805 Reviewed-on: https://go-review.googlesource.com/102318 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/103218 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: add more C compiler/linker options to whitelistIan Lance Taylor
Fixes #23937 Change-Id: Ie63d91355d1a724d0012d99d457d939deeeb8d3e Reviewed-on: https://go-review.googlesource.com/102818 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-on: https://go-review.googlesource.com/103015 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: if -race, don't run coverage on runtime packagesIan Lance Taylor
Don't compile the runtime packages with coverage when using the race detector. The user can, perhaps accidentally, request coverage for the runtime by using -coverpkg=all. If using the race detector, the runtime package coverage will call into the race detector before it has been initialized. This will cause the program to crash mysteriously on startup. Fixes #23882 Change-Id: I9a63867a9138797d8b8afb0856ae21079accdb27 Reviewed-on: https://go-review.googlesource.com/94898 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-on: https://go-review.googlesource.com/103095 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] crypto/x509: matching any requested EKU should be ↵Adam Langley
sufficient. The documentation was unclear here and I misremembered the behaviour and changed it in 1.10: it used to be that matching any EKU was enough but 1.10 requires that all EKUs match. Restore 1.9 behaviour and clarify the documentation to make it official. Fixes #24162. Change-Id: Ic9466cd0799cb27ec3a3a7e6c96f10c2aacc7020 Reviewed-on: https://go-review.googlesource.com/97720 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-on: https://go-review.googlesource.com/102790 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-03-29[release-branch.go1.10] go/internal/srcimporter: simplify and fix package ↵Hiroshi Ioka
file lookup The old code was a blend of (copied) code that existed before go/build, and incorrect adjustments made when go/build was introduced. This change leaves package path determination entirely to go/build and in the process fixes issues with relative import paths. Fixes #23092 Fixes #24392 Change-Id: I9e900538b365398751bace56964495c5440ac4ae Reviewed-on: https://go-review.googlesource.com/83415 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-on: https://go-review.googlesource.com/102789 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-03-29[release-branch.go1.10] cmd/compile: mark LAA and LAAG as clobbering flags ↵Michael Munday
on s390x The atomic add instructions modify the condition code and so need to be marked as clobbering flags. Fixes #24449. Change-Id: Ic69c8d775fbdbfb2a56c5e0cfca7a49c0d7f6897 Reviewed-on: https://go-review.googlesource.com/101455 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102788 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Michael Munday <mike.munday@ibm.com>
2018-03-29[release-branch.go1.10] net: don't let cancelation of a DNS lookup affect ↵Ian Lance Taylor
another lookup Updates #8602 Updates #20703 Fixes #22724 Change-Id: I27b72311b2c66148c59977361bd3f5101e47b51d Reviewed-on: https://go-review.googlesource.com/100840 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102787 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] syscall: use Android O friendly fstatat syscall to ↵Tobias Klauser
implement Stat on linux/amd64 The Android O seccomp policy disallows the stat syscall on amd64, see https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1.2/libc/SYSCALLS.TXT Use the fstatat syscall with AT_FDCWD and zero flags instead to achieve the same behavior. Fixes #24403 Change-Id: I36fc9ec9bc938cd8e9de30f66c0eb9d2e24debf6 Reviewed-on: https://go-review.googlesource.com/100878 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/102976 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] runtime: use Android O friendly faccessat syscall on ↵Tobias Klauser
linux/amd64 The Android O seccomp policy disallows the access syscall on amd64, see https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1.2/libc/SYSCALLS.TXT Use the faccessat syscall with AT_FDCWD instead to achieve the same behavior. Updates #24403 Change-Id: I9db847c1c0f33987a3479b3f96e721fb9588cde2 Reviewed-on: https://go-review.googlesource.com/100877 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102995 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] runtime: add symbol for AT_FDCWD on Linux amd64 and ↵Tobias Klauser
mips64x Also order the syscall number list by numerically for mips64x. Follow-up for CL 92895. Change-Id: I5f01f8c626132a06160997fce8a2aef0c486bb1c Reviewed-on: https://go-review.googlesource.com/93616 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/103035 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] runtime: use Android O friendly syscalls on 64-bit ↵Jason A. Donenfeld
machines Android O disallows open on 64-bit, so let's use openat with AT_FDCWD to achieve the same behavior. Android O disallows epoll_wait on 64-bit, so let's use epoll_pwait with the last argument as NULL to achieve the same behavior. See here: https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/arm64_app_policy.cpp https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/mips64_app_policy.cpp https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/x86_64_app_policy.cpp Fixes #23750 Change-Id: If8d5a663357471e5d2c1f516151344a9d05b188a Reviewed-on: https://go-review.googlesource.com/92895 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/102792 Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-03-29[release-branch.go1.10] cmd/cover: don't crash on non-gofmt'ed inputIan Lance Taylor
Without the change to cover.go, the new test fails with panic: overlapping edits: [4946,4950)->"", [4947,4947)->"thisNameMustBeVeryLongToCauseOverflowOfCounterIncrementStatementOntoNextLineForTest.Count[112]++;" The original code inserts "else{", deletes "else", and then positions a new block just after the "}" that must come before the "else". That works on gofmt'ed code, but fails if the code looks like "}else". When there is no space between the "{" and the "else", the new block is inserted into a location that we are deleting, leading to the "overlapping edits" mentioned above. This CL fixes this case by not deleting the "else" but just using the one that is already there. That requires adjust the block offset to come after the "{" that we insert. Fixes #23927 Change-Id: I40ef592490878765bbce6550ddb439e43ac525b2 Reviewed-on: https://go-review.googlesource.com/98935 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-on: https://go-review.googlesource.com/102786 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: run vet on packages with only cgo filesIan Lance Taylor
CgoFiles is not included in GoFiles, so we need to check both. Fixes #24193 Change-Id: I6a67bd912e3d9a4be0eae8fa8db6fa8a07fb5df3 Reviewed-on: https://go-review.googlesource.com/99175 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102785 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] encoding/json: avoid assuming side-effect free ↵Joe Tsai
reflect.Value.Addr().Elem() Consider the following: type child struct{ Field string } type parent struct{ child } p := new(parent) v := reflect.ValueOf(p).Elem().Field(0) v.Field(0).SetString("hello") // v.Field = "hello" v = v.Addr().Elem() // v = *(&v) v.Field(0).SetString("goodbye") // v.Field = "goodbye" It would appear that v.Addr().Elem() should have the same value, and that it would be safe to set "goodbye". However, after CL 66331, any interspersed calls between Field calls causes the RO flag to be set. Thus, setting to "goodbye" actually causes a panic. That CL affects decodeState.indirect which assumes that back-to-back Value.Addr().Elem() is side-effect free. We fix that logic to keep track of the Addr() and Elem() calls and set v back to the original after a full round-trip has occured. Fixes #24152 Updates #24153 Change-Id: Ie50f8fe963f00cef8515d89d1d5cbc43b76d9f9c Reviewed-on: https://go-review.googlesource.com/97796 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/102784 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] crypto/x509: parse invalid DNS names and email ↵Adam Langley
addresses. Go 1.10 requires that SANs in certificates are valid. However, a non-trivial number of (generally non-WebPKI) certificates have invalid strings in dnsName fields and some have even put those dnsName SANs in CA certificates. This change defers validity checking until name constraints are checked. Fixes #23995, #23711. Change-Id: I2e0ebb0898c047874a3547226b71e3029333b7f1 Reviewed-on: https://go-review.googlesource.com/96378 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102783 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-03-29[release-branch.go1.10] archive/zip: fix handling of Info-ZIP Unix extended ↵Joe Tsai
timestamps The Info-ZIP Unix1 extra field is specified as such: >>> Value Size Description ----- ---- ----------- 0x5855 Short tag for this extra block type ("UX") TSize Short total data size for this block AcTime Long time of last access (GMT/UTC) ModTime Long time of last modification (GMT/UTC) <<< The previous handling was incorrect in that it read the AcTime field instead of the ModTime field. The test-osx.zip test unfortunately locked in the wrong behavior. Manually parsing that ZIP file shows that the encoded MS-DOS date and time are 0x4b5f and 0xa97d, which corresponds with a date of 2017-10-31 21:11:58, which matches the correct mod time (off by 1 second due to MS-DOS timestamp resolution). Fixes #23901 Change-Id: I567824c66e8316b9acd103dbecde366874a4b7ef Reviewed-on: https://go-review.googlesource.com/96895 Run-TryBot: Joe Tsai <joetsai@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/102782 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] runtime: don't check for String/Error methods in ↵Ian Lance Taylor
printany They have either already been called by preprintpanics, or they can not be called safely because of the various conditions checked at the start of gopanic. Fixes #24059 Change-Id: I4a6233d12c9f7aaaee72f343257ea108bae79241 Reviewed-on: https://go-review.googlesource.com/96755 Reviewed-by: Austin Clements <austin@google.com> Reviewed-on: https://go-review.googlesource.com/102781 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-03-29[release-branch.go1.10] crypto/x509: tighten EKU checking for requested EKUs.Adam Langley
There are, sadly, many exceptions to EKU checking to reflect mistakes that CAs have made in practice. However, the requirements for checking requested EKUs against the leaf should be tighter than for checking leaf EKUs against a CA. Fixes #23884 Change-Id: I05ea874c4ada0696d8bb18cac4377c0b398fcb5e Reviewed-on: https://go-review.googlesource.com/96379 Reviewed-by: Jonathan Rudenberg <jonathan@titanous.com> Reviewed-by: Filippo Valsorda <hi@filippo.io> Run-TryBot: Filippo Valsorda <hi@filippo.io> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/102780 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: permit pkg-config flags in any argument positionIan Lance Taylor
Fixes #23875 Change-Id: I503af71f44d11cd6b787fef100246b55735614a0 Reviewed-on: https://go-review.googlesource.com/94896 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102779 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29[release-branch.go1.10] cmd/go: restrict meta imports to valid schemesIan Lance Taylor
Before this change, when using -insecure, we permitted any meta import repo root as long as it contained "://". When not using -insecure, we restrict meta import repo roots to be valid URLs. People may depend on that somehow, so permit meta import repo roots to be invalid URLs, but require them to have valid schemes per RFC 3986. Fixes #23867 Change-Id: Iac666dfc75ac321bf8639dda5b0dba7c8840922d Reviewed-on: https://go-review.googlesource.com/94603 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/102778 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-17[release-branch.go1.10] doc: update devel/release.html to add Go 1.10Andrew Bonventre
Change-Id: I869f1607b0209ad190bc02999879f0682965fdf7 Reviewed-on: https://go-review.googlesource.com/94915 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 27be37a4038e0c5e11510e7b0b6ec4f2c4cfc879) Reviewed-on: https://go-review.googlesource.com/94916 Reviewed-by: Andrew Bonventre <andybons@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-16[release-branch.go1.10] go1.10go1.10Andrew Bonventre
Change-Id: I3663c2156d093efa09343512a69f040ecc8331e0 Reviewed-on: https://go-review.googlesource.com/94696 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>