aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-25[release-branch.go1.12] go1.12go1.12Andrew Bonventre
Change-Id: I2fa947f75c0ace671ad8b99c4fab3ad7b178cedf Reviewed-on: https://go-review.googlesource.com/c/163725 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-25[release-branch.go1.12] doc: document Go 1.12Andrew
Change-Id: I845375d2b3824211b80885228ba5b45503cba1a6 Reviewed-on: https://go-review.googlesource.com/c/163722 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 8bffb8546cb8ed1c849989ddf2b151edc983a616) Reviewed-on: https://go-review.googlesource.com/c/163723 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-02-25[release-branch.go1.12] doc/go1.12: remove draft noticeAndrew
Change-Id: Ib6a0f5c35b1efc3f3c8e7ca2a5c4f35bf8bf5e5d Reviewed-on: https://go-review.googlesource.com/c/163720 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 9d26ec85fc5657409d415caf647b11f614dd48c8) Reviewed-on: https://go-review.googlesource.com/c/163721 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-02-25[release-branch.go1.12] doc/go1.12: change go install to go getAndrew
Using go get prevents the failure case of when the user doesn't have the repo on their machine. Change-Id: I9c1174087728b5b06b578b0d52df6eeb7e8c7a3c Reviewed-on: https://go-review.googlesource.com/c/163718 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 2f9728aacdf90d21a530f68c6887cfe545954935) Reviewed-on: https://go-review.googlesource.com/c/163719 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-02-25[release-branch.go1.12] cmd/compile: call ginsnop, not ginsnop2 on ppc64le ↵Lynn Boger
for mid-stack inlining tracebacks A recent change to fix stacktraces for inlined functions introduced a regression on ppc64le when compiling position independent code. That happened because ginsnop2 was called for the purpose of inserting a NOP to identify the location of the inlined function, when ginsnop should have been used. ginsnop2 is intended to be used before deferreturn to ensure r2 is properly restored when compiling position independent code. In some cases the location where r2 is loaded from might not be initialized. If that happens and r2 is used to generate an address, the result is likely a SEGV. This fixes that problem. Fixes #30283 Change-Id: If70ef27fc65ef31969712422306ac3a57adbd5b6 Reviewed-on: https://go-review.googlesource.com/c/163337 Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 2d3474043cd35ba06d3566df520e8550c479944f) Reviewed-on: https://go-review.googlesource.com/c/163717 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-25[release-branch.go1.12] cmd/compile: guard against loads with negative ↵Cherry Zhang
offset from readonly constants CL 154057 adds guards agaist out-of-bound reads from readonly constants. It turns out that in dead code, the offset can also be negative. Guard against negative offset as well. Fixes #30257. Change-Id: I47c2a2e434dd466c08ae6f50f213999a358c796e Reviewed-on: https://go-review.googlesource.com/c/162819 Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit dca707b2a040642bb46aa4da4fb4eb6188cc2502) Reviewed-on: https://go-review.googlesource.com/c/162827 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-22[release-branch.go1.12] crypto/rc4: remove false guarantees from Reset docs ↵Filippo Valsorda
and deprecate it Nothing in Go can truly guarantee a key will be gone from memory (see #21865), so remove that claim. That makes Reset useless, because unlike most Reset methods it doesn't restore the original value state, so deprecate it. Change-Id: I6bb0f7f94c7e6dd4c5ac19761bc8e5df1f9ec618 Reviewed-on: https://go-review.googlesource.com/c/162297 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit b35dacaac57b039205d9b07ea24098e2c3fcb12e) Reviewed-on: https://go-review.googlesource.com/c/163438
2019-02-22[release-branch.go1.12] cmd/compile: flow interface data to heap if ↵Cherry Zhang
CONVIFACE of a non-direct interface escapes Consider the following code: func f(x []*T) interface{} { return x } It returns an interface that holds a heap copy of x (by calling convT2I or friend), therefore x escape to heap. The current escape analysis only recognizes that x flows to the result. This is not sufficient, since if the result does not escape, x's content may be stack allocated and this will result a heap-to-stack pointer, which is bad. Fix this by realizing that if a CONVIFACE escapes and we're converting from a non-direct interface type, the data needs to escape to heap. Running "toolstash -cmp" on std & cmd, the generated machine code are identical for all packages. However, the export data (escape tags) differ in the following packages. It looks to me that all are similar to the "f" above, where the parameter should escape to heap. io/ioutil/ioutil.go:118 old: leaking param: r to result ~r1 level=0 new: leaking param: r image/image.go:943 old: leaking param: p to result ~r0 level=1 new: leaking param content: p net/url/url.go:200 old: leaking param: s to result ~r2 level=0 new: leaking param: s (as a consequence) net/url/url.go:183 old: leaking param: s to result ~r1 level=0 new: leaking param: s net/url/url.go:194 old: leaking param: s to result ~r1 level=0 new: leaking param: s net/url/url.go:699 old: leaking param: u to result ~r0 level=1 new: leaking param: u net/url/url.go:775 old: (*URL).String u does not escape new: leaking param content: u net/url/url.go:1038 old: leaking param: u to result ~r0 level=1 new: leaking param: u net/url/url.go:1099 old: (*URL).MarshalBinary u does not escape new: leaking param content: u flag/flag.go:235 old: leaking param: s to result ~r0 level=1 new: leaking param content: s go/scanner/errors.go:105 old: leaking param: p to result ~r0 level=0 new: leaking param: p database/sql/sql.go:204 old: leaking param: ns to result ~r0 level=0 new: leaking param: ns go/constant/value.go:303 old: leaking param: re to result ~r2 level=0, leaking param: im to result ~r2 level=0 new: leaking param: re, leaking param: im go/constant/value.go:846 old: leaking param: x to result ~r1 level=0 new: leaking param: x encoding/xml/xml.go:518 old: leaking param: d to result ~r1 level=2 new: leaking param content: d encoding/xml/xml.go:122 old: leaking param: leaking param: t to result ~r1 level=0 new: leaking param: t crypto/x509/verify.go:506 old: leaking param: c to result ~r8 level=0 new: leaking param: c crypto/x509/verify.go:563 old: leaking param: c to result ~r3 level=0, leaking param content: c new: leaking param: c crypto/x509/verify.go:615 old: (nothing) new: leaking closure reference c crypto/x509/verify.go:996 old: leaking param: c to result ~r1 level=0, leaking param content: c new: leaking param: c net/http/filetransport.go:30 old: leaking param: fs to result ~r1 level=0 new: leaking param: fs net/http/h2_bundle.go:2684 old: leaking param: mh to result ~r0 level=2 new: leaking param content: mh net/http/h2_bundle.go:7352 old: http2checkConnHeaders req does not escape new: leaking param content: req net/http/pprof/pprof.go:221 old: leaking param: name to result ~r1 level=0 new: leaking param: name cmd/internal/bio/must.go:21 old: leaking param: w to result ~r1 level=0 new: leaking param: w Fixes #29353. Change-Id: I7e7798ae773728028b0dcae5bccb3ada51189c68 Reviewed-on: https://go-review.googlesource.com/c/162829 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: David Chase <drchase@google.com> (cherry picked from commit 0349f29a55fc194e3d51f748ec9ddceab87a5668) Reviewed-on: https://go-review.googlesource.com/c/163203 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-21[release-branch.go1.12] crypto/tls: don't select RSA-PSS for client ↵Filippo Valsorda
certificates in TLS 1.2 In https://golang.org/cl/160998, RSA-PSS was disabled for (most of) TLS 1.2. One place where we can't disable it is in a Client Hello which offers both TLS 1.2 and 1.3: RSA-PSS is required by TLS 1.3, so to offer TLS 1.3 we need to offer RSA-PSS, even if the server might select TLS 1.2. The good news is that we want to disable RSA-PSS mostly when we are the signing side, as that's where broken crypto.Signer implementations will bite us. So we can announce RSA-PSS in the Client Hello, tolerate the server picking TLS 1.2 and RSA-PSS for their signatures, but still not do RSA-PSS on our side if asked to provide a client certificate. Client-TLSv12-ClientCert-RSA-PSS-Disabled changed because it was indeed actually using RSA-PSS. Updates #30055 Change-Id: I5ecade744b666433b37847abf55e1f08089b21d4 Reviewed-on: https://go-review.googlesource.com/c/163039 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
2019-02-17[release-branch.go1.12] database/sql/driver: fix typoZhou Peng
Change-Id: I6e7035db4b3e2a09e5655eb7646eea9d99fb7118 Reviewed-on: https://go-review.googlesource.com/c/162917 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 4c89a10fb9f4fcb2ed01b6e7325e53b4bc487fc2) Reviewed-on: https://go-review.googlesource.com/c/162889 Reviewed-by: Zhou Peng <p@ctriple.cn>
2019-02-16[release-branch.go1.12] doc/go1.12: document net/url.Parse now rejecting ↵Brad Fitzpatrick
ASCII CTLs Updates #27302 Updates #22907 Change-Id: Iac6957f3517265dfb9c662efb7af31192e3bfd6c Reviewed-on: https://go-review.googlesource.com/c/162960 Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit ef454fd586ee30d8b35b5895320619ebde2beb98) Reviewed-on: https://go-review.googlesource.com/c/162826
2019-02-15[release-branch.go1.12] cmd/go: add newline after module-requires-version ↵Ian Lance Taylor
message Updates #30263 Change-Id: Iefb3d8baf815c19eaf915a59048e1da799ca0cdf Reviewed-on: https://go-review.googlesource.com/c/162957 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit e1acd854f754f496be341211e9deee53fc7e3404) Reviewed-on: https://go-review.googlesource.com/c/162958
2019-02-15[release-branch.go1.12] syscall: skip TestSyscallNoError when temp dir is ↵Brad Fitzpatrick
mounted nosuid Fixes #30258 Change-Id: I73b63eb9d3aca00f562fdc3af010e96269bb6b9c Reviewed-on: https://go-review.googlesource.com/c/162891 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org> (cherry picked from commit 5fcc24074f8e48cd8404bd250c2c268aca2bc3d2) Reviewed-on: https://go-review.googlesource.com/c/162818 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
2019-02-14[release-branch.go1.12] net/http/httptrace: fix typoberkant ipek
Change-Id: I15279e4aa9306bde925929907a7b5e7ef5d8b642 GitHub-Last-Rev: 6bc2d66aecd424b322ec0c23b280e74cb22e08c3 GitHub-Pull-Request: golang/go#30193 Reviewed-on: https://go-review.googlesource.com/c/162018 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 1edd2a34c1bcf2133b659878e8b59e401eb8cc24) Reviewed-on: https://go-review.googlesource.com/c/162359 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-14[release-branch.go1.12] doc/go1.12: soften, expand crypto/rc4 assembly ↵Brad Fitzpatrick
removal text Change-Id: I46fa43f6c5ac49386f4622e1363d8976f49c0894 Reviewed-on: https://go-review.googlesource.com/c/162019 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit c75ee696c341cef94b00409b3692f3df82af1c71) Reviewed-on: https://go-review.googlesource.com/c/162357
2019-02-14[release-branch.go1.12] doc/go1.12: note that Go 1.12 is the last release to ↵Brad Fitzpatrick
include godoc Updates #30029 Change-Id: I88e09035d675e7a6855ada0262eb42636c9822cc Reviewed-on: https://go-review.googlesource.com/c/162417 Reviewed-by: Andrew Bonventre <andybons@golang.org> (cherry picked from commit 7cf31d8f4116420e396c5e8690c043b2ce83f90a) Reviewed-on: https://go-review.googlesource.com/c/162557
2019-02-13[release-branch.go1.12] os: don't return ENOENT if directory removed before ↵Ian Lance Taylor
Fstatat Updates #30197 Change-Id: I08b592fbd477d6879eb5d3b7fcbbc8322ea90103 Reviewed-on: https://go-review.googlesource.com/c/162078 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 cf4dc25503e6fb630280f8de0f11112aecb94b57) Reviewed-on: https://go-review.googlesource.com/c/162197
2019-02-13[release-branch.go1.12] crypto/tls, runtime: document GODEBUG TLS 1.3 optionBrad Fitzpatrick
Change-Id: I6801676335924414ce50249df2b7bea08886b203 Reviewed-on: https://go-review.googlesource.com/c/162360 Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit 48bb61166711f47eb401f245c704a5a4887d4503) Reviewed-on: https://go-review.googlesource.com/c/162497
2019-02-13[release-branch.go1.12] runtime: scan gp._panic in stack scanCherry Zhang
In runtime.gopanic, the _panic object p is stack allocated and referenced from gp._panic. With stack objects, p on stack is dead at the point preprintpanics runs. gp._panic points to p, but stack scan doesn't look at gp. Heap scan of gp does look at gp._panic, but it stops and ignores the pointer as it points to the stack. So whatever p points to may be collected and clobbered. We need to scan gp._panic explicitly during stack scan. To test it reliably, we introduce a GODEBUG mode "clobberfree", which clobbers the memory content when the GC frees an object. Fixes #30150. Change-Id: I11128298f03a89f817faa221421a9d332b41dced Reviewed-on: https://go-review.googlesource.com/c/161778 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Austin Clements <austin@google.com> (cherry picked from commit af8f4062c24cb36af4dc24fbaffd23aa7f7bde36) Reviewed-on: https://go-review.googlesource.com/c/162358 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2019-02-13[release-branch.go1.12] doc: don't use "go tool vet" as an exampleIan Lance Taylor
Updates #30199 Change-Id: Ib4586e3facb8c0985c8882482d94843b648b9d2f Reviewed-on: https://go-review.googlesource.com/c/162257 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 ffd096db2b1cff6399eb1f86e5652564ee8ee362) Reviewed-on: https://go-review.googlesource.com/c/162238 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-02-11[release-branch.go1.12] go1.12rc1go1.12rc1Andrew Bonventre
Change-Id: Iac838b852061a8469e4e201670a589fa2bed9f04 Reviewed-on: https://go-review.googlesource.com/c/161900 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-11cmd/go/internal/modcmd: use replaced paths to break cycles in 'go mod tidy'Bryan C. Mills
Fixes #30166 Change-Id: I4704b57ed48197f512cd1b818e1f7d2fffc0d9ce Reviewed-on: https://go-review.googlesource.com/c/161898 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-10doc: remove last pieces of advice to set GOROOTDaniel Martí
install.html still insisted that GOROOT must be set if a binary install of Go is set up in a custom directory. However, since 1.10, this has been unnecessary as the GOROOT will be found based on the location of the 'go' binary being run. Likewise, install-source.html includes an 'export GOROOT' line in a section that only talks about explicitly setting GOARCH and GOOS, which is optional. We don't want to have users think it is recommended to set GOROOT here either, so remove the unnecessary line. Change-Id: I7dfef09f9a1d003e0253b793d63ea40d5cf1837f Reviewed-on: https://go-review.googlesource.com/c/161758 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-09sync/atomic: add 32-bit MIPS to the 64-bit alignment requirementIan Lance Taylor
runtime/internal/atomic/atomic_mipsx.go enforces 64-bit alignment. Change-Id: Ifdc36e1c0322827711425054d10f1c52425a13fa Reviewed-on: https://go-review.googlesource.com/c/161697 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-09doc: fix typosalkesh26
Change-Id: I46046cddceff2d44a7b2517db1ebf7acdf5f2b90 GitHub-Last-Rev: 7fb9f26476d2764f07d068ce612bf79b1e7f44b4 GitHub-Pull-Request: golang/go#30144 Reviewed-on: https://go-review.googlesource.com/c/161718 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-08database/sql: document Stmt lifetimeJustin Li
When prepared on a DB, prepared statement code in database/sql handles everything to keep the prepared statement alive as it moves across the connection pool. Understanding this is an important part of using this API correctly, but it was only documented indirectly via `(*Tx) Prepare*`. Change-Id: Ic8757e0150d59e675d9f0252f6c15aef2cc2e831 GitHub-Last-Rev: 55dba87458542cb631baac80aeea0c3607d8f421 GitHub-Pull-Request: golang/go#29890 Reviewed-on: https://go-review.googlesource.com/c/159077 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
2019-02-07crypto/tls: disable RSA-PSS in TLS 1.2Filippo Valsorda
Most of the issues that led to the decision on #30055 were related to incompatibility with or faulty support for RSA-PSS (#29831, #29779, v1.5 signatures). RSA-PSS is required by TLS 1.3, but is also available to be negotiated in TLS 1.2. Altering TLS 1.2 behavior based on GODEBUG=tls13=1 feels surprising, so just disable RSA-PSS entirely in TLS 1.2 until TLS 1.3 is on by default, so breakage happens all at once. Updates #30055 Change-Id: Iee90454a20ded8895e5302e8bcbcd32e4e3031c2 Reviewed-on: https://go-review.googlesource.com/c/160998 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
2019-02-07crypto/tls: make TLS 1.3 opt-inFilippo Valsorda
Updates #30055 Change-Id: If68615c8e9daa4226125dcc6a6866f29f3cfeef1 Reviewed-on: https://go-review.googlesource.com/c/160997 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2019-02-07crypto/x509: consider parents by Subject if AKID has no matchFilippo Valsorda
If a certificate somehow has an AKID, it should still chain successfully to a parent without a SKID, even if the latter is invalid according to RFC 5280, because only the Subject is authoritative. This reverts to the behavior before #29233 was fixed in 770130659. Roots with the right subject will still be shadowed by roots with the right SKID and the wrong subject, but that's been the case for a long time, and is left for a more complete fix in Go 1.13. Updates #30079 Change-Id: If8ab0179aca86cb74caa926d1ef93fb5e416b4bb Reviewed-on: https://go-review.googlesource.com/c/161097 Reviewed-by: Adam Langley <agl@golang.org>
2019-02-06test/chan: fix broken link to Squinting at Power SeriesYasser Abdolmaleki
Change-Id: Idee94a1d93555d53442098dd7479982e3f5afbba Reviewed-on: https://go-review.googlesource.com/c/161339 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-05crypto/x509: improve CertificateRequest docsFilippo Valsorda
Change-Id: If3bab2dd5278ebc621235164e9d6ff710ba326ee Reviewed-on: https://go-review.googlesource.com/c/160898 Reviewed-by: Adam Langley <agl@golang.org>
2019-02-05doc: fix a typoalkesh26
Change-Id: Ia830f59d6f6ca1bc506ec298ccfc154d9f94f01d GitHub-Last-Rev: 3ab18d4fd1a8d4295713cbb7ff74f30b3838b6d3 GitHub-Pull-Request: golang/go#30067 Reviewed-on: https://go-review.googlesource.com/c/160829 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-05doc: go1.12: document FreeBSD 12.0 requires COMPAT_FREEBSD11Yuval Pavel Zholkover
Fixes #22447 Fixes #22448 Change-Id: Ia24f42c31e014c79040ff927f1247dfb2318de4f Reviewed-on: https://go-review.googlesource.com/c/160778 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-02-04cmd/go: clarify @none effect on dependants modulesAlberto Donizetti
Expand modules documentation to clarify why @none is useful. The wording is the one suggested by rsc on the issue. Fixes #26684 Change-Id: I76dc4ff87e50f1dd8536fd9ac1fd938adb29bee3 Reviewed-on: https://go-review.googlesource.com/c/161037 Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-02-04crypto/aes: replace broken extenal link to FIPS 197spring1843
Change-Id: Ib0a0d04aaaaa3c213fdb8646bd9b7dfdadae40d4 Reviewed-on: https://go-review.googlesource.com/c/160831 Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-02-04cmd/cgo: don't copy a simple variable x in &x[0]Ian Lance Taylor
Fixes #30065 Change-Id: I3d0fb03bab397548653d5f3b386cfe2980ac1030 Reviewed-on: https://go-review.googlesource.com/c/160830 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2019-02-01cmd/compile: fix crash when memmove argument is not the right typeKeith Randall
Make sure the argument to memmove is of pointer type before we try to get the element type. This has been noticed for code that uses unsafe+linkname so it can call runtime.memmove. Probably not the best thing to allow, but the code is out there and we'd rather not break it unnecessarily. Fixes #30061 Change-Id: I334a8453f2e293959fd742044c43fbe93f0b3d31 Reviewed-on: https://go-review.googlesource.com/c/160826 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-01reflect: eliminate write barrier for copying result in callReflectCherry Zhang
We are copying the results to uninitialized stack space. Write barrier is not needed. Fixes #30041. Change-Id: Ia91d74dbafd96dc2bd92de0cb479808991dda03e Reviewed-on: https://go-review.googlesource.com/c/160737 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2019-02-01doc: go1.12: update notes on go directiveIan Lance Taylor
Fixes #30043 Change-Id: I4ecfff7d8a9432240c1927f7484786fe1182b773 Reviewed-on: https://go-review.googlesource.com/c/160797 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-01cmd/cgo: ignore unrecognized GCC warning group pragmasYuval Pavel Zholkover
CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update #29962 Update #27619 Change-Id: I78264ac5d8d17eeae89a982e89aac988eb22b286 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-01-31runtime: add credit system for scavengingMichael Anthony Knyszek
When scavenging small amounts it's possible we over-scavenge by a significant margin since we choose to scavenge the largest spans first. This over-scavenging is never accounted for. With this change, we add a scavenge credit pool, similar to the reclaim credit pool. Any time scavenging triggered by RSS growth starts up, it checks if it can cash in some credit first. If after using all the credit it still needs to scavenge, then any extra it does it adds back into the credit pool. This change mitigates the performance impact of golang.org/cl/159500 on the Garbage benchmark. On Go1 it suggests some improvements, but most of that is within the realm of noise (Revcomp seems very sensitive to GC-related changes, both postively and negatively). Garbage: https://perf.golang.org/search?q=upload:20190131.5 Go1: https://perf.golang.org/search?q=upload:20190131.4 Performance change with both changes: Garbage: https://perf.golang.org/search?q=upload:20190131.7 Go1: https://perf.golang.org/search?q=upload:20190131.6 Change-Id: I87bd3c183e71656fdafef94714194b9fdbb77aa2 Reviewed-on: https://go-review.googlesource.com/c/160297 Reviewed-by: Austin Clements <austin@google.com>
2019-01-31runtime: scavenge memory upon allocating from scavenged memoryMichael Anthony Knyszek
Because scavenged and unscavenged spans no longer coalesce, memory that is freed no longer has a high likelihood of being re-scavenged. As a result, if an application is allocating at a fast rate, it may work fast enough to undo all the scavenging work performed by the runtime's current scavenging mechanisms. This behavior is exacerbated by the global best-fit allocation policy the runtime uses, since scavenged spans are just as likely to be chosen as unscavenged spans on average. To remedy that, we treat each allocation of scavenged space as a heap growth, and scavenge other memory to make up for the allocation. This change makes performance of the runtime slightly worse, as now we're scavenging more often during allocation. The regression is particularly obvious with the garbage benchmark (3%) but most of the Go1 benchmarks are within the margin of noise. A follow-up change should help. Garbage: https://perf.golang.org/search?q=upload:20190131.3 Go1: https://perf.golang.org/search?q=upload:20190131.2 Updates #14045. Change-Id: I44a7e6586eca33b5f97b6d40418db53a8a7ae715 Reviewed-on: https://go-review.googlesource.com/c/159500 Reviewed-by: Austin Clements <austin@google.com>
2019-01-30cmd/cgo: disable GCC 9 warnings triggered by cgo codeIan Lance Taylor
GCC 9 has started emitting warnings when taking the address of a field in a packed struct may cause a misaligned pointer. We use packed structs in cgo to ensure that our field layout matches the C compiler's layout. Our pointers are always aligned, so disable the warning Fixes #29962 Change-Id: I7e290a7cf694a2c2958529e340ebed9fcd62089c Reviewed-on: https://go-review.googlesource.com/c/159859 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-01-30CONTRIBUTORS: second round of updates for Go 1.12Dmitri Shuralyov
This update has been automatically generated using the updatecontrib command at CL 160277: cd gotip go run golang.org/x/build/cmd/updatecontrib Actions taken (relative to CONTRIBUTORS at origin/master): Added Aaron Cannon <cannona@fireantproductions.com> Added Andzej Maciusovic <andzej.maciusovic@gmail.com> Added Douglas Danger Manley <doug.manley@gmail.com> Added Federico Bond <federicobond@gmail.com> Added Frew Schmidt <github@frew.co> Added GitHub User @saitarunreddy (21041941) <saitarunreddypalla@gmail.com> Added GitHub User @tell-k (26263) <ffk2005@gmail.com> Added Guilherme Caruso <gui.martinscaruso@gmail.com> Added Jay Taylor <outtatime@gmail.com> Added Juan Pablo Civile <elementohb@gmail.com> Added Julien Kauffmann <julien.kauffmann@freelan.org> Added Maya Rashish <maya@NetBSD.org> Added Parminder Singh <parmsingh101@gmail.com> Added Peter Dotchev <dotchev@gmail.com> Added Quinten Yearsley <qyearsley@chromium.org> Added Ross Smith II <ross@smithii.com> Added Sean Chen <oohcode@gmail.com> Added Sebastiaan van Stijn <github@gone.nl> Added Sebastian Schmidt <yath@google.com> Added Sebastien Williams-Wynn <sebastien@cytora.com> Added Viacheslav Poturaev <vearutop@gmail.com> Added Yohei Takeda <yo.tak0812@gmail.com> Used GitHub User @saitarunreddy (21041941) form for saitarunreddy <saitarunreddypalla@gmail.com> https://github.com/golang/build/commit/269e03a [build] Used GitHub User @tell-k (26263) form for tell-k <ffk2005@gmail.com> https://github.com/golang/tools/commit/85a87a81 [tools] Used GitHub name "Akhil Indurti" for smasher164 <aindurti@gmail.com> https://github.com/golang/go/commit/a7af474359 [build go] Used GitHub name "Guilherme Caruso" for GuilhermeCaruso <gui.martinscaruso@gmail.com> https://github.com/golang/go/commit/5fae09b738 [go] Used GitHub name "Ivan Markin" for nogoegst <nogoegst@users.noreply.github.com> https://github.com/golang/go/commit/a1addf15df [go] Used GitHub name "Keiji Yoshida" for yosssi <yoshida.keiji.84@gmail.com> https://github.com/golang/lint/commit/ac6833c [lint] Used GitHub name "Marwan Sulaiman" for marwan-at-work <marwan.sameer@gmail.com> https://github.com/golang/go/commit/92caeef892 [go] Used GitHub name "Michalis Kargakis" for kargakis <mkargaki@redhat.com> https://github.com/golang/go/commit/e243d242d7 [go] Used GitHub name "Robin Eklind" for mewmew <rnd0x00@gmail.com> https://github.com/golang/go/commit/b8620afb8d [go proposal.git] Used GitHub name "Sean Chen" for two <oohcode@gmail.com> https://github.com/golang/sys/commit/302c3dd [sys] Used GitHub name "Sebastien Williams-Wynn" for GiantsLoveDeathMetal <sebastien@cytora.com> https://github.com/golang/go/commit/4e056ade24 [go] Used GitHub name "Yohei Takeda" for yo-tak <yo.tak0812@gmail.com> https://github.com/golang/go/commit/8b7cf898af [go] Given that the scope of updatecontrib is only to add contributors to CONTRIBUTORS file, without having to check CLAs or deal with legal matters, we can relax the requirement of having a space in the name before it gets added to the CONTRIBUTORS file. That will be done in a later change. Updates #12042 Change-Id: I70248f3c82a836ee829256898e931e638ee45eb4 Reviewed-on: https://go-review.googlesource.com/c/160261 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-30doc: note go tool tour removal in 1.12 release notesAlberto Donizetti
Note the removal of the go tool tour command in the Go 1.12 release notes. Updates #24819 Change-Id: I258ab9401ea2cc06a83328c67299376fcf23c980 Reviewed-on: https://go-review.googlesource.com/c/158618 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-01-30os: treat EACCES as a permission error in RemoveAllIan Lance Taylor
Fixes #29983 Change-Id: I24077bde991e621c23d00973b2a77bb3a18e4ae7 Reviewed-on: https://go-review.googlesource.com/c/160180 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Damien Neil <dneil@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-01-30os: restore RemoveAll docs by making a single copyIan Lance Taylor
Updates #29983 Change-Id: Ifdf8aa9c92e053374e301a4268d85e277c15f0b5 Reviewed-on: https://go-review.googlesource.com/c/160182 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-30doc: remove meaningless word from Go 1.12 release notesIan Lance Taylor
Change-Id: I744940e2bbde19ccec53af6c5469d46ba9161f01 Reviewed-on: https://go-review.googlesource.com/c/160179 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2019-01-30os: make openFdAt act like openFileNologIan Lance Taylor
- add EINTR loop on Darwin - return PathError on error - call newFile rather than NewFile This tries to minimize the possibility of any future changes. It would be nice to put openFdAt in the same file as openFileNolog, but build tags forbid. Updates #29983 Change-Id: I866002416d6473fbfd80ff6ef09b2bc4607f2934 Reviewed-on: https://go-review.googlesource.com/c/160181 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
2019-01-29net/url, net/http: relax CTL-in-URL validation to only ASCII CTLsBrad Fitzpatrick
CL 159157 was doing UTF-8 decoding of URLs. URLs aren't really UTF-8, even if sometimes they are in some contexts. Instead, only reject ASCII CTLs. Updates #27302 Updates #22907 Change-Id: Ibd64efa5d3a93263d175aadf1c9f87deb4670c62 Reviewed-on: https://go-review.googlesource.com/c/160178 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>