aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-07[release-branch.go1.9] go1.9rc2go1.9rc2Chris Broadfoot
Change-Id: If95cec0ec7e32cdb450818c4c55e2d03b847ab65 Reviewed-on: https://go-review.googlesource.com/53630 Reviewed-by: Austin Clements <austin@google.com>
2017-08-07[release-branch.go1.9] all: merge master into release-branch.go1.9Chris Broadfoot
579120323f runtime: mapassign_* should use typedmemmove to update keys 380525598c all: remove some manual hyphenation f096b5b340 runtime: mark activeModules nosplit/nowritebarrier 3e3da54633 math/bits: fix example for OnesCount64 9b1e7cf2ac math/bits: add examples for OnesCount functions b01db023b1 misc/cgo/testsanitizers: also skip tsan11/tsan12 when using GCC a279b53a18 reflect: document how DeepEqual handles cycles 909f409a8d doc: mention handling of moved GOROOT in 1.9 release notes 58ad0176ca doc: use better wording to explain type-aware completion 92dac21d29 doc: replace paid with commercial 9bb98e02de doc/1.9: add CL 43712, ReverseProxy of HTTP/2 trailers to the release notes. 78d74fc2cd doc: clarify that Gogland is for paid IntelliJ platform IDEs 5495047223 doc/1.9: fix broken html link in CL 53030/53210 890e0e862f doc: fix bad link in go1.9 release notes be596f049a doc/1.9: fix stray html in CL 53030 0173631d53 encoding/binary: add examples for varint functions ac0ccf3cd2 doc/1.9: add CL 36696 for crypto/x509 to the release notes cc402c2c4d doc: hide blog content for golang.google.cn f396fa4285 internal/poll: don't add non-sockets to runtime poller 664cd26c89 cmd/vet: don't exit with failure on type checking error a8730cd93a doc: hide video and share if being served from CN b63db76c4a testsanitizers: check that tsan program runs, skip tsan10 on gcc 193eda7291 time: skip ZoneAbbr test in timezones with no abbreviation 6f08c935a9 cmd/go: show examples with empty output in go test -list f20944de78 cmd/compile: set/unset base register for better assembly print 623e2c4603 runtime: map bitmap and spans during heap initialization 780249eed4 runtime: fall back to small mmaps if we fail to grow reservation 31b2c4cc25 .github: add .md extension to SUPPORT file ac29f30dbb plugin: mention that there are known bugs with plugins 45a4609c0a cmd/dist: skip moved GOROOT on Go's Windows builders when not sharding tests e157fac02d test: add README 835dfef939 runtime/pprof: prevent a deadlock that SIGPROF might create on mips{,le} df91b8044d doc: list editor options by name, not plugin name 3d9475c04b doc: cleanup editor page b9661a14ea doc: add Atom to editor guide ee392ac10c cmd/compile: consider exported flag in namedata Change-Id: I3a48493e8c05d97cb3b61635503ef0ccd646e5cb
2017-08-07runtime: mapassign_* should use typedmemmove to update keysKeith Randall
We need to make sure that when the key contains a pointer, we use a write barrier to update the key. Also mapdelete_* should use typedmemclr. Fixes #21297 Change-Id: I63dc90bec1cb909c2c6e08676c9ec853d736cdf8 Reviewed-on: https://go-review.googlesource.com/53414 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-06all: remove some manual hyphenationJosh Bleecher Snyder
Manual hyphenation doesn't work well when text gets reflown, for example by godoc. There are a few other manual hyphenations in the tree, but they are in local comments or comments for unexported functions. Change-Id: I17c9b1fee1def650da48903b3aae2fa1e1119a65 Reviewed-on: https://go-review.googlesource.com/53510 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-05runtime: mark activeModules nosplit/nowritebarrierIan Lance Taylor
The activeModules function is called by the cgo pointer checking code, which is called by the write barrier (when GODEBUG=cgocheck=2), and as such must be nosplit/nowritebarrier. Fixes #21306 Change-Id: I57f2124f14de7f3872b2de9532abab15df95d45a Reviewed-on: https://go-review.googlesource.com/53352 Reviewed-by: Austin Clements <austin@google.com>
2017-08-05math/bits: fix example for OnesCount64Francesc Campoy Flores
Erroneously called OnesCount instead of OnesCount64 Change-Id: Ie877e43f213253e45d31f64931c4a15915849586 Reviewed-on: https://go-review.googlesource.com/53410 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-08-04math/bits: add examples for OnesCount functionsFrancesc Campoy
Change-Id: Ie673f9665825a40281c2584d478ba1260f725856 Reviewed-on: https://go-review.googlesource.com/53357 Run-TryBot: Chris Broadfoot <cbro@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-08-04misc/cgo/testsanitizers: also skip tsan11/tsan12 when using GCCIan Lance Taylor
Updates #21196 Change-Id: I307cacc963448b90a23f633bec15498ba7bf1937 Reviewed-on: https://go-review.googlesource.com/53356 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-04reflect: document how DeepEqual handles cyclesIan Lance Taylor
Fixes #20428 Change-Id: Ia450e615728efd4ccb6e42117b547cac162f13a3 Reviewed-on: https://go-review.googlesource.com/52931 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2017-08-04doc: mention handling of moved GOROOT in 1.9 release notesIan Lance Taylor
Updates #20587 Change-Id: Ia131b9a4dc4986950d9ecbfcbd6b026ade234fc0 Reviewed-on: https://go-review.googlesource.com/53370 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-04doc: use better wording to explain type-aware completionJaana Burcu Dogan
Some editors can filter the autocompletion suggestions based on whether the code will compile once autocompleted. Explain this feature with better wording. Change-Id: I29e4b0396878f18c79208915402c0a209a813b04 Reviewed-on: https://go-review.googlesource.com/53355 Reviewed-by: Florin Patan <florinpatan@gmail.com> Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04doc: replace paid with commercialJaana Burcu Dogan
Change-Id: I3e6de4da0648f61e254c7597f316df3e5791321a Reviewed-on: https://go-review.googlesource.com/53354 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04doc/1.9: add CL 43712, ReverseProxy of HTTP/2 trailers to the release notes.Tristan Colgate
Add https://go-review.googlesource.com/c/43712, "net/http/httputil: ReverseProxy should pass on unannounced Trailers" to the relase notes. Fixes #21307 Change-Id: I52c126987a5d0abc4153c0e71b535529c46cd457 Reviewed-on: https://go-review.googlesource.com/53290 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-04doc: clarify that Gogland is for paid IntelliJ platform IDEsJaana Burcu Dogan
Fixes #21213. Change-Id: I7b8a84de92bbd1d3f78f8a9612f3af8cd092cb94 Reviewed-on: https://go-review.googlesource.com/53351 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04doc/1.9: fix broken html link in CL 53030/53210Dmitry Savintsev
Change-Id: I7176becd10ad84cbfc3fb9427e190028626e5baf Reviewed-on: https://go-review.googlesource.com/53291 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-04doc: fix bad link in go1.9 release notesAlberto Donizetti
Change-Id: I64ba37428f5cc560f0f20fe039feaecf5fcda93e Reviewed-on: https://go-review.googlesource.com/53330 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-03doc/1.9: fix stray html in CL 53030Dmitry Savintsev
Change-Id: Ib4102b1e2a8863712f725c4d1e37fdbe3dfe3c07 Reviewed-on: https://go-review.googlesource.com/53210 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-03encoding/binary: add examples for varint functionsAxel Wagner
Change-Id: I191f6e46b452fadde9f641140445d843b0c7d534 Reviewed-on: https://go-review.googlesource.com/48604 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-03doc/1.9: add CL 36696 for crypto/x509 to the release notesDmitry Savintsev
add https://go-review.googlesource.com/c/36696 "crypto/x509: ignore CN if SAN extension present" to the release notes. Fixes #21289 Change-Id: Ifa184d3816806a8da3c67b68476c923329acf13e Reviewed-on: https://go-review.googlesource.com/53030 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-03doc: hide blog content for golang.google.cnAndrew Bonventre
/blog redirects to blog.golang.org (currently blocked in China) unless there is a local checkout of golang.org/x/blog, which is not possible on App Engine Classic. Change-Id: Ia695e663c9bebcc6c3bedea324c630299eaad4dc Reviewed-on: https://go-review.googlesource.com/53051 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-08-03internal/poll: don't add non-sockets to runtime pollerIan Lance Taylor
Updates #21172 Change-Id: I0fec6e645328bbc85f3e47f4f71dd8d1d68c75ab Reviewed-on: https://go-review.googlesource.com/52551 Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-08-03cmd/vet: don't exit with failure on type checking errorIan Lance Taylor
The vet tool only reports a type checking error when invoked with -v. Don't let that by itself cause vet to exit with an error exit status. Updates #21188 Change-Id: I172c13d46c35d49e229e96e833683d8c82a77de7 Reviewed-on: https://go-review.googlesource.com/52851 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Rob Pike <r@golang.org>
2017-08-02doc: hide video and share if being served from CNAndrew Bonventre
In the case where requests are coming from mainland China, hide links to locations that are blocked and functionality that is not permitted. Additionally, some very small cleanup of the JS. This change requires https://go-review.googlesource.com/c/52873 Change-Id: I7fc68748e629dbe5b966d6bf117e7f7b546966eb Reviewed-on: https://go-review.googlesource.com/52872 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-08-02testsanitizers: check that tsan program runs, skip tsan10 on gccIan Lance Taylor
Check not only that a tsan program can be built, but also that it runs. This fails with some installations of GCC 7. Skip the tsan10 program when using GCC, as it reportedly hangs. This is a patch to help people build 1.9; we may be able to do a better fix for 1.10. Updates #21196 Change-Id: Icd1ffbd018dc65a97ff45cab1264b9b0c7fa0ab2 Reviewed-on: https://go-review.googlesource.com/52790 Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-02time: skip ZoneAbbr test in timezones with no abbreviationAlberto Donizetti
The testZoneAbbr assumes that Parse(RFC1123, t1.Format(RFC1123)) will always succeed. This is not true because Format will fall back to the numeric zone (ex. -07) for timezones with no abbreviation, but Parse won't accept the numeric zone when the layout specifies 'MST' (an abbreviation). Skip the zone abbreviation test in timezones with no abbreviation. Fixes #21183 Change-Id: If04691cc23ae1075d8a953733024e17f5a7646de Reviewed-on: https://go-review.googlesource.com/52430 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-02cmd/go: show examples with empty output in go test -listSeiji Takahashi
Fixes #21205 Change-Id: I81b001eb42cbf2a5d5b7b82eb63548b22f501be5 Reviewed-on: https://go-review.googlesource.com/52110 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
2017-08-02cmd/compile: set/unset base register for better assembly printCherry Zhang
For address of an auto or arg, on all non-x86 architectures the assembler backend encodes the actual SP offset in the instruction but leaves the offset in Prog unchanged. When the assembly is printed in compile -S, it shows an offset relative to pseudo FP/SP with an actual hardware SP base register (e.g. R13 on ARM). This is confusing. Unset the base register if it is indeed SP, so the assembly output is consistent. If the base register isn't SP, it should be an error and the error output contains the actual base register. For address loading instructions, the base register isn't set in the compiler on non-x86 architectures. Set it. Normally it is SP and will be unset in the change mentioned above for printing. If it is not, it will be an error and the error output contains the actual base register. No change in generated binary, only printed assembly. Passes "go build -a -toolexec 'toolstash -cmp' std cmd" on all architectures. Fixes #21064. Change-Id: Ifafe8d5f9b437efbe824b63b3cbc2f5f6cdc1fd5 Reviewed-on: https://go-review.googlesource.com/49432 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
2017-07-31[release-branch.go1.9] runtime: map bitmap and spans during heap initializationAustin Clements
We lazily map the bitmap and spans areas as the heap grows. However, right now we're very slightly too lazy. Specifically, the following can happen on 32-bit: 1. mallocinit fails to allocate any heap arena, so arena_used == arena_alloc == arena_end == bitmap. 2. There's less than 256MB between the end of the bitmap mapping and the next mapping. 3. On the first allocation, mheap.sysAlloc sees that there's not enough room in [arena_alloc, arena_end) because there's no room at all. It gets a 256MB mapping from somewhere *lower* in the address space than arena_used and sets arena_alloc and arena_end to this hole. 4. Since the new arena_alloc is lower than arena_used, mheap.sysAlloc doesn't bother to call mheap.setArenaUsed, so we still don't have a bitmap mapping or a spans array mapping. 5. mheap.grow, which called mheap.sysAlloc, attempts to fill in the spans array and crashes. Fix this by mapping the metadata regions for the initial arena_used when the heap is initialized, rather than trying to wait for an allocation. This maintains the intended invariant that the structures are always mapped for [arena_start, arena_used). Fixes #21044. Cherry-pick of CL 51714. Fixes #21234. Change-Id: I4422375a6e234b9f979d22135fc63ae3395946b0 Reviewed-on: https://go-review.googlesource.com/52191 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-31[release-branch.go1.9] runtime: fall back to small mmaps if we fail to grow ↵Austin Clements
reservation Right now, if it's possible to grow the arena reservation but mheap.sysAlloc fails to get 256MB more of memory, it simply fails. However, on 32-bit we have a fallback path that uses much smaller mmaps that could take in this situation, but fail to. This commit fixes mheap.sysAlloc to use a common failure path in case it can't grow the reservation. On 32-bit, this path includes the fallback. Ideally, mheap.sysAlloc would attempt smaller reservation growths first, but taking the fallback path is a simple change for Go 1.9. Updates #21044 (fixes one of two issues). Cherry-pick of CL 51713. Updates #21234. Change-Id: I1e0035ffba986c3551479d5742809e43da5e7c73 Reviewed-on: https://go-review.googlesource.com/52190 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-31runtime: map bitmap and spans during heap initializationAustin Clements
We lazily map the bitmap and spans areas as the heap grows. However, right now we're very slightly too lazy. Specifically, the following can happen on 32-bit: 1. mallocinit fails to allocate any heap arena, so arena_used == arena_alloc == arena_end == bitmap. 2. There's less than 256MB between the end of the bitmap mapping and the next mapping. 3. On the first allocation, mheap.sysAlloc sees that there's not enough room in [arena_alloc, arena_end) because there's no room at all. It gets a 256MB mapping from somewhere *lower* in the address space than arena_used and sets arena_alloc and arena_end to this hole. 4. Since the new arena_alloc is lower than arena_used, mheap.sysAlloc doesn't bother to call mheap.setArenaUsed, so we still don't have a bitmap mapping or a spans array mapping. 5. mheap.grow, which called mheap.sysAlloc, attempts to fill in the spans array and crashes. Fix this by mapping the metadata regions for the initial arena_used when the heap is initialized, rather than trying to wait for an allocation. This maintains the intended invariant that the structures are always mapped for [arena_start, arena_used). Fixes #21044. Change-Id: I4422375a6e234b9f979d22135fc63ae3395946b0 Reviewed-on: https://go-review.googlesource.com/51714 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-31runtime: fall back to small mmaps if we fail to grow reservationAustin Clements
Right now, if it's possible to grow the arena reservation but mheap.sysAlloc fails to get 256MB more of memory, it simply fails. However, on 32-bit we have a fallback path that uses much smaller mmaps that could take in this situation, but fail to. This commit fixes mheap.sysAlloc to use a common failure path in case it can't grow the reservation. On 32-bit, this path includes the fallback. Ideally, mheap.sysAlloc would attempt smaller reservation growths first, but taking the fallback path is a simple change for Go 1.9. Updates #21044 (fixes one of two issues). Change-Id: I1e0035ffba986c3551479d5742809e43da5e7c73 Reviewed-on: https://go-review.googlesource.com/51713 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-30.github: add .md extension to SUPPORT fileGustav Westling
This makes GitHub render the markdown file automatically on their web UI. SUPPORT.md is the recommended file name according to the GitHub documentation: https://help.github.com/articles/adding-support-resources-to-your-project/ Fixes #21223 Change-Id: I9f9b9daced9c29a16850e8c446656f353f50b1ae Reviewed-on: https://go-review.googlesource.com/52013 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-28plugin: mention that there are known bugs with pluginsIan Lance Taylor
Change-Id: I9e63661cac2bebc41d7aa3cd80e1920eec22b894 Reviewed-on: https://go-review.googlesource.com/51250 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-07-27[release-branch.go1.9] cmd/dist: skip moved GOROOT on Go's Windows builders ↵Brad Fitzpatrick
when not sharding tests Change-Id: I0bcae339624e7d61037d9ea0885b7bd07491bbb6 Reviewed-on: https://go-review.googlesource.com/51430 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 4833e920c1d7f6b23458e6ff3c73951fcf754219) Reviewed-on: https://go-review.googlesource.com/51450 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-27cmd/dist: skip moved GOROOT on Go's Windows builders when not sharding testsBrad Fitzpatrick
Change-Id: I0bcae339624e7d61037d9ea0885b7bd07491bbb6 Reviewed-on: https://go-review.googlesource.com/51430 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-26test: add READMEJosh Bleecher Snyder
Updates #21034 Change-Id: I951fb48ab3b9ed54d225c11879db8f09048a36a3 Reviewed-on: https://go-review.googlesource.com/50950 Reviewed-by: Rob Pike <r@golang.org>
2017-07-26runtime/pprof: prevent a deadlock that SIGPROF might create on mips{,le}Vladimir Stefanovic
64bit atomics on mips/mipsle are implemented using spinlocks. If SIGPROF is received while the program is in the critical section, it will try to write the sample using the same spinlock, creating a deadloop. Prevent it by creating a counter of SIGPROFs during atomic64 and postpone writing the sample(s) until called from elsewhere, with pc set to _LostSIGPROFDuringAtomic64. Added a test case, per Cherry's suggestion. Works around #20146. Change-Id: Icff504180bae4ee83d78b19c0d9d6a80097087f9 Reviewed-on: https://go-review.googlesource.com/42652 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-07-25doc: list editor options by name, not plugin nameJaana Burcu Dogan
So the users can recognize their option by their editor's name. Fixes #20398. Change-Id: Id314d4dbe26f40231a479b179620d7e66512b506 Reviewed-on: https://go-review.googlesource.com/51114 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-07-25doc: cleanup editor pageZac Bergquist
Fix some UI issues introduced with CL50952: - increase header colspan to account for additional column - remove ':' character from footnotes Change-Id: I56f59b8e4b2852612b3c6c7c0dfe99125dd8b57b Reviewed-on: https://go-review.googlesource.com/51113 Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
2017-07-25doc: add Atom to editor guideZac Bergquist
Fixes #20569 Change-Id: I752a49ed50c1567f8db7112859ac073f37dd77dc Reviewed-on: https://go-review.googlesource.com/50952 Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
2017-07-24[release-branch.go1.9] go1.9rc1go1.9rc1Chris Broadfoot
Change-Id: I6251fc128990f9494a0b037cabb24ada5eabb6b5 Reviewed-on: https://go-review.googlesource.com/50951 Run-TryBot: Chris Broadfoot <cbro@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-07-24[release-branch.go1.9] cmd/compile: consider exported flag in namedataIan Lance Taylor
It is possible to have an unexported name with a nil package, for an embedded field whose type is a pointer to an unexported type. We must encode that fact in the type..namedata symbol name, to avoid incorrectly merging an unexported name with an exported name. Fixes #21120 Change-Id: I2e3879d77fa15c05ad92e0bf8e55f74082db5111 Reviewed-on: https://go-review.googlesource.com/50710 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-on: https://go-review.googlesource.com/50970 Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-07-24cmd/compile: consider exported flag in namedataIan Lance Taylor
It is possible to have an unexported name with a nil package, for an embedded field whose type is a pointer to an unexported type. We must encode that fact in the type..namedata symbol name, to avoid incorrectly merging an unexported name with an exported name. Fixes #21120 Change-Id: I2e3879d77fa15c05ad92e0bf8e55f74082db5111 Reviewed-on: https://go-review.googlesource.com/50710 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-07-24cmd/link: use full link, not compile, to test for -no-?pieIan Lance Taylor
This avoids an error from clang when using -nopie during compilation, and permits us to check that the entire build succeeds. Updates #21042 Change-Id: I2e6c7d5c97a85c223ed3288622bbb58ce33b8774 Reviewed-on: https://go-review.googlesource.com/50874 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-24.github: recommend 'go bug' when filing an issueJosh Bleecher Snyder
It was released with 1.8, so it should be widely available. Change-Id: I7dcf205009b528071ea63f99cb5da0db183df341 Reviewed-on: https://go-review.googlesource.com/50932 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-24.github: add SUPPORT fileJosh Bleecher Snyder
GitHub recently added support for a SUPPORT file: https://github.com/blog/2400-support-file-support This SUPPORT file is a very lightly edited copy of the wiki entry on asking questions: https://github.com/golang/go/wiki/Questions Change-Id: Ic1eb74d985ea30862defb99750fb42da84e492de Reviewed-on: https://go-review.googlesource.com/50930 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-22encoding/json: ignore embedded fields of pointers to unexported non-structsJoe Tsai
https://golang.org/cl/33773 fixes the JSON marshaler to avoid serializing embedded fields on unexported types of non-struct types. However, Go allows embedding pointer to types, so the check for whether the field is a non-struct type must first dereference the pointer to get at the underlying type. Furthermore, due to a edge-case in the behavior of StructField.PkgPath not being a reliable indicator of whether the field is unexported (see #21122), we use our own logic to determine whether the field is exported or not. The logic in this CL may be simplified depending on what happens in #21122. Fixes #21121 Updates #21122 Change-Id: I8dfd1cdfac8a87950df294a566fb96dfd04fd749 Reviewed-on: https://go-review.googlesource.com/50711 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-21sync: delete a sentence from the Map docsBrad Fitzpatrick
From Josh's comments on https://golang.org/cl/50310 Once I removed the "from the Go standard library" bit, the beginning wasn't worth keeping. It also wasn't clear whether what it meant by "cache contention". Processor caches, or user-level caches built with sync.Map? It didn't seem worth clarifying and didn't convey any useful information, so deleted. Change-Id: Id1d76105a3081d0855f6a64540700932bb83d98e Reviewed-on: https://go-review.googlesource.com/50632 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-21net/http: document that after Hijack, Request.Body is invalidBrad Fitzpatrick
We can make it panic with a more explicit and readable error message during Go 1.10, but document it for now. This has always been the case; it's not a new rule. Updates #20933 Change-Id: I53c1fefb47a8f4aae0bb32fa742afa3a2ed20e8a Reviewed-on: https://go-review.googlesource.com/50634 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2017-07-21sync: update Map documentation with usage rule of thumbMichael Stapelberg
As per bcmills’s lightning talk at GopherCon 2017: https://github.com/gophercon/2017-talks/tree/master/lightningtalks/BryanCMills-AnOverviewOfSyncMap Change-Id: I12dd0daa608af175d110298780f32c6dc5e1e0a0 Reviewed-on: https://go-review.googlesource.com/50310 Reviewed-by: Bryan Mills <bcmills@google.com>