aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-13[release-branch.go1.11-security] go1.11.3go1.11.3Dmitri Shuralyov
Change-Id: I0933c8d2f635e987db1a36030ef330f77b5ef8a8 Reviewed-on: https://team-review.git.corp.google.com/c/377323 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-13[release-branch.go1.11-security] cmd/go: set user and email in test-local ↵Bryan C. Mills
git repos Some of the builders cannot infer user and email from the builder hostname. Change-Id: I6f343ae41ca7d984797e595867c8210b404b782f Reviewed-on: https://team-review.git.corp.google.com/c/376740 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-12[release-branch.go1.11-security] doc: document Go 1.11.3 and Go 1.10.6Dmitri Shuralyov
Change-Id: I3fe44887a84586d73be01df78a9cbb002c1fc9c5 Reviewed-on: https://team-review.git.corp.google.com/c/376466 Reviewed-by: Filippo Valsorda <valsorda@google.com>
2018-12-07[release-branch.go1.11-security] cmd/go/internal/get: relax pathOK check to ↵Bryan C. Mills
allow any letter This fixes a regression of #18660 with the new path checks. Change-Id: I2dd9adab999e7f810e0e746ad8b75ea9622f56e7 Reviewed-on: https://team-review.git.corp.google.com/c/372706 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-07[release-branch.go1.11-security] cmd/go/internal/get: use a strings.Replacer ↵Bryan C. Mills
in expand This should be a no-op, but produces deterministic (and more correct) behavior if we have accidentally failed to sanitize one of the inputs. Change-Id: I1271d0ffd01a691ec8c84906c4e02d9e2be19c72 Reviewed-on: https://team-review.git.corp.google.com/c/372705 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-07[release-branch.go1.11-security] cmd/go/internal/get: reject Windows ↵Bryan C. Mills
shortnames as path components Change-Id: Ia32d8ec1fc0c4e242f50d8871c0ef3ce315f3c65 Reviewed-on: https://team-review.git.corp.google.com/c/370572 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-07[release-branch.go1.11-security] cmd/go: reject 'get' of paths containing ↵Bryan C. Mills
leading dots or unsupported characters On some platforms, directories beginning with dot are treated as hidden files, and filenames containing unusual characters can be confusing for users to manipulate (and delete). Change-Id: Ia1f5a65b9cff4eeb51cc4dba3ff7c7afabc343f2 Reviewed-on: https://team-review.git.corp.google.com/c/368442 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-12-07[release-branch.go1.11-security] crypto/x509: limit number of signature ↵Filippo Valsorda
checks for each verification That number grows quadratically with the number of intermediate certificates in certain pathological cases (for example if they all have the same Subject) leading to a CPU DoS. Set a fixed budget that should fit all real world chains, given we only look at intermediates provided by the peer. The algorithm can be improved, but that's left for follow-up CLs: * the cache logic should be reviewed for correctness, as it seems to override the entire chain with the cached one * the equality check should compare Subject and public key, not the whole certificate * certificates with the right SKID but the wrong Subject should not be considered, and in particular should not take priority over certificates with the right Subject Change-Id: Ib257c12cd5563df7723f9c81231d82b882854213 Reviewed-on: https://team-review.git.corp.google.com/c/370475 Reviewed-by: Andrew Bonventre <andybons@google.com> (cherry picked from commit 09d57361bc99cbbfb9755ee30ddcb42ff5a9d7d6) Reviewed-on: https://team-review.git.corp.google.com/c/372858 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2018-11-02[release-branch.go1.11] go1.11.2go1.11.2Andrew Bonventre
Change-Id: Idd3527ba8f2329876cbca646aacd97739b9828f7 Reviewed-on: https://go-review.googlesource.com/c/147217 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-02[release-branch.go1.11] doc: document Go 1.11.2Andrew Bonventre
Change-Id: Iaff03911f1807d462f1966590626bd486807f53d Reviewed-on: https://go-review.googlesource.com/c/147178 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit c5d78f512ae6e3867266cfd1cf4cf2194388cbfb) Reviewed-on: https://go-review.googlesource.com/c/147182 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-11-02[release-branch.go1.11] doc: document Go 1.10.5Andrew Bonventre
Change-Id: I11adca150ab795607b832fb354a3e065655e1020 Reviewed-on: https://go-review.googlesource.com/c/147179 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 2764d5ee7b23ae1caf2a4cd4506116a1b9efbf66) Reviewed-on: https://go-review.googlesource.com/c/147181 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-11-01[release-branch.go1.11] go/types: use correct receiver types for embedded ↵Robert Griesemer
interface methods Interface methods don't declare a receiver (it's implicit), but after type-checking the respective *types.Func objects are marked as methods by having a receiver. For interface methods, the receiver base type used to be the interface that declared the method in the first place, even if the method also appeared in other interfaces via embedding. A change in the computation of method sets for interfaces for Go1.10 changed that inadvertently, with the consequence that sometimes a method's receiver type ended up being an interface into which the method was embedded. The exact behavior also depended on file type-checking order, and because files are sometimes sorted by name, the behavior depended on file names. This didn't matter for type-checking (the typechecker doesn't need the receiver), but it matters for clients, and for printing of methods. This change fixes interface method receivers at the end of type-checking when we have all relevant information. Fixes #28249 Updates #28005 Change-Id: I96c120fb0e517d7f8a14b8530f0273674569d5ea Reviewed-on: https://go-review.googlesource.com/c/141358 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-on: https://go-review.googlesource.com/c/146660 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2018-11-01[release-branch.go1.11] database/sql: correctly report MaxIdleClosed statDaniel Theophanes
Previously the MaxIdleClosed counter was incremented when added to the free connection list, rather then when it wasn't added to the free connection list. Flip this logic to correct. Fixes #28325 Change-Id: I405302c14fb985369dab48fbe845e5651afc4ccf Reviewed-on: https://go-review.googlesource.com/c/138578 Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 7db509e682891f3bc501c7b23e32e02c64893557) Reviewed-on: https://go-review.googlesource.com/c/146697 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
2018-11-01[release-branch.go1.11] cmd/trace: don't drop sweep slice detailsHana Kim
For sweep events, we used to modify the ViewerEvent returned from ctx.emitSlice later in order to embed more details about the sweep operation. The trick no longer works after the change https://golang.org/cl/92375 and caused a regression. ctx.emit method encodes the ViewerEvent, so any modification to the ViewerEvent object after ctx.emit returns will not be reflected. Refactor ctx.emitSlice, so ctx.makeSlice can be used when producing slices for SWEEP. ctx.emit* methods are meant to truely emit ViewerEvents. Fixes #27717 Updates #27711 Change-Id: I0b733ebbbfd4facd8714db0535809ec3cab0833d Reviewed-on: https://go-review.googlesource.com/135775 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit e57f24ab39ff6e0ea50c84518e7f91b3a40cf547) Reviewed-on: https://go-review.googlesource.com/c/146698 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-11-01[release-branch.go1.11] cmd/go/internal/modcmd: remove non-existent -dir flagAgniva De Sarker
Updates #27243 Fixes #27498 Change-Id: If9230244938dabd03b9afaa6600310df8f97fe92 Reviewed-on: https://go-review.googlesource.com/131775 Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit 55ef446026748bea0e9bd5aa35132a07297ff734) Reviewed-on: https://go-review.googlesource.com/c/146717 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-30[release-branch.go1.11] internal/poll: advance file position in windows sendfileAlex Brainman
Some versions of Windows (Windows 10 1803) do not set file position after TransmitFile completes. So just use Seek to set file position before returning from sendfile. Fixes #27411 Change-Id: I7a49be10304b5db19dda707b13ac93d338aeb190 Reviewed-on: https://go-review.googlesource.com/131976 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/145779 Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
2018-10-29[release-branch.go1.11] cmd/go, cmd/link: silence bogus Apple Xcode warningRuss Cox
Certain installations of Xcode are affected by a bug that causes them to print an inconsequential link-time warning that looks like: ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking. This has nothing to do with Go, and we've sent this repro case to Apple: $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version version: 10.0.0.0.1.1535735448 $ clang --version Apple LLVM version 10.0.0 (clang-1000.10.44.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin $ cat > issue.c int main() { return 0; } ^D $ clang issue.c -framework CoreFoundation ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking. $ Even if Apple does release a fixed Xcode, many people are seeing this useless warning, and we might as well make it go away. Fixes #26073. Change-Id: Ifc17ba7da1f6b59e233c11ebdab7241cb6656324 Reviewed-on: https://go-review.googlesource.com/c/144112 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> (cherry picked from commit 66bb8ddb956c5ee55b471a019fac2c6817c08ef5) Reviewed-on: https://go-review.googlesource.com/c/145458 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-24[release-branch.go1.11] cmd/go: ensure git attributes are setJason Keene
This change disables the export-subst and export-ignore attributes when creating zip files for modules. This is done to prevent the ziphash for a given repo/revision from differing based on variables such as git version or size of repo. The full rational for this change is detailed here: https://github.com/golang/go/issues/27153#issuecomment-420763082 Fixes #28094 Change-Id: Ib33f525d91d2581fa0b5d26e70d29620c7e685e9 Reviewed-on: https://go-review.googlesource.com/c/135175 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-on: https://go-review.googlesource.com/c/141098 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-10-24[release-branch.go1.11] doc: update docs.html with new tour import pathAndrew Bonventre
As of golang.org/cl/141857 the import path has changed from golang.org/x/tour/gotour to golang.org/x/tour Change-Id: Ib54ab2e50188ef66c8a5c45136babfa49ad6934a Reviewed-on: https://go-review.googlesource.com/c/141917 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 035f9e8102d3b46877b7462fcd365324272d1d0e) Reviewed-on: https://go-review.googlesource.com/c/143617
2018-10-04[release-branch.go1.11] cmd/go: don't mention -mod=releaseMark Rushakoff
The -mod=release flag is not supported, so this appears to be a documentation mistake. Updates #27354. Fixes #27398. Change-Id: I895e8d5b4918adcb1f605361773173f312fa7b65 GitHub-Last-Rev: 42bfe0c11e38c90e76887771654ea81af98d50ec GitHub-Pull-Request: golang/go#27358 Reviewed-on: https://go-review.googlesource.com/132116 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit 014901c5bab2f99af3b1019d5776fa5da6f5bef7) Reviewed-on: https://go-review.googlesource.com/c/139421 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-03[release-branch.go1.11] cmd/compile: fix type of OffPtr in some optimization ↵Cherry Zhang
rules In some optimization rules the type of generated OffPtr was incorrectly set to the type of the pointee, instead of the pointer. When the OffPtr value is spilled, this may generate a spill of the wrong type, e.g. a floating point spill of an integer (pointer) value. On Wasm, this leads to invalid bytecode. Fixes #27961. Change-Id: I5d464847eb900ed90794105c0013a1a7330756cc Reviewed-on: https://go-review.googlesource.com/c/139257 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com> (cherry picked from commit c96e3bcc97a965b3e2947cc1d8d831b8d39c1d73) Reviewed-on: https://go-review.googlesource.com/c/139104 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-10-03[release-branch.go1.11] cmd/compile: don't crash reporting misuse of ↵taylorza
shadowed built-in function The existing implementation causes a compiler panic if a function parameter shadows a built-in function, and then calling that shadowed name. Updates #27356 Fixes #27399 Change-Id: I1ffb6dc01e63c7f499e5f6f75f77ce2318f35bcd Reviewed-on: https://go-review.googlesource.com/132876 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 4a095b87d30f1f6f7ae01e966f1af5ee63b15c1c) Reviewed-on: https://go-review.googlesource.com/c/139103 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-02[release-branch.go1.11] misc/wasm: add mention of polyfill for Edge supportRichard Musiol
Edge supports WebAssembly but not TextEncoder or TextDecoder. This change adds a comment pointing to a polyfill that could be used. The polyfill is not added by default, because we want to let the user decide if/how to include the polyfill. Fixes #27295 Change-Id: I375f58f2168665f549997b368428c398dfbbca1c Reviewed-on: https://go-review.googlesource.com/139037 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit cfb603b0b5fb9c1e72be665b2d65743ddf18c779) Reviewed-on: https://go-review.googlesource.com/139057 Reviewed-by: Richard Musiol <neelance@gmail.com>
2018-10-01[release-branch.go1.11] go1.11.1go1.11.1Katie Hockman
Change-Id: I3cf3e57b11ad02b497276bae1864fc5ade8144b9 Reviewed-on: https://go-review.googlesource.com/138860 Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-10-01[release-branch.go1.11] doc: document Go 1.11.1Katie Hockman
Updates #27953 Change-Id: I2f1a55e15dc5737a5a06bd894c46b2c4705f338c Reviewed-on: https://go-review.googlesource.com/138858 Reviewed-by: Filippo Valsorda <filippo@golang.org> (cherry picked from commit f99fc3a119dbb98fa9dddcb2e31a6c51925fde77) Reviewed-on: https://go-review.googlesource.com/138859 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-10-01[release-branch.go1.11] encoding/json: fix UnmarshalTypeError without field ↵Taesu Pyo
and struct values Updates #26444 Updates #27275 Fixes #27318 Change-Id: I9e8cbff79f7643ca8964c572c1a98172b6831730 GitHub-Last-Rev: 7eea2158b67ccab34b45a21e8f4289c36de02d93 GitHub-Pull-Request: golang/go#26719 Reviewed-on: https://go-review.googlesource.com/126897 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/138178 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-01[release-branch.go1.11] net: concatenate multiple TXT strings in single TXT ↵Matthew Waters
record When go resolver was changed to use dnsmessage.Parser, LookupTXT returned two strings in one record as two different records. This change reverts back to concatenating multiple strings in a single TXT record. Updates #27763 Fixes #27886 Change-Id: Ice226fcb2be4be58853de34ed35b4627acb429ea Reviewed-on: https://go-review.googlesource.com/136955 Reviewed-by: Ian Gudger <igudger@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Gudger <igudger@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 7b3b160323b56b357832549fbab7a60d27688ec1) Reviewed-on: https://go-review.googlesource.com/138177 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
2018-10-01[release-branch.go1.11] reflect: fix s390x reflect method callsKeith Randall
R0 isn't the zero register any more. Oops. Update #27867 Change-Id: I46a975ed37d5e570afe2e228d3edf74949e08ad7 Reviewed-on: https://go-review.googlesource.com/138580 Reviewed-by: Michael Munday <mike.munday@ibm.com> Reviewed-on: https://go-review.googlesource.com/138583 Run-TryBot: Keith Randall <khr@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-01[release-branch.go1.11] reflect: ensure correct scanning of return valuesKeith Randall
During a call to a reflect-generated function or method (via makeFuncStub or methodValueCall), when should we scan the return values? When we're starting a reflect call, the space on the stack for the return values is not initialized yet, as it contains whatever junk was on the stack of the caller at the time. The return space must not be scanned during a GC. When we're finishing a reflect call, the return values are initialized, and must be scanned during a GC to make sure that any pointers in the return values are found and their referents retained. When the GC stack walk comes across a reflect call in progress on the stack, it needs to know whether to scan the results or not. It doesn't know the progress of the reflect call, so it can't decide by itself. The reflect package needs to tell it. This CL adds another slot in the frame of makeFuncStub and methodValueCall so we can put a boolean in there which tells the runtime whether to scan the results or not. This CL also adds the args length to reflectMethodValue so the runtime can restrict its scanning to only the args section (not the results) if the reflect package says the results aren't ready yet. Do a delicate dance in the reflect package to set the "results are valid" bit. We need to make sure we set the bit only after we've copied the results back to the stack. But we must set the bit before we drop reflect's copy of the results. Otherwise, we might have a state where (temporarily) no one has a live copy of the results. That's the state we were observing in issue #27695 before this CL. The bitmap used by the runtime currently contains only the args. (Actually, it contains all the bits, but the size is set so we use only the args portion.) This is safe for early in a reflect call, but unsafe late in a reflect call. The test issue27695.go demonstrates this unsafety. We change the bitmap to always include both args and results, and decide at runtime which portion to use. issue27695.go only has a test for method calls. Function calls were ok because there wasn't a safepoint between when reflect dropped its copy of the return values and when the caller is resumed. This may change when we introduce safepoints everywhere. This truncate-to-only-the-args was part of CL 9888 (in 2015). That part of the CL fixed the problem demonstrated in issue27695b.go but introduced the problem demonstrated in issue27695.go. TODO, in another CL: simplify FuncLayout and its test. stack return value is now identical to frametype.ptrdata + frametype.gcdata. Update #27867 Change-Id: I2d49b34e34a82c6328b34f02610587a291b25c5f Reviewed-on: https://go-review.googlesource.com/137440 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-on: https://go-review.googlesource.com/138582 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-01[release-branch.go1.11] reflect: use correct write barrier operations for ↵Keith Randall
method funcs Fix the code to use write barriers on heap memory, and no write barriers on stack memory. These errors were discovered as part of fixing #27695. They may have something to do with that issue, but hard to be sure. The core cause is different, so this fix is a separate CL. Update #27867 Change-Id: Ib005f6b3308de340be83c3d07d049d5e316b1e3c Reviewed-on: https://go-review.googlesource.com/137438 Reviewed-by: Austin Clements <austin@google.com> (cherry picked from commit e35a41261b19589f40d32bd66274c23ab4b9b32e) Reviewed-on: https://go-review.googlesource.com/138581 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-28[release-branch.go1.11] doc: add go1.11 to contrib.htmlChris Broadfoot
Missing from https://golang.org/project Change-Id: I6cb769ae861a81f0264bae624b5fe8d70aa92497 Reviewed-on: https://go-review.googlesource.com/138356 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2018-09-27[release-branch.go1.11] cmd/go: add GOMIPS value to build id for mipsleIan Lance Taylor
Strip a trailing "le" from the GOARCH value when calculating the GOxxx environment variable that affects it. Updates #27260 Fixes #27420 Change-Id: I081f30d5dc19281901551823f4f56be028b5f71a Reviewed-on: https://go-review.googlesource.com/131379 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 61318d7ffe8a49e9dedc5aa8195a164a3821465c) Reviewed-on: https://go-review.googlesource.com/138176 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-27[release-branch.go1.11] net: fail fast for DNS rcode success with no answers ↵Ian Gudger
of requested type DNS responses which do not contain answers of the requested type return errNoSuchHost, the same error as rcode name error. Prior to golang.org/cl/37879, both cases resulted in no additional name servers being consulted for the question. That CL changed the behavior for both cases. Issue #25336 was filed about the rcode name error case and golang.org/cl/113815 fixed it. This CL fixes the no answers of requested type case as well. Updates #27525 Fixes #27537 Change-Id: I52fadedcd195f16adf62646b76bea2ab3b15d117 Reviewed-on: https://go-review.googlesource.com/133675 Run-TryBot: Ian Gudger <igudger@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 94f48ddb96c4dfc919ae024f64df19d764f5fb5b) Reviewed-on: https://go-review.googlesource.com/138175 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-27[release-branch.go1.11] runtime: ignore races between close and len/capKeith Randall
They aren't really races, or at least they don't have any observable effect. The spec is silent on whether these are actually races or not. Fix this problem by not using the address of len (or of cap) as the location where channel operations are recorded to occur. Use a random other field of hchan for that. I'm not 100% sure we should in fact fix this. Opinions welcome. Fixes #27778 Change-Id: Ib4efd4b62e0d1ef32fa51e373035ef207a655084 Reviewed-on: https://go-review.googlesource.com/135698 Reviewed-by: Dmitry Vyukov <dvyukov@google.com> (cherry picked from commit 83dfc3b001245f0b725afdc94c0b540fe1952d21) Reviewed-on: https://go-review.googlesource.com/138179 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-24[release-branch.go1.11] net/http: ensure null body in Fetch response is not readJohan Brandhorst
The Fetch API returns a null body if there is no response body, on browsers that support streaming the response body. This change ensures we check for both undefined and null bodies before attempting to read the body. Fixes #27424 Change-Id: I0da86b61284fe394418b4b431495e715a037f335 Reviewed-on: https://go-review.googlesource.com/131236 Reviewed-by: Richard Musiol <neelance@gmail.com> Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit ce536837d8e53f1bf0c7ef450d4580d19f7d6f52) Reviewed-on: https://go-review.googlesource.com/136915
2018-09-18[release-branch.go1.11] doc/go1.11, cmd/go: elaborate on new GOFLAGS ↵Dmitri Shuralyov
environment variable In Go 1.11, cmd/go gained support for the GOFLAGS environment variable. It was added and described in detail in CL 126656. Mention it in the Go 1.11 release notes, link to the cmd/go documentation, and add more details there. Fixes #27387. Change-Id: Ifc35bfe3e0886a145478d36dde8e80aedd8ec68e Reviewed-on: https://go-review.googlesource.com/135035 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Rob Pike <r@golang.org> (cherry picked from commit 58c6afe075d74261dd67750e0aab5a1b8460839f) Reviewed-on: https://go-review.googlesource.com/135496 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-09-13[release-branch.go1.11] cmd/compile: prevent overflow in walkinrangeAlberto Donizetti
In the compiler frontend, walkinrange indiscriminately calls Int64() on const CTINT nodes, even though Int64's return value is undefined for anything over 2⁶³ (in practise, it'll return a negative number). This causes the introduction of bad constants during rewrites of unsigned expressions, which make the compiler reject valid Go programs. This change introduces a preliminary check that Int64() is safe to call on the consts on hand. If it isn't, walkinrange exits without doing any rewrite. Fixes #27246 Change-Id: I2017073cae65468a521ff3262d4ea8ab0d7098d9 Reviewed-on: https://go-review.googlesource.com/130735 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> (cherry picked from commit 42cc4ca30a7729a4c6d1bb0bbbc3e4a736ef91c8) Reviewed-on: https://go-review.googlesource.com/131596 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org>
2018-09-12[release-branch.go1.11] go/types: handle nil pointer when panic is written ↵Rebecca Stambler
outside of a function The current implementation crashes when someone writes a panic outside of a function, which makes sense since that is broken code. This fix allows one to type-check broken code. Fixes #27497 Change-Id: I81b90dbd918162a20c60a821340898eaf02e648d Reviewed-on: https://go-review.googlesource.com/132235 Reviewed-by: Alan Donovan <adonovan@google.com> (cherry picked from commit c99687f87aed84342cfe92ae78924f791237c6f6) Reviewed-on: https://go-review.googlesource.com/133395 Reviewed-by: Robert Griesemer <gri@golang.org>
2018-09-11[release-branch.go1.11] cmd/compile: count nil check as use in dead auto elimCherry Zhang
Nil check is special in that it has no use but we must keep it. Count it as a use of the auto. Fixes #27342. Change-Id: I857c3d0db2ebdca1bc342b4993c0dac5c01e067f Reviewed-on: https://go-review.googlesource.com/131955 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 54f9c0416a588963cb5a1c10ffb6a88f3956858c) Reviewed-on: https://go-review.googlesource.com/134615 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-09-11[release-branch.go1.11] runtime/trace: fix syntax errors in NewTask doc exampleCharles Kenney
Fixes #27406 Change-Id: I9c6f5bac5b26558fa7628233c74a62faf676e811 GitHub-Last-Rev: 29d19f719316b486224a15a50556465811985edf GitHub-Pull-Request: golang/go#27437 Reviewed-on: https://go-review.googlesource.com/132775 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit b794ca64d29f3e584cbdf49bde7141d3c12dd2ab) Reviewed-on: https://go-review.googlesource.com/134616 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-09-07[release-branch.go1.11] crypto/x509: allow ":" in Common Name hostnamesFilippo Valsorda
At least one popular service puts a hostname which contains a ":" in the Common Name field. On the other hand, I don't know of any name constrained certificates that only work if we ignore such CNs. Updates #24151 Change-Id: I2d813e3e522ebd65ab5ea5cd83390467a869eea3 Reviewed-on: https://go-review.googlesource.com/134076 Run-TryBot: Filippo Valsorda <filippo@golang.org> Reviewed-by: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 03c703697f321f66d28d6223457622c5879ba37f) Reviewed-on: https://go-review.googlesource.com/134078 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-07[release-branch.go1.11] cmd/go: add -Wl,--export-dynamic to linker flag ↵Ian Lance Taylor
whitelist Fixes #27496 Change-Id: I53538c7697729294a9e50ace26a6a7183131e837 Reviewed-on: https://go-review.googlesource.com/134016 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> (cherry picked from commit 7f57e2236d59b96467635c8adb024f9b7b972790) Reviewed-on: https://go-review.googlesource.com/134056
2018-09-07[release-branch.go1.11] runtime: in semasleep, subtract time spent so far ↵Keith Randall
from timeout When pthread_cond_timedwait_relative_np gets a spurious wakeup (due to a signal, typically), we used to retry with the same relative timeout. That's incorrect, we should lower the timeout by the time we've spent in this function so far. In the worst case, signals come in and cause spurious wakeups faster than the timeout, causing semasleep to never time out. Also fix nacl and netbsd while we're here. They have similar issues. Fixes #27521 Change-Id: I6601e120e44a4b8ef436eef75a1e7c8cf1d39e39 Reviewed-on: https://go-review.googlesource.com/133655 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 2bf1370f4369d75f4fffffc6fc05722bce13481b) Reviewed-on: https://go-review.googlesource.com/134096
2018-09-01[release-branch.go1.11] cmd/compile: in prove, fix fence-post implications ↵Giovanni Bajo
for unsigned domain Fence-post implications of the form "x-1 >= w && x > min ⇒ x > w" were not correctly handling unsigned domain, by always checking signed limits. This bug was uncovered once we taught prove that len(x) is always >= 0 in the signed domain. In the code being miscompiled (s[len(s)-1]), prove checks whether len(s)-1 >= len(s) in the unsigned domain; if it proves that this is always false, it can remove the bound check. Notice that len(s)-1 >= len(s) can be true for len(s) = 0 because of the wrap-around, so this is something prove should not be able to deduce. But because of the bug, the gate condition for the fence-post implication was len(s) > MinInt64 instead of len(s) > 0; that condition would be good in the signed domain but not in the unsigned domain. And since in CL105635 we taught prove that len(s) >= 0, the condition incorrectly triggered (len(s) >= 0 > MinInt64) and things were going downfall. Fixes #27378 Change-Id: I3dbcb1955ac5a66a0dcbee500f41e8d219409be5 Reviewed-on: https://go-review.googlesource.com/132495 Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 09ea3c08e8fd1915515383f8cb4c0bb237d2b87d) Reviewed-on: https://go-review.googlesource.com/132575 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-30[release-branch.go1.11] net: refactor readerAtEOF splice testAndrei Tudor Călin
Refactor TestSplice/readerAtEOF to handle cases where we disable splice on older kernels better. If splice is disabled, net.splice and poll.Splice do not get to observe EOF on the reader, because poll.Splice returns immediately with EINVAL. The test fails unexpectedly, because the splice operation is reported as not handled. This change refactors the test to handle the aforementioned case correctly, by not calling net.splice directly, but using a higher level check. Fixes #27355. Change-Id: I0d5606b4775213f2dbbb84ef82ddfc3bab662a31 Reviewed-on: https://go-review.googlesource.com/132096 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit bd49b3d580731d8f391e40fb9e2f17301651cede) Reviewed-on: https://go-review.googlesource.com/132281 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-30[release-branch.go1.11] doc: add Go 1.11 to release history pageJoe Cortopassi
Fixes #27357 Change-Id: I048fbd88a08e8b17fcda3872ee4c78935d5075d8 GitHub-Last-Rev: a0751eca094d68e9bf005abeb6616eb5b0050190 GitHub-Pull-Request: golang/go#27359 Reviewed-on: https://go-review.googlesource.com/132117 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit d8067d1da60fb890ba656321e1f293bf7b9ee7f7) Reviewed-on: https://go-review.googlesource.com/132118 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-26[release-branch.go1.11] cmd/go: don't let script grep commands match $WORKIan Lance Taylor
If $WORK happens to contain the string that a stdout/stderr/grep command is searching for, a negative grep command will fail incorrectly. Fixes #27170 Fixes #27221 Change-Id: I84454d3c42360fe3295c7235d388381525eb85b4 Reviewed-on: https://go-review.googlesource.com/131398 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit e3106b455b74c91db94e8e1abf2342b5b5aec7b1) Reviewed-on: https://go-review.googlesource.com/131399 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-24[release-branch.go1.11] doc/go1.11: fix typoShenghou Ma
Change-Id: I097bd90f62add7838f8c7baf3b777ad167635354 Reviewed-on: https://go-review.googlesource.com/131357 Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 02367105e608bb7c92fab06c9cbdcd94f5dd2704) Reviewed-on: https://go-review.googlesource.com/131281 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-24[release-branch.go1.11] runtime: mark sigInitIgnored nosplitgo1.11Ian Lance Taylor
The sigInitIgnored function can be called by initsig before a shared library is initialized, before the runtime is initialized. Fixes #27183 Change-Id: I7073767938fc011879d47ea951d63a14d1cce878 Reviewed-on: https://go-review.googlesource.com/131277 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit d20ecd6e5dab55376ea4f169eed63608f9bb3b2b) Reviewed-on: https://go-review.googlesource.com/131278 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-24[release-branch.go1.11] go1.11Andrew Bonventre
Change-Id: Ifd0090a7fee96ae726a84aeece7512b967acf869 Reviewed-on: https://go-review.googlesource.com/131338 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>