Commit graph

35025 commits

Author SHA1 Message Date
Robert Griesemer f3f507b2d8 spec: provide some (minimal) intuition for the notion of "terminating statement"
Fixes #23215.

Change-Id: Ib20825bf08915b4daaabbfd91f168e24973c512d
Reviewed-on: https://go-review.googlesource.com/85215
Reviewed-by: Rob Pike <r@golang.org>
2017-12-22 21:13:38 +00:00
David Chase 60be6f85c1 cmd/compile: additional test cleanup
Refactoring to make it slightly easier to add tests,
easier to add variable-printing-support for Delve,
and made naming and tagging more consistent.

No changes to the content of the test itself or when it is
run.

Change-Id: I374815b65a203bd43b27edebd90b859466d1c33b
Reviewed-on: https://go-review.googlesource.com/84979
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2017-12-21 17:00:39 +00:00
Ben Shi 14332ed5b8 cmd/internal/obj/arm: fix wrong encoding of NMULAF/NMULAD/NMULSF/NMULSD
NMULAF/NMULAD/NMULSF/NMULSD are incorrectly encoded by the arm
assembler.

Instruction            Right binary      Current wrong binary
"NMULAF	F5, F6, F7"    0xee167a45        0xee167a05
"NMULAD	F5, F6, F7"    0xee167b45        0xee167b05
"NMULSF	F5, F6, F7"    0xee167a05        0xee167a45
"NMULSD	F5, F6, F7"    0xee167b05        0xee167b45

This patch fixes this issue.

fixes issue #23212

Change-Id: Ic9c203f92c34b90d6eef492a694c0e95b4d479c5
Reviewed-on: https://go-review.googlesource.com/85116
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-21 16:30:51 +00:00
Robert Griesemer 5ad3c1cda2 go/types: document Typ slice
Fixes #22628.

Change-Id: Ib7aff8043e477af18c448d6b778f159b23fb5a92
Reviewed-on: https://go-review.googlesource.com/85075
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-20 23:42:22 +00:00
Hana Kim a58286c289 cmd/trace: init goroutine info entries with GoCreate event
golang.org/cl/81315 attempted to distinguish system goroutines
by examining the function name in the goroutine stack. It assumes that
the information would be available when GoSysBlock or GoInSyscall
events are processed, but it turned out the stack information is
set too late (when the goroutine gets a chance to run).

This change initializes the goroutine information entry when
processing GoCreate event which should be one of the very first
events for the every goroutine in trace.

Fixes #22574

Change-Id: I1ed37087ce2e78ed27c9b419b7d942eb4140cc69
Reviewed-on: https://go-review.googlesource.com/83595
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-20 23:04:21 +00:00
Than McIntosh 841d865a56 cmd/compile: second attempt at fix for issue 23179
My previous fix for issue 23179 was incomplete; it turns out that if
an unnamed parameter is below a specific size threshold, it gets
register-promoted away by the compiler (hence not encountered during
some parts of DWARF inline info processing), but if it is sufficiently
large, it is allocated to the stack as a named variable and treated as
a regular parameter by DWARF generation. Interestingly, something in
the ppc64le build of k8s causes an unnamed parameter to be retained
(where on amd64 it is deleted), meaning that this wasn't caught in my
amd64 testing.

The fix is to insure that "_" params are treated in the same way that
"~r%d" return temps are when matching up post-optimization inlined
routine params with pre-inlining declarations. I've also updated the
test case to include a "_" parameter with a very large size, which
also triggers the bug on amd64.

Fixes #23179.

Change-Id: I961c84cc7a873ad3f8f91db098a5e13896c4856e
Reviewed-on: https://go-review.googlesource.com/84975
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2017-12-20 20:39:16 +00:00
elpinal 0504cd68e6 cmd/doc: suppress the error message for *package.ident embedded in struct type
The current implementation prints a log, "invalid program: unexpected
type for embedded field", when the form *package.ident is embedded in
a struct declaration.

Note that since valid qualified identifiers must be exported, the result
for a valid program does not change.

Change-Id: If8b9d7056c56b6a6c5482eb749168a63c65ef685
Reviewed-on: https://go-review.googlesource.com/84436
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-20 19:05:19 +00:00
Kevin Burke 9c64c65d0e cmd/compile: fix spelling error
Change-Id: Ifc533ee98a7684060d20340087c1b29f722ae46b
Reviewed-on: https://go-review.googlesource.com/84835
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-19 20:38:04 +00:00
Than McIntosh 0447216316 cmd/compile: fix corner case in DWARF inline info generation
The helper routine for returning pre-inlining parameter declarations
wasn't properly handling the case where you have more than one
parameter named "_" in a function signature; this triggered a map
collision later on when the function was inlined and DWARF was
generated for the inlined routine instance.

Fixes #23179.

Change-Id: I12e5d6556ec5ce08e982a6b53666a4dcc1d22201
Reviewed-on: https://go-review.googlesource.com/84755
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-12-19 19:00:42 +00:00
Daniel Theophanes 3aeb3950a9 database/sql/driver: update Value doc, can be driver supported type
The driver.Value type may be more then the documented 6 types if the
database driver supports it. Document that fact.

Updates #23077

Change-Id: If7e2112fa61a8cc4e155bb31e94e89b20c607242
Reviewed-on: https://go-review.googlesource.com/84636
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-18 20:24:12 +00:00
Than McIntosh 54f0520f94 cmd/internal/link: disable selected DWARF tests on Solaris
Disable the three linker DWARF tests that invoke the compiler in
non-debug mode on Solaris, since this seems to trigger a split stack
overflow. These can be turned back on once the issue in question is
resolved.

Updates #23168.

Change-Id: I5be1b098e33e8bad3bc234a0964eab1dee7e7954
Reviewed-on: https://go-review.googlesource.com/84655
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
2017-12-18 19:13:33 +00:00
Robert Griesemer 2de98eb8de go/types: rename (historic) flag "-list" used for go/types testing
Rename -list flag to -errlist to avoid confusion with the go
test flag -list (introduced later).

This flag is only needed to get an error list when running the
go/types test harness manually on select files, e.g., as in:

	go test -run=Check -files=x.go -errlist

Change-Id: I67febcf968d2d8f4ff00c81eea7b2df723560eac
Reviewed-on: https://go-review.googlesource.com/84378
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-16 23:30:58 +00:00
David Chase 98443ecd0a cmd/compile: clean up debug_test.go
Exercise of preparing a how-to document motivated me to
clean up some of the stupider wonkier bits.  Since this
does not run for test -short, expect no change for trybots,
did pass testing with OSX gdb and a refreshed copy of Delve.

Change-Id: I58edd10599b172c4787ff5f110db078f6c2c81c5
Reviewed-on: https://go-review.googlesource.com/83957
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2017-12-15 21:57:27 +00:00
David Chase a4dfb2e555 cmd/link: make inlining+locationlist test depend on GOARCH
Location lists are only supported on x86 and amd64, so the
test expecting them failed everywhere else. Make that test
skip unless GOARCH is x86 or amd64.

Change-Id: Id86b34d30c6a0b97e6fa0cd5aca31f51ed84f556
Reviewed-on: https://go-review.googlesource.com/84395
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-15 21:13:30 +00:00
Matthijs Kooijman eda703ac79 os: mention the influence of umask in docs
Change-Id: Ia05fac3298334d6b44267ce02bffcd7bf8a54c72
Reviewed-on: https://go-review.googlesource.com/83775
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-15 21:07:41 +00:00
Brad Fitzpatrick f2ddcca224 cmd/dist: let misc/cgo/testshared test timeout be scaled by slow builder
The default test timeout is 10 minutes if unspecified.

The misc/cgo/testshared test didn't use t.timeout(sec), which respects
GO_TEST_TIMEOUT_SCALE, so all builders got the default 10 minute
timeout. arm5 needs more, though, so specify 10 minutes explicitly,
which will then get scaled accordingly on slower builders.

Change-Id: I19ecfdcd9c865f2b69524484415b8fbd2852718e
Reviewed-on: https://go-review.googlesource.com/84315
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-15 18:40:06 +00:00
Than McIntosh fdecaa837c cmd/compile: fixes for bad DWARF abstract origin references
Change the compiler's DWARF inline info generation to be more careful
about producing consistent instances of abstract function DIEs. The
new strategy is to insure that the only params/variables created in an
abstract subprogram DIE are those corresponding to declarations in the
original pre-inlining version of the code. If a concrete subprogram
winds up with other vars as part of the compilation process (return
temps, for example, or scalars generated by splitting a structure into
pieces) these are emitted as regular param/variable DIEs instead of
concrete DIEs.

The linker dwarf test now has a couple of new testpoints that include
checks to make sure that all abstract DIE references are
sane/resolvable; this will help catch similar problems in the future.

Fixes #23046.

Change-Id: I9b0030da8673fbb80b7ad50461fcf8c6ac823a37
Reviewed-on: https://go-review.googlesource.com/83675
Run-TryBot: Than McIntosh <thanm@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-15 17:59:32 +00:00
Austin Clements 44213336f0 runtime: symbolize morestack caller in throwsplit panic
This attempts to symbolize the PC of morestack's caller when there's a
stack split at a bad time. The stack trace starts at the *caller* of
the function that attempted to grow the stack, so this is useful if it
isn't obvious what's being called at that point, such as in #21431.

Change-Id: I5dee305d87c8069611de2d14e7a3083d76264f8f
Reviewed-on: https://go-review.googlesource.com/84115
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-15 17:21:07 +00:00
Hana Kim bfb8f2a765 doc/debugging_with_gdb: update -gcflags usage
After go1.10, compiler/linker option flags apply only to the packages
listed directly on the command line unless the matching pattern is
specified. For debugging, we want to apply the flags to all packages.

Change-Id: Ic69eee1491b1080fc140592f200c59a6e03d87ac
Reviewed-on: https://go-review.googlesource.com/84135
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-15 15:00:46 +00:00
Brad Fitzpatrick 9d5f8eaa8a cmd/dist: increase default cmd/go test timeout
cmd/go has grown slow, even in short mode, and it's now regularly
failing on a number of builders where it's taking over the previous 3
minute timeout. for now, give it more time.

Change-Id: If565baf71c2770880b2e2139b47e03433951331f
Reviewed-on: https://go-review.googlesource.com/84235
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-15 02:48:35 +00:00
Robert Griesemer 67295d6eb0 go/types: collect methods with parenthesized receiver types
The existing code simply dropped them on the floor. Don't do that.

Fixes #23130.

Change-Id: I10f20e41f2c466a76519983253f87af7cf6d5e70
Reviewed-on: https://go-review.googlesource.com/83918
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-12-14 22:12:09 +00:00
Geoff Berry 75f0ad705f cmd/compile/internal/ssa: group dump files alphabetically
Change dump file names to group them alphabetically in directory
listings, in pass run order.

Change-Id: I8070578a5b4a3a7983dcc527ea1cfdb10a6d7d24
Reviewed-on: https://go-review.googlesource.com/83958
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-14 21:22:04 +00:00
Russ Cox 558eeb2d85 cmd/vet: limit printf check to known Printf-like functions
The name-based heuristics fail too often to be on during "go test",
but we really want the printf vet check in "go test", so change to
a list of exactly which standard library functions are print-like.

For a later release we'd like to bring back checking for user-defined
wrappers, but in a completely precise way. Not for Go 1.10, though.

The new, more precise list includes t.Skipf, which caught some
mistakes in standard library tests.

Fixes #22936.

Change-Id: I110448e3f6b75afd4327cf87b6abb4cc2021fd0d
Reviewed-on: https://go-review.googlesource.com/83838
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 19:56:46 +00:00
Russ Cox 9006d1f85f cmd/go: vet support for upcoming cmd/vet fixes
Two minor changes to allow fixes in cmd/vet's printf checking.

1. Pass package import path in vet config, so that vet knows
whether it is, for example, vetting "fmt".

2. Add new, but undocumented and for now unsupported
flag -vettool to control which vet binary is invoked during go vet.
This lets the cmd/vet tests build and test a throwaway vet.exe
using cmd/go to ensure type checking information, all without
installing a potentially buggy cmd/vet.

For #22936.

Change-Id: I18df7c796ebc711361c847c63eb3ee17fb041ff7
Reviewed-on: https://go-review.googlesource.com/83837
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 19:55:18 +00:00
Mike Samuel c0cda71dab html/template: add srcset content type
Srcset is largely the same as a URL, but is escaped in URL contexts.
Inside a srcset attribute, URLs have their commas percent-escaped to
avoid having the URL be interpreted as multiple URLs.  Srcset is placed
in a srcset attribute literally.

Fixes #17441

Change-Id: I676b544784c7e54954ddb91eeff242cab25d02c4
Reviewed-on: https://go-review.googlesource.com/38324
Reviewed-by: Kunpei Sakai <namusyaka@gmail.com>
Reviewed-by: Mike Samuel <mikesamuel@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-14 19:54:38 +00:00
Russ Cox c7b7c43363 cmd/go: do not let test vet failures stop reporting of later test results
(This only manifested in test vet failures for packages without tests,
or else we'd probably have seen this sooner.)

Fixes #23047.

Change-Id: I41d09a7780999bbe1951377ffcc811ba86ea5000
Reviewed-on: https://go-review.googlesource.com/83955
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 17:49:46 +00:00
JBD c4da610197 doc: make it clear which pprof package is used
Updates #22027.

Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af
Reviewed-on: https://go-review.googlesource.com/83916
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-14 17:40:20 +00:00
Brad Fitzpatrick 513a469119 doc/go1.10: note that netbsd/arm is definitely broken
Remove the ambiguity, know that we know it's actually broken,
per https://github.com/golang/go/issues/23073#issuecomment-351045421

Updates #23073

Change-Id: I9b904da2f4c7105a0727d2a9056aaa6895d3dadc
Reviewed-on: https://go-review.googlesource.com/83856
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 17:14:03 +00:00
Brad Fitzpatrick 1fc71e375d A+C: automated updates for Go 1.10
Add Adam Thomason (individual CLA)
Add Adrian Hesketh (individual CLA)
Add Aeneas Rekkas (arekkas) (individual CLA)
Add Afanasev Stanislav (individual CLA)
Add Agniva De Sarker (individual CLA)
Add Alexander Pantyukhin (individual CLA)
Add Alexandre Parentea (individual CLA)
Add Aman Gupta (individual CLA)
Add Anand K. Mistry (individual CLA)
Add Andrii Soldatenko (individual CLA)
Add Andrii Soluk (individual CLA)
Add Andrzej Żeżel (individual CLA)
Add Anthony Alves (individual CLA)
Add Anthony Sottile (individual CLA)
Add Ariel Mashraki (individual CLA)
Add Axel Wagner (individual CLA)
Add Ben Haines (individual CLA)
Add Ben Laurie (corporate CLA for Google Inc.)
Add Ben Schwartz (corporate CLA for Google Inc.)
Add Blain Smith (individual CLA)
Add Blake Mesdag (individual CLA)
Add Borja Clemente (individual CLA)
Add Brett Merrill (individual CLA)
Add Brian Kessler (individual CLA)
Add Burak Guven (individual CLA)
Add Cholerae Hu (individual CLA)
Add Chris Ball (individual CLA)
Add Christian Alexander (individual CLA)
Add Christopher Henderson (individual CLA)
Add Christopher Koch (corporate CLA for Google Inc.)
Add Christos Zoulas (individual CLA)
Add Daniela Petruzalek (individual CLA)
Add Danny Rosseau (individual CLA)
Add Davor Kapsa (individual CLA)
Add Edan Bedrik (individual CLA)
Add Elbert Fliek (individual CLA)
Add Elena Grahovac (individual CLA)
Add Emerson Lin (individual CLA)
Add Eric Rescorla (individual CLA)
Add Evan Jones (individual CLA)
Add Frank Somers (individual CLA)
Add Frederic Guillot (individual CLA)
Add Garret Kelly (corporate CLA for Google Inc.)
Add Grant Griffiths (individual CLA)
Add Guilherme Garnier (individual CLA)
Add Guilherme Rezende (individual CLA)
Add Hanjun Kim (individual CLA)
Add Henry Adi Sumarto (individual CLA)
Add Henry Bubert (individual CLA)
Add Herbie Ong (corporate CLA for Google Inc.)
Add Hilko Bengen (individual CLA)
Add Hiroaki Nakamura (individual CLA)
Add Ian Kent (individual CLA)
Add Inanc Gumus (individual CLA)
Add Iskander Sharipov (corporate CLA for Intel Corporation)
Add Ivan Bertona (individual CLA)
Add James Lawrence (individual CLA)
Add James Treanor (individual CLA)
Add Jamie Liu (corporate CLA for Google Inc.)
Add Jared Culp (individual CLA)
Add Jason Wangsadinata (individual CLA)
Add Javier Segura (individual CLA)
Add Jean-Francois Cantin (individual CLA)
Add Jeet Parekh (individual CLA)
Add Jelte Fennema (individual CLA)
Add Jimmy Frasche (individual CLA)
Add Joshua Rubin (individual CLA)
Add Juan Carlos (individual CLA)
Add Jude Pereira (individual CLA)
Add Karel Pazdera (individual CLA)
Add Karsten Köhler (individual CLA)
Add Kenji Yano (individual CLA)
Add Kevin Ruffin (individual CLA)
Add Kieran Colford (individual CLA)
Add Kirk Han (individual CLA)
Add Kunpei Sakai (individual CLA)
Add Kyle Shannon (individual CLA)
Add Kyohei Kadota (individual CLA)
Add Lakshay Garg (individual CLA)
Add Lann Martin (corporate CLA for Google Inc.)
Add Laurent Voisin (individual CLA)
Add Leigh McCulloch (individual CLA)
Add Lorenz Bauer (corporate CLA for CloudFlare, Inc.)
Add Luca Bruno (corporate CLA for CoreOS, Inc)
Add Luke Granger-Brown (individual CLA)
Add Lyle Franklin (individual CLA)
Add Maicon Costa (individual CLA)
Add Manish Goregaokar (individual CLA)
Add Mansour Rahimi (individual CLA)
Add Mark Percival (individual CLA)
Add Mark Pulford (individual CLA)
Add Mark Wolfe (individual CLA)
Add Martins Sipenko (individual CLA)
Add Mat Byczkowski (individual CLA)
Add Matej Baćo (individual CLA)
Add Mateus Amin (individual CLA)
Add Matt Dee (individual CLA)
Add Matthew Broberg (individual CLA)
Add Max Schmitt (individual CLA)
Add Mayank Kumar (individual CLA)
Add Michael Brandenburg (individual CLA)
Add Michael McLoughlin (individual CLA)
Add Michael Schurter (individual CLA)
Add Michael Steinert (individual CLA)
Add Michal Pristas (individual CLA)
Add Mihail Minaev (individual CLA)
Add Muhammad Falak R Wani (individual CLA)
Add Naoki Kanatani (individual CLA)
Add Nicolas BRULEZ (individual CLA)
Add Nils Larsgård (individual CLA)
Add Noble Johnson (individual CLA)
Add Paul Boyd (individual CLA)
Add Paul Ruest (individual CLA)
Add Peter Wu (corporate CLA for CloudFlare, Inc.)
Add Petrica Voicu (individual CLA)
Add Pontus Leitzler (individual CLA)
Add Radek Sohlich (individual CLA)
Add Rajath Agasthya (individual CLA)
Add Rajender Reddy Kompally (individual CLA)
Add Ramazan AYYILDIZ (individual CLA)
Add RaviTeja Pothana (individual CLA)
Add Reilly Watson (individual CLA)
Add Roman Budnikov (individual CLA)
Add Ross Chater (individual CLA)
Add Rudi Kramer (individual CLA)
Add Ryoichi KATO (individual CLA)
Add Ryuji Iwata (individual CLA)
Add Scott Crunkleton (individual CLA)
Add Seiji Takahashi (individual CLA)
Add Sergey Frolov (corporate CLA for Google Inc.)
Add Sergey Semin (individual CLA)
Add Sergiusz Bazanski (individual CLA)
Add Stanislav Afanasev (individual CLA)
Add Sukrit Handa (individual CLA)
Add Sylvain Zimmer (individual CLA)
Add Tao Wang (individual CLA)
Add Terin Stock (individual CLA)
Add Thiago Avelino (individual CLA)
Add Thomas Wanielista (individual CLA)
Add Tim Cooper (individual CLA)
Add Tim Wright (individual CLA)
Add Tobias Assarsson (individual CLA)
Add Tom Lanyon (corporate CLA for Google Inc.)
Add Tom Levy (individual CLA)
Add Troels Thomsen (individual CLA)
Add Tugdual Saunier (individual CLA)
Add Tyler Bui-Palsulich (corporate CLA for Google Inc.)
Add Wembley G. Leach, Jr (individual CLA)
Add Will Faught (individual CLA)
Add Wèi Cōngruì (individual CLA)
Add Xi Ruoyao (individual CLA)
Add Yann Salaün (individual CLA)
Add Yosuke Akatsuka (individual CLA)
Add Zach Gershman (individual CLA)
Add Zhengyu He (corporate CLA for Google Inc.)
Add Zhongtao Chen (individual CLA)
Add Роман Хавроненко (individual CLA)
Add Тарас Буник (individual CLA)

Updates #12042

Change-Id: If8fd708d32434b8ba21a0b3ef433b0d176626ce8
Reviewed-on: https://go-review.googlesource.com/83858
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-14 17:12:09 +00:00
Tobias Klauser fa904420f2 doc/go1.10: fix formatting of 'go tool fix' examples
Also remove a superfluous </p>

Change-Id: Idca51cdfbd8abc6669f00c80ca3fb7f225ee445c
Reviewed-on: https://go-review.googlesource.com/84015
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-14 17:02:00 +00:00
Russ Cox 94d7c884c3 testing: do not crash when m.Run is called twice and -test.testlogfile is used
Tests exist that call m.Run in a loop‽
Now we have one too.

Fixes #23129.

Change-Id: I8cbecb724f239ae14ad45d75e67d12c80e41c994
Reviewed-on: https://go-review.googlesource.com/83956
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 14:57:01 +00:00
Wèi Cōngruì e28a0d397b os: don't wait for Close if the File was returned by NewFile
os.NewFile doesn't put the fd into non-blocking mode.
In most cases, an *os.File returned by os.NewFile is in blocking mode.

Updates #7970
Updates #21856
Updates #23111

Change-Id: Iab08432e41f7ac1b5e25aaa8855d478adb7f98ed
Reviewed-on: https://go-review.googlesource.com/83995
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 05:54:46 +00:00
Ian Lance Taylor b944f91f15 cmd/cgo: don't define intgo in export prologue
The export prologue goes into the _cgo_export.h file, where it may be
be #include'd by a .swig file. As SWIG defines its own type "intgo",
the definition of "intgo" in the export prologue could conflict.
Since we don't need to define "intgo" in the _cgo_export.h file, don't.

Defining "intgo" in _cgo_export.h was new for this release, so this
should not break any existing code.

No test case as I can't quite bring myself to write a test that
combines SWIG and cgo.

Change-Id: I8073e8300a1860cecd5994b9ad07dd35a4298c89
Reviewed-on: https://go-review.googlesource.com/83936
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-14 03:38:19 +00:00
Russ Cox 29918e85ab testing: emphasize that Fatal/FailNow/etc run deferred calls
Fixes #22989.

Change-Id: I9776a7b0d0598c2cb118c323d1f8f933665da254
Reviewed-on: https://go-review.googlesource.com/83881
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2017-12-14 02:50:24 +00:00
Russ Cox d45298671f testing: define Run result a little more clearly
t.Run(f) does not wait for f after f calls t.Parallel.
Otherwise it would be impossible to create new
parallel sibling subtests for f.

Fixes #22993.

Change-Id: I27e1555ab1ff608eb8155db261d5e7ee8f486aef
Reviewed-on: https://go-review.googlesource.com/83880
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 02:48:57 +00:00
Russ Cox 2c296dc8ac cmd/go: apply same per-package flags to compile and link of test
If package strings has a particular set of gcflags, then the strings_test
pseudo-package built as part of the test binary started inheriting the
same flags in CL 81496, to fix #22831.

Now the package main and final test binary link built as part of the
strings test binary also inherit the same flags, to fix #22994.

I am slightly uneasy about reusing package strings's flags for
package main, but the alternative would be to introduce some
kind of special case, which I'd be even more uneasy about.

This interpretation preserves the Go 1.9 behavior of existing
commands like:

	go test -c -ldflags=-X=mypkg.debugString=foo mypkg

Fixes #22994.

Change-Id: I9ab83bf1a9a6adae530a7715b907e709fd6c1b5d
Reviewed-on: https://go-review.googlesource.com/83879
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 02:25:34 +00:00
Ian Lance Taylor 0f3ab149ec net, os: don't wait for Close in blocking mode
Updates #7970
Updates #21856
Updates #23111

Change-Id: I0cd0151fcca740c40c3c976f941b04e98e67b0bf
Reviewed-on: https://go-review.googlesource.com/83715
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-14 02:02:10 +00:00
Robert Griesemer d0b2467966 go/types: remove TODOs from API that cannot be changed (cleanup)
Change-Id: I4e357a250b2f9cfbf780b05c5f54805682b19a62
Reviewed-on: https://go-review.googlesource.com/83935
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-12-14 00:45:50 +00:00
JBD 774ae54777 doc: add some links to the diagnostics page
Updates #22027.

Change-Id: I468348d2b000f146f88ef8b7cf450eea8d1c12a7
Reviewed-on: https://go-review.googlesource.com/83917
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-14 00:13:04 +00:00
Russ Cox c6ea277ac1 test: skip "# package/path" output from cmd/go in errchk
This allows errchk to be used with "go vet" output (as opposed to "go tool vet").

Change-Id: I0009a53c9cb74accd5bd3923c137d6dbf9e46326
Reviewed-on: https://go-review.googlesource.com/83836
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 21:32:01 +00:00
Russ Cox de14b2f638 all: fix t.Skipf formats
Found by upcoming cmd/vet change.

Change-Id: I7a8264a304b2a4f26f3bd418c1b28cc849889c9b
Reviewed-on: https://go-review.googlesource.com/83835
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-13 21:31:45 +00:00
Nathaniel Caza e7f95b3cca crypto/x509: load all trusted certs on darwin (cgo)
The current implementation ignores certs wherein the
Subject does not match the Issuer. An example of where
this causes issue is an enterprise environment with
intermediate CAs. In this case, the issuer is separate
(and may be loaded) but the intermediate is ignored.
A TLS handshake that does not include the intermediate
cert would then fail with an untrusted error in Go.

On other platforms (darwin-nocgo included), all trusted
certs are loaded and accepted reguardless of
Subject/Issuer names.

This change removes the Subject/Issuer name-matching
restriction of certificates when trustAsRoot is set,
allowing all trusted certs to be loaded on darwin (cgo).

Refs #16532

Change-Id: I451e929588f8911892be6bdc2143d0799363c5f8
Reviewed-on: https://go-review.googlesource.com/36942
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 19:27:15 +00:00
Hana Kim 26ec05cdbe doc: update info about flame graphs in diagnostics.html
Use Brendan Gregg's FlameGraphs page link.
Mention the flame graph is available from the upstream pprof.

Change-Id: Ife1d5a5f4f93f20cd5952a09083f798b77d25a60
Reviewed-on: https://go-review.googlesource.com/83798
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 19:04:01 +00:00
Russ Cox 81c19cc011 doc/go1.10: preannounce deprecation of OS X 10.9 Mavericks
By the time Go 1.11 is released, OS X 10.9 Mavericks will have gone
two years with no security updates.

For #23011.

Change-Id: I6482852a14477985769b72c45c92416aae8be100
Reviewed-on: https://go-review.googlesource.com/83795
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-13 17:52:38 +00:00
Hanjun Kim 8776be1535 time: add space padding layout strings(using underscore) for not only day but others
As mentioned in #22802, only day component of layout string has space
padding(represented by one underscore before its placeholder). This
commit expands the rule for month, hour, minute and second.

Updates #22802 (maybe fixes it)

Change-Id: I886998380489862ab9a324a6774f2e4cf7124122
Reviewed-on: https://go-review.googlesource.com/78735
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2017-12-13 02:42:34 +00:00
Ian Lance Taylor 1206e974a1 cmd/go: don't use a testlog if there is an exec command
An exec command is normally used on platforms were the test is run in
some unusual way, making it less likely that the testlog will be useful.

Updates #22593

Change-Id: I0768f6da89cb559d8d675fdf6d685db9ecedab9e
Reviewed-on: https://go-review.googlesource.com/83578
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 02:00:48 +00:00
Brad Fitzpatrick 132b528e71 doc/go1.10: note that plugin now works on darwin/amd64
Fixes #23085

Change-Id: I7fef281079e9e08c49ae05371506b0b881a467db
Reviewed-on: https://go-review.googlesource.com/83577
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-13 01:38:19 +00:00
Matthew Dempsky 13bf4ada80 cmd/compile: remove broken inlining accounting code
We can't currently inline functions that contain closures anyway, so
just delete this budgeting code for now. Re-enable once we can (if
ever) inline functions with nested closures.

Updates #15561.
Fixes #23093.

Change-Id: Idc5f8e042ccfcc8921022e58d3843719d4ab821e
Reviewed-on: https://go-review.googlesource.com/83538
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-12-12 20:26:33 +00:00
Ian Lance Taylor d1be0fd910 cmd/link: with -importcfg don't strip trailing ".a"
When using -importcfg, the import paths recorded by the compiler in
the object file are simply the import paths. When not using -importcfg,
the import paths have a trailing ".a". Assume that if we are using
-importcfg with the compiler, we are using it with the linker,
and so if the linker sees an -importcfg option it should not
strip ".a" from the import path read from the object files.

This was mostly working because the linker only strips a trailing
".x" for a literal dot and any single character 'x'. Since few import
paths end with ".x", most programs worked fine.

Fixes #22986

Change-Id: I6c10a160b97dd63fff3931f27a1514c856e8cd52
Reviewed-on: https://go-review.googlesource.com/81878
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-12 04:55:56 +00:00
Ian Lance Taylor 943e2635b3 cmd/go: remove file created by test
The file cmd/go/testdata/src/testcache/script.sh was accidentally
committed with CL 83256. Sorry about that.

Updates #22593

Change-Id: Id8f07587ea97015ed75439db220560a5446e53e6
Reviewed-on: https://go-review.googlesource.com/83395
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-12 04:54:20 +00:00