aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-19[release-branch.go1.13] go1.13.9go1.13.9Carlos Amedee
Change-Id: Ia0ad75ee0458df95f1e4e36cd440f4cb314c67cb Reviewed-on: https://go-review.googlesource.com/c/go/+/223940 Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-03-12[release-branch.go1.13] internal/syscall/windows/registry: remove ↵Jason A. Donenfeld
TestWalkFullRegistry due to false assumptions This test's existence was predicated upon assumptions about the full range of known data types and known data into those types. However, we've learned from Microsoft that there are several undocumented secret registry types that are in use by various parts of Windows, and we've learned from inspection that many Microsoft uses of registry types don't strictly adhere to the recommended value size. It's therefore foolhardy to make any assumptions about what goes in and out of the registry, and so this test, as well as its "blacklist", are meaningless. For #35084. Fixes #37826. Change-Id: I6c3fe5fb0e740e88858321b3b042c0ff1a23284e Reviewed-on: https://go-review.googlesource.com/c/go/+/203604 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> (cherry picked from commit 0d3092ffa7e7f613429ddcfd596d26ccbc84766f) Reviewed-on: https://go-review.googlesource.com/c/go/+/223237 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-03-12[release-branch.go1.13] cmd/go: include the go language version in cache keysBryan C. Mills
Fixes #37821 Updates #37804 Change-Id: I4381dc5c58cfd467506d3d73fbd19c2c7257338e Reviewed-on: https://go-review.googlesource.com/c/go/+/223139 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit c95708462fb24f379f4bcdedd6ea664ee38ea562) Reviewed-on: https://go-review.googlesource.com/c/go/+/223142 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-03-02[release-branch.go1.13] cmd/trace: update to use WebComponents V0 polyfillHana (Hyang-Ah) Kim
Old trace viewer stopped working with Chrome M80+ because the old trace viewer heavily depended on WebComponents V0 which are deprecated. Trace viewer recently migrated to use WebComponents V0 polyfill (crbug.com/1036492). This CL brings in the newly updated trace_viewer_full.html (sync'd @ 9508452e) and updates the javascript snippet included in the /trace endpoint to use the polyfill. This brings in webcomponents.min.js copied from https://chromium.googlesource.com/catapult/+/9508452e18f130c98499cb4c4f1e1efaedee8962/third_party/polymer/components/webcomponentsjs/webcomponents.min.js That is necessary because the /trace endpoint needs to import the vulcanized trace_viewer_full.html. It's possible that some features are not working correctly with this polyfill. In that case, report the issue to crbug.com/1036492. There will be a warning message in the UI (yellow banner above the timeline) which can be hidden by clicking the 'hide' button. This allows to render the trace in browsers other than chrome in theory, but I observed some buttons and functions still don't work outside chrome. Updates #34374. Fixes #37342. Change-Id: Ib575f756f5e6b22ad904ede6e4d224a995ebe259 Reviewed-on: https://go-review.googlesource.com/c/go/+/219997 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> (cherry picked from commit 75ea964b3f6073076e1a86a0de2be9a2f159da24) Reviewed-on: https://go-review.googlesource.com/c/go/+/220321 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
2020-02-26[release-branch.go1.13] cmd/go: fix cgo test when min macOS version is setJay Conrod
Regression tests for #24161 use a macro to conditionally compile some stub definitions. The macro tests that the minimum macOS version is less than 10.12. We get duplicate definitions when building this test with CGO_CFLAGS=-mmacosx-version-min=10.x where 10.x < 10.12. With this change, we use a different macro, __MAC_OS_X_VERSION_MAX_ALLOWED__, which tests the SDK version instead of the minimum macOS version. This checks whether these definitions are present in headers. After this change, 'go tool dist test cgo_test' should pass with CGO_FLAGS=-mmacosx-version-min=10.10. Updates #36846 Updates #35459 Change-Id: I88d63601c94b0369c73c38d216a2d41ba7d4e579 Reviewed-on: https://go-review.googlesource.com/c/go/+/216243 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 1f9f88b95eaec50c72c8595ca9f52b7b876e28f9) Reviewed-on: https://go-review.googlesource.com/c/go/+/217059 Run-TryBot: Carlos Amedee <carlos@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-02-26[release-branch.go1.13] cmd/go: add -d flag to mod_get_testJay Conrod
'go get all' was run in this test without -d. This caused some std packages to be reinstalled if the test is run in a slightly different configuration than make.bash was run. run.bash would fail in some situations because of this. Nothing in the cmd/go tests should modify installed std or cmd packages. Updates #36846 Updates #35459 Change-Id: Idd259a27d55502923b7fc54f361a77f0ac11eea2 Reviewed-on: https://go-review.googlesource.com/c/go/+/215721 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> (cherry picked from commit 71bbffbc48d03b447c73da1f54ac57350fc9b36a) Reviewed-on: https://go-review.googlesource.com/c/go/+/218597 Run-TryBot: Carlos Amedee <carlos@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-02-26[release-branch.go1.13] cmd/link: ensure cgo cflags do not leak into dwarf testsCarlos Amedee
Running the dwarf tests with CGO_CFLAGS set with certain values would cause the test to fail. all.bash would fail when CGO_CFLAGS was set to '-mmacosx-version-min=10.10' because the --macosx-version-min flag is incompatible with some dwarf tests. The change guards against using an unintended flag in the unit test. Updates #36846 Updates #35459 Change-Id: Idc9b354aba44fdab424cb0081a4b3ea7a6d0f8e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/216177 Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit e948d2b73ede67f12bff9e4d050f0e1425163010) Reviewed-on: https://go-review.googlesource.com/c/go/+/217057
2020-02-26[release-branch.go1.13] cmd/link: ensure cgo cflags do not leak into tvOS testCarlos Amedee
Running the 'TestBuildForTvOS' test with CGO_CFLAGS set with certain values would cause the test to fail. all.bash would fail when CGO_CFLAGS was set to '-mmacosx-version-min=10.10' because the --macosx-version-min flag is incompatible with tvOS. The change guards against using an unintended flag in the unit test. Updates #36846 Updated #35459 Change-Id: Ifc43f3ebfb23d37aabeaac2ea9efae5b877991bf Reviewed-on: https://go-review.googlesource.com/c/go/+/215957 Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit ace25f82df0a27eb26a518e1883eb56c1bec6c5e) Reviewed-on: https://go-review.googlesource.com/c/go/+/218598
2020-02-26[release-branch.go1.13] crypto/cipher: require non-zero nonce size for AES-GCMKatie Hockman
Also fix typo in crypto/cipher/gcm_test.go. Updates #37118 Fixes #37417 Change-Id: I8544d1eeeb1f0336cebb977b8c5bfa5e4c5ad8c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/218500 Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 4e8badbbc2fe7854bb1c12a9ee42315b4d535051) Reviewed-on: https://go-review.googlesource.com/c/go/+/220653 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-02-12[release-branch.go1.13] go1.13.8go1.13.8Alexander Rakoczy
Change-Id: Ia174ccd8d5c26f44aeea188113e292f5048ec873 Reviewed-on: https://go-review.googlesource.com/c/go/+/219219 Run-TryBot: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
2020-02-11[release-branch.go1.13] net/http: only decrement connection count if we ↵Michael Fraenkel
removed a connection The connection count must only be decremented if the persistent connection was also removed. Fixes #36583 Change-Id: I5070717d5d9effec78016005fa4910593500c8cf Reviewed-on: https://go-review.googlesource.com/c/go/+/202087 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/215177 Run-TryBot: Alexander Rakoczy <alex@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-02-05[release-branch.go1.13] crypto/x509: fix godoc for MarshalPKCS8PrivateKeyKatie Hockman
Updates #36735 Fixes #37067 Change-Id: I93f005d78f4bfac773272995b165172461bae92f Reviewed-on: https://go-review.googlesource.com/c/go/+/217917 Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 7a36fa400286ca51192a7661a7ffbf9a39c396b3) Reviewed-on: https://go-review.googlesource.com/c/go/+/217998
2020-01-28[release-branch.go1.13] all: merge release-branch.go1.13-security into ↵Dmitri Shuralyov
release-branch.go1.13 Change-Id: I7119985b7b6fc02010a623ba2bc6d0d647ea8f70
2020-01-27[release-branch.go1.13-security] go1.13.7go1.13.7Dmitri Shuralyov
Change-Id: I4e9b0a8eee1ea6a0854eab88a2daf77b21da549a Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/649300 Reviewed-by: Katie Hockman <katiehockman@google.com>
2020-01-24[release-branch.go1.13-security] src/go.mod: import x/crypto/cryptobyte ↵Filippo Valsorda
security fix for 32-bit archs cryptobyte: fix panic due to malformed ASN.1 inputs on 32-bit archs When int is 32 bits wide (on 32-bit architectures like 386 and arm), an overflow could occur, causing a panic, due to malformed ASN.1 being passed to any of the ASN1 methods of String. Tested on linux/386 and darwin/amd64. This fixes CVE-2020-7919 and was found thanks to the Project Wycheproof test vectors. Change-Id: I8c9696a8bfad1b40ec877cd740dba3467d66ab54 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/645211 Reviewed-by: Katie Hockman <katiehockman@google.com> Reviewed-by: Adam Langley <agl@google.com> x/crypto/cryptobyte is used in crypto/x509 for parsing certificates. Malformed certificates might cause a panic during parsing on 32-bit architectures (like arm and 386). Change-Id: I840feb54eba880dbb96780ef7adcade073c4c4e3 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/647741 Reviewed-by: Katie Hockman <katiehockman@google.com>
2020-01-24[release-branch.go1.13-security] crypto/x509: mitigate CVE-2020-0601 ↵Filippo Valsorda
verification bypass on Windows An attacker can trick the Windows system verifier to use a poisoned set of elliptic curve parameters for a trusted root, allowing it to generate spoofed signatures. When this happens, the returned chain will present the unmodified original root, so the actual signatures won't verify (as they are invalid for the correct parameters). Simply double check them as a safety measure and mitigation. Windows users should still install the system security patch ASAP. This is the same mitigation adopted by Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/1994434 Change-Id: I2c734f6fb2cb51d906c7fd77034318ffeeb3e146 Reviewed-on: https://go-review.googlesource.com/c/go/+/215905 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ryan Sleevi <sleevi@google.com> Reviewed-by: Katie Hockman <katie@golang.org> Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/647123 Reviewed-by: Filippo Valsorda <valsorda@google.com>
2020-01-16[release-branch.go1.13] runtime: ignore power notification error seen on ↵Ian Lance Taylor
Windows Docker Updates #36557 Fixes #36575 Change-Id: Ia8125f382d5e14e5612da811268a58971cc9ac08 Reviewed-on: https://go-review.googlesource.com/c/go/+/214917 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Austin Clements <austin@google.com> (cherry picked from commit d2de9bd59c068c1bfcb4293de4286196dacf2e43) Reviewed-on: https://go-review.googlesource.com/c/go/+/215002
2020-01-09[release-branch.go1.13] go1.13.6go1.13.6Carlos Amedee
Change-Id: I8c0396849725345a12d4ca754f926714561fcc6e Reviewed-on: https://go-review.googlesource.com/c/go/+/214080 Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-01-08[release-branch.go1.13] runtime: ensure memmove write pointer atomically on ↵Cherry Zhang
ARM64 If a pointer write is not atomic, if the GC is running concurrently, it may observe a partially updated pointer, which may point to unallocated or already dead memory. Most pointer writes, like the store instructions generated by the compiler, are already atomic. But we still need to be careful in places like memmove. In memmove, we don't know which bits are pointers (or too expensive to query), so we ensure that all aligned pointer-sized units are written atomically. Fixes #36361. Updates #36101. Change-Id: I1b3ca24c6b1ac8a8aaf9ee470115e9a89ec1b00b Reviewed-on: https://go-review.googlesource.com/c/go/+/212626 Reviewed-by: Austin Clements <austin@google.com> (cherry picked from commit ffbc02761abb47106ce88e09290a31513b5f6c8a) Reviewed-on: https://go-review.googlesource.com/c/go/+/213683 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-01-07[release-branch.go1.13] net/http: avoid writing to Transport.ProxyConnectHeaderBryan C. Mills
Previously, we accidentally wrote the Proxy-Authorization header for the initial CONNECT request to the shared ProxyConnectHeader map when it was non-nil. Updates #36431 Fixes #36434 Change-Id: I5cb414f391dddf8c23d85427eb6973f14c949025 Reviewed-on: https://go-review.googlesource.com/c/go/+/213638 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 249c85d3aab2ad2d0bcbf36efe606fdd66f25c72) Reviewed-on: https://go-review.googlesource.com/c/go/+/213657
2020-01-03[release-branch.go1.13] runtime: do not use ↵Jason A. Donenfeld
PowerRegisterSuspendResumeNotification on systems with "program time" timer Systems where PowerRegisterSuspendResumeNotification returns ERROR_ FILE_NOT_FOUND are also systems where nanotime() is on "program time" rather than "real time". The chain for this is: powrprof.dll!PowerRegisterSuspendResumeNotification -> umpdc.dll!PdcPortOpen -> ntdll.dll!ZwAlpcConnectPort("\\PdcPort") -> syscall -> ntoskrnl.exe!AlpcpConnectPort Opening \\.\PdcPort fails with STATUS_OBJECT_NAME_NOT_FOUND when pdc.sys hasn't been initialized. Pdc.sys also provides the various hooks for sleep resumption events, which means if it's not loaded, then our "real time" timer is actually on "program time". Finally STATUS_OBJECT_NAME_ NOT_FOUND is passed through RtlNtStatusToDosError, which returns ERROR_ FILE_NOT_FOUND. Therefore, in the case where the function returns ERROR_ FILE_NOT_FOUND, we don't mind, since the timer we're using will correspond fine with the lack of sleep resumption notifications. This applies, for example, to Docker users. Updates #35447 Updates #35482 Fixes #35746 Change-Id: I9e1ce5bbc54b9da55ff7a3918b5da28112647eee Reviewed-on: https://go-review.googlesource.com/c/go/+/211280 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-19[release-branch.go1.13] runtime: call goready in wakeScavenger instead of readyMichael Anthony Knyszek
This changes fixes an oversight in wakeScavenger which would cause ready to be called off of the system stack. This change makes it so that wakeScavenger calls goready, which switches to the system stack before calling ready. Fixes #36127. Change-Id: Icb13f180b4d8fdd47c921eac1b896e3dd49e43b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/200999 Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 2c87be436bddd9b49f11959adee1ae817cb48ee1) Reviewed-on: https://go-review.googlesource.com/c/go/+/212103 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2019-12-11[release-branch.go1.13] cmd/go/internal/modfetch: remove non-hermetic testBryan C. Mills
The test for gopkg.in/yaml.v2@v2 assumes that there are no future upstream releases. That assumption empirically does not hold. Backporting fixes to this test is annoying, and other gopkg.in cases are already reasonably covered, so remove the problematic test. Updates #28856 Change-Id: I6455baa1816ac69e02d1ad5d03b82a93e1481a17 Reviewed-on: https://go-review.googlesource.com/c/go/+/205437 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit f0390ffc9d461cb84207b5a94c4b645c87673406) Reviewed-on: https://go-review.googlesource.com/c/go/+/205438 Reviewed-by: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-09[release-branch.go1.13] doc: add CherryPickApproved filter to Release ↵Dmitri Shuralyov
History links Not all closed issues in a given minor milestone are included in that release, only the ones that have been labeled as CherryPickApproved are. Update the links to the GitHub issue tracker to include a filter on the CherryPickApproved label, so that the default view shows only the backports that were included in a given release. This should more useful to most people than seeing all backports (considered and approved). Do this only for Go 1.9.1 and newer releases, as that is when we started using the CherryPickCandidate and CherryPickApproved labels. Updates #35988 Fixes #36003 Change-Id: I51e07c1bc3ab9c4a5744e8f668c5470adf78bffe Reviewed-on: https://go-review.googlesource.com/c/go/+/210117 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-04[release-branch.go1.13] go1.13.5go1.13.5Carlos Amedee
Change-Id: I700055da44126e2dfa56f371f9e208f4f727bbed Reviewed-on: https://go-review.googlesource.com/c/go/+/209898 Run-TryBot: Carlos Amedee <carlos@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-12-04[release-branch.go1.13] doc: fix typo in Go 1.12.14 documentCarlos Amedee
Change-Id: I3641a086f167a1337aaaacd2d758b6a42b84a7fb Reviewed-on: https://go-review.googlesource.com/c/go/+/209845 Run-TryBot: Carlos Amedee <carlos@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 98e7270a3d03c2741fc790ea619e5754c49e05ed) Reviewed-on: https://go-review.googlesource.com/c/go/+/209877
2019-12-04[release-branch.go1.13] doc: document Go 1.13.5Carlos Amedee
Change-Id: I289d13ff0a01466d93ebc555eaa81273d4297eb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/209841 Run-TryBot: Carlos Amedee <carlos@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit ebfe0574898c07e0a09a52390df1b282e2b176f7) Reviewed-on: https://go-review.googlesource.com/c/go/+/209843 Run-TryBot: Alexander Rakoczy <alex@golang.org>
2019-12-04[release-branch.go1.13] doc: document Go 1.12.14Carlos Amedee
Change-Id: I7589ef4bdac776c8f141e9cc60f59f8643649310 Reviewed-on: https://go-review.googlesource.com/c/go/+/209840 Reviewed-by: Alexander Rakoczy <alex@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit f805b05b39a28a85017df4540f1770f0d833e3d2) Reviewed-on: https://go-review.googlesource.com/c/go/+/209844 Run-TryBot: Carlos Amedee <carlos@golang.org>
2019-12-04[release-branch.go1.13] cmd/compile: fix spurious R_TLE_LE reloc on android/386Than McIntosh
When compiling for GOARCH=386 GOOS=android, the compiler was attaching R_TLS_LE relocations inappropriately -- as of Go 1.13 the TLS access recipe for Android refers to a runtime symbol and no longer needs this type of relocation (which was causing a crash when the linker tried to process it). Fixes #34825. Change-Id: Ida01875011b524586597b1f7e273aa14e11815d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/200337 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Elias Naur <mail@eliasnaur.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/204100
2019-12-04[release-branch.go1.13] runtime: fix textOff for multiple text sectionsLynn Boger
If a compilation has multiple text sections, code in textOff must compare the offset argument against the range for each text section to determine which one it is in. The comparison looks like this: if uintptr(off) >= sectaddr && uintptr(off) <= sectaddr+sectlen If the off value being compared is equal to sectaddr+sectlen then it is not within the range of the text section but after it. The comparison should be just '<'. Fixes #35211 Change-Id: I114633fd734563d38f4e842dd884c6c239f73c95 Reviewed-on: https://go-review.googlesource.com/c/go/+/203817 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> (cherry picked from commit 0ae9389609f23dc905c58fc2ad7bcc16b770f337) Reviewed-on: https://go-review.googlesource.com/c/go/+/203819 Run-TryBot: Carlos Amedee <carlos@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2019-12-03[release-branch.go1.13] cmd/go/internal/modget: synchronize writes to ↵Carlos Amedee
modOnly map in runGet Adds an additional lock around an access to modOnly. Updates #35317 Fixes #35318 Change-Id: Ia1e75f9a674ec2a2c0489b41283c1cd3e7924d1e Reviewed-on: https://go-review.googlesource.com/c/go/+/209237 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 9174e2c03c423a47bf052b8a1aa844f3378eccd4) Reviewed-on: https://go-review.googlesource.com/c/go/+/209222 Run-TryBot: Alexander Rakoczy <alex@golang.org>
2019-11-26[release-branch.go1.13] cmd/go/internal/modget: synchronize writes to ↵Bryan C. Mills
modOnly map in runGet Updates #35317 Fixes #35318 Change-Id: Id858a25dc16a1bbff1802d25bcd4aca31c1133bc Reviewed-on: https://go-review.googlesource.com/c/go/+/205067 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 7e71c9c3edbf5b7a8608d6f739c20420a618e0ab) Reviewed-on: https://go-review.googlesource.com/c/go/+/205517
2019-11-22[release-branch.go1.13] net/http: fix Server.ConnContext modifying context ↵Roman Kollár
for all new connections Updates #35750 Fixes #35765 Change-Id: I65d38cfc5ddd66131777e104c269cc3559b2471d GitHub-Last-Rev: 953fdfd49b2be665be43f8148d2a6180dae3b91c GitHub-Pull-Request: golang/go#35751 Reviewed-on: https://go-review.googlesource.com/c/go/+/208318 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit bbbc6589dfbc05be2bfa59f51c20f9eaa8d0c531) Reviewed-on: https://go-review.googlesource.com/c/go/+/208235 Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-11-21[release-branch.go1.13] all: base64-encode binaries that will cause Apple ↵Andrew
notarization to fail Starting with macOS 10.15 (Catalina), Apple now requires all software distributed outside of the App Store to be notarized. Any binaries we distribute must abide by a strict set of requirements like code-signing and having a minimum target SDK of 10.9 (amongst others). Apple’s notarization service will recursively inspect archives looking to find notarization candidate binaries. If it finds a binary that does not meet the requirements or is unable to decompress an archive, it will reject the entire distribution. From cursory testing, it seems that the service uses content sniffing to determine file types, so changing the file extension will not work. There are some binaries and archives included in our distribution that are being detected by Apple’s service as potential candidates for notarization or decompression. As these are files used by tests and some are intentionally invalid, we don’t intend to ever make them compliant. As a workaround for this, we base64-encode any binaries or archives that Apple’s notarization service issues a warning for, as these warnings will become errors in January 2020. Updates #34986 Fixes #35748 Change-Id: I106fbb6227b61eb221755568f047ee11103c1680 Reviewed-on: https://go-review.googlesource.com/c/go/+/208118 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 8bbfc51d9ac9ce9472e126cc3654c9a45eceb236) Reviewed-on: https://go-review.googlesource.com/c/go/+/208219 Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-11-07[release-branch.go1.13] internal/reflectlite: update reflectlite to match ↵Ian Lance Taylor
runtime rtype/mapType Similar to tip https://golang.org/cl/197559. Fixes #35408 Change-Id: Ie8e28b93fb3adf23c3a0a39f6917ff76abf44fdf Reviewed-on: https://go-review.googlesource.com/c/go/+/205721 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-10-31[release-branch.go1.13] go1.13.4go1.13.4Andrew Bonventre
Change-Id: If01ea0da089ee94587a378d13b4a2ad1592f1ea7 Reviewed-on: https://go-review.googlesource.com/c/go/+/204642 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-31[release-branch.go1.13] doc: document Go 1.13.4Andrew Bonventre
Change-Id: Ib29e642c56eca96826187f5737d74f8c0430ac3d Reviewed-on: https://go-review.googlesource.com/c/go/+/204677 Run-TryBot: Andrew Bonventre <andybons@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> Reviewed-by: Katie Hockman <katie@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-31[release-branch.go1.13] doc: document Go 1.12.13Andrew Bonventre
Change-Id: Ic65a74e56320adbd76aeef1cf3b19d7906ffe8fe Reviewed-on: https://go-review.googlesource.com/c/go/+/204640 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-25[release-branch.go1.13] syscall: reenable sysctl on iOSJason A. Donenfeld
This was disabled due to a report that the App Store rejects the symbol __sysctl. However, we use the sysctl symbol, which is fine. The __sysctl symbol is used by x/sys/unix, which needs fixing instead. So, this commit reenables sysctl on iOS, so that things like net.InterfaceByName can work again. This reverts CL 193843, CL 193844, CL 193845, and CL 193846. Fixes #35105 Updates #35101 Updates #34133 Updates #35103 Change-Id: Ib8eb9f87b81db24965b0de29d99eb52887c7c60a Reviewed-on: https://go-review.googlesource.com/c/go/+/202778 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/202779 Reviewed-by: Elias Naur <mail@eliasnaur.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-10-23[release-branch.go1.13] net/http: don't cache http2.erringRoundTripper ↵Brad Fitzpatrick
connections Fixes #35087 Updates #34978 Change-Id: I3baf1392ba7366ae6628889c47c343ef702ec438 Reviewed-on: https://go-review.googlesource.com/c/go/+/202078 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 88186e5e232625f9c91d639e0cb90a88c6cf1172) Reviewed-on: https://go-review.googlesource.com/c/go/+/202642 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-10-17[release-branch.go1.13] go1.13.3go1.13.3Alexander Rakoczy
Change-Id: If3364685f08585e3679fb5239bda127f440af473 Reviewed-on: https://go-review.googlesource.com/c/go/+/201826 Run-TryBot: Alexander Rakoczy <alex@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
2019-10-17[release-branch.go1.13] doc: document Go 1.13.3Alexander Rakoczy
Change-Id: Ia571b8aa791578a77ed5c2b8eaf45c9684eea1c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/201820 Reviewed-by: Andrew Bonventre <andybons@golang.org> (cherry picked from commit f95bf8b64bd1c4e53d27dcd39e128a7b4492382f) Reviewed-on: https://go-review.googlesource.com/c/go/+/201825
2019-10-17[release-branch.go1.13] doc: document Go 1.12.12Alexander Rakoczy
Change-Id: I832ba5f32d513b586bb0b02371231786b25631e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/201817 Reviewed-by: Andrew Bonventre <andybons@golang.org> (cherry picked from commit 58e8f7897a0b69fee891af8461e1270d59f4d1a6) Reviewed-on: https://go-review.googlesource.com/c/go/+/201824 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-10-17[release-branch.go1.13] all: merge release-branch.go1.13-security into ↵Katie Hockman
release-branch.go1.13 Change-Id: I4fea3f155e7f7315a536e7b670d7ceba2092555d
2019-10-17[release-branch.go1.13] cmd/go/internal/work: fix error while passing custom ↵Agniva De Sarker
vet tool For GOROOT packages, we were adding -unsafeptr=false to prevent unsafe.Pointer checks. But the flag also got passed to invocations of go vet with a custom vet tool. To prevent this from happening, we add this flag only when no tools are passed. Updates #34053 Fixes #34922 Change-Id: I8bcd637fd8ec423d597fcdab2a0ceedd20786019 Reviewed-on: https://go-review.googlesource.com/c/go/+/200957 Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 902d5aa84f8340752c20b93bfd450a6cefcf3952) Reviewed-on: https://go-review.googlesource.com/c/go/+/201237 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
2019-10-17[release-branch.go1.13-security] go1.13.2go1.13.2Katie Hockman
Change-Id: I057434f66a07bd97e7608e171e48283423d89680 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575987 Reviewed-by: Filippo Valsorda <valsorda@google.com>
2019-10-17[release-branch.go1.13-security] doc: document Go 1.13.2 and Go 1.12.11Katie Hockman
Change-Id: I73f27924046a0a2493330ddc732d1a2fd3f730a5 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575981 Reviewed-by: Filippo Valsorda <valsorda@google.com> Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575983
2019-10-17[release-branch.go1.13-security] cmd/compile: make poset use sufficient ↵zdjones
conditions for OrderedOrEqual When assessing whether A <= B, the poset's OrderedOrEqual has a passing condition which permits A <= B, but is not sufficient to infer that A <= B. This CL removes that incorrect passing condition. Having identified that A and B are in the poset, the method will report that A <= B if any of these three conditions are true: (1) A and B are the same node in the poset. - This means we know that A == B. (2) There is a directed path, strict or not, from A -> B - This means we know that, at least, A <= B, but A < B is possible. (3) There is a directed path from B -> A, AND that path has no strict edges. - This means we know that B <= A, but do not know that B < A. In condition (3), we do not have enough information to say that A <= B, rather we only know that B == A (which satisfies A <= B) is possible. The way I understand it, a strict edge shows a known, strictly-ordered relation (<) but the lack of a strict edge does not show the lack of a strictly-ordered relation. The difference is highlighted by the example in #34802, where a bounds check is incorrectly removed by prove, such that negative indexes into a slice succeed: n := make([]int, 1) for i := -1; i <= 0; i++ { fmt.Printf("i is %d\n", i) n[i] = 1 // No Bounds check, program runs, assignment to n[-1] succeeds!! } When prove is checking the negative/failed branch from the bounds check at n[i], in the signed domain we learn (0 > i || i >= len(n)). Because prove can't learn the OR condition, we check whether we know that i is non-negative so we can learn something, namely that i >= len(n). Prove uses the poset to check whether we know that i is non-negative. At this point the poset holds the following relations as a directed graph: -1 <= i <= 0 -1 < 0 In poset.OrderedOrEqual, we are testing for 0 <= i. In this case, condition (3) above is true because there is a non-strict path from i -> 0, and that path does NOT have any strict edges. Because this condition is true, the poset reports to prove that i is known to be >= 0. Knowing, incorrectly, that i >= 0, prove learns from the failed bounds check that i >= len(n) in the signed domain. When the slice, n, was created, prove learned that len(n) == 1. Because i is also the induction variable for the loop, upon entering the loop, prove previously learned that i is in [-1,0]. So when prove attempts to learn from the failed bounds check, it finds the new fact, i > len(n), unsatisfiable given that it previously learned that i <= 0 and len(n) = 1. Fixes #34807 Change-Id: I235f4224bef97700c3aa5c01edcc595eb9f13afc Reviewed-on: https://go-review.googlesource.com/c/go/+/200759 Run-TryBot: Zach Jones <zachj1@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/201060 Run-TryBot: Alexander Rakoczy <alex@golang.org> Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575398 Reviewed-by: Filippo Valsorda <valsorda@google.com>
2019-10-17[release-branch.go1.13-security] cmd/compile: rename poset method dominates ↵zdjones
to reaches The partially ordered set uses a method named 'dominates' to determine whether two nodes are partially ordered. Dominates does a depth-first search of the DAG, beginning at the source node, and returns true as soon as it finds a path to the target node. In the context of the forest-of-DAGs that makes up the poset, dominates is not necessarily checking dominance, but is checking reachability. See the issue tracker for a more detailed discussion of the difference. Fortunately, reachability is logically correct everywhere dominates is currently used in poset.go. Reachability within a DAG is sufficient to establish the partial ordering (source < target). This CL changes the name of the method (dominates -> reaches) and updates all the comments in the file accordingly. Updates #34807 Change-Id: Ia3a34f7b14b363801d75b05099cfc686035f7d96 Reviewed-on: https://go-review.googlesource.com/c/go/+/192617 Reviewed-by: Giovanni Bajo <rasky@develer.com> Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/201059 Run-TryBot: Alexander Rakoczy <alex@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575397 Reviewed-by: Filippo Valsorda <valsorda@google.com>
2019-10-16[release-branch.go1.13-security] crypto/dsa: prevent bad public keys from ↵Katie Hockman
causing panic dsa.Verify might currently use a nil s inverse in a multiplication if the public key contains a non-prime Q, causing a panic. Change this to check that the mod inverse exists before using it. Fixes CVE-2019-17596 Change-Id: I94d5f3cc38f1b5d52d38dcb1d253c71b7fd1cae7 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/572809 Reviewed-by: Filippo Valsorda <valsorda@google.com> (cherry picked from commit 9119dfb0511326d4485b248b83d4fde19c95d0f7) Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/575233