1
0
mirror of https://github.com/golang/go synced 2024-11-19 12:44:51 -07:00
Commit Graph

34064 Commits

Author SHA1 Message Date
Austin Clements
56462d0f10 runtime: normalize (*sigctxt).fault() type
(*sigctxt).fault() currently returns either uintptr, uint32, or uint64
depending on the platform. Make them all return uintptr.

For #10958 (but a nice change on its own).

Change-Id: I7813e779d0edcba112dd47fda776f4ce6e50e227
Reviewed-on: https://go-review.googlesource.com/68015
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2017-10-05 02:31:25 +00:00
Austin Clements
ba42b3ffd3 cmd/link: sniff runtime-gdb.py path from runtime/proc.go
Currently the linker figures out where runtime-gdb.py should be by
looking for the path to runtime/debug.go. However, debug.go contains
only a few symbols and can easily get dead-code eliminated entirely,
especially from simple binaries. When this happens, the resulting
binary lacks a reference to runtime-gdb.py, so the GDB helpers don't
get loaded.

Fix this by instead sniffing for runtime/proc.go. This contains
runtime.main and the scheduler, so it's not going anywhere.

Change-Id: Ie3380c77c840d28614fada68b8c5861625f2aff5
Reviewed-on: https://go-review.googlesource.com/68019
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-10-05 02:02:50 +00:00
Matthew Dempsky
d36cc9baf3 cmd/compile: refactor dtypesym to return *obj.LSym
All of the callers want a *obj.LSym instead of a *types.Sym, and the
runtime type descriptors don't need Go source symbols anyway.

Passes toolstash-check.

Change-Id: I8ae4b64380fbb547857f49b42465118f41884eed
Reviewed-on: https://go-review.googlesource.com/68251
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-04 22:03:52 +00:00
Chris Broadfoot
ec40c7e189 doc: add missing "Minor revisions" header for 1.9
Change-Id: Ib042e472e62f48a6afaba1762beaf102a9b99cf5
Reviewed-on: https://go-review.googlesource.com/68290
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-04 20:22:15 +00:00
Sokolov Yura
9d9722a2e1 runtime: fix using fastrand in sema.go
Before CL 62530 fastrand always returned non-zero value, and one
condition in sema.go depends on this behavior.

fastrand is used to generate random weight for treap of sudog, and
it is checked against zero to verify sudog were inserted into treap or
wait queue.

Since its precision is not very important for correctness, lets just
always set its lowest bit in this place.

Updates #22047
Updates #21806

Change-Id: Iba0b56d81054e6ef9c49ffd293fc5d92a6a31e9b
Reviewed-on: https://go-review.googlesource.com/68050
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-04 18:41:11 +00:00
Chris Broadfoot
dbb13eff8e doc: document go1.9.1 and go1.8.4
Change-Id: Ib42fabc6829b6033373c0378713733f88e73e73d
Reviewed-on: https://go-review.googlesource.com/68230
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-04 18:24:32 +00:00
Russ Cox
ec3b6131de net/smtp: fix PlainAuth to refuse to send passwords to non-TLS servers
PlainAuth originally refused to send passwords to non-TLS servers
and was documented as such.

In 2013, issue #5184 was filed objecting to the TLS requirement,
despite the fact that it is spelled out clearly in RFC 4954.
The only possibly legitimate use case raised was using PLAIN auth
for connections to localhost, and the suggested fix was to let the
server decide: if it advertises that PLAIN auth is OK, believe it.
That approach was adopted in CL 8279043 and released in Go 1.1.

Unfortunately, this is exactly wrong. The whole point of the TLS
requirement is to make sure not to send the password to the wrong
server or to a man-in-the-middle. Instead of implementing this rule,
CL 8279043 blindly trusts the server, so that if a man-in-the-middle
says "it's OK, you can send me your password," PlainAuth does.
And the documentation was not updated to reflect any of this.

This CL restores the original TLS check, as required by RFC 4954
and as promised in the documentation for PlainAuth.
It then carves out a documented exception for connections made
to localhost (defined as "localhost", "127.0.0.1", or "::1").

Change-Id: I1d3729bbd33aa2f11a03f4c000e6bb473164957b
Reviewed-on: https://go-review.googlesource.com/68170
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-04 18:02:41 +00:00
Matthew Dempsky
b2e7eae7c4 cmd/compile: remove Local flags on Type and Node
These are redundant with checking x.Sym.Pkg == localpkg.

Passes toolstash-check -all.

Change-Id: Iebe25f7932cd15a036141b468ad75c239abcdcf7
Reviewed-on: https://go-review.googlesource.com/66670
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-10-04 17:55:43 +00:00
Matthew Dempsky
e59fe206e7 cmd/compile: mark closure structs as Noalg
Avoids generating useless equality and hash functions.

Shrinks cmd/go executable size on linux/amd64 by ~17kB.

Change-Id: Ifde5315cc5cbceb3a7260195c8803cace952359f
Reviewed-on: https://go-review.googlesource.com/66650
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-10-04 17:55:36 +00:00
Russ Cox
ec71ee078f cmd/go: reject update of VCS inside VCS
This can only lead to confusion.

Change-Id: Iae84c6404ab5eeb6950faa2364f97a017c67c506
Reviewed-on: https://go-review.googlesource.com/68110
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Simon Rawet <Simon@rawet.se>
2017-10-04 17:52:52 +00:00
Marvin Stenger
aa00c607e1 math/big: remove []byte/string conversions
This removes some of the []byte/string conversions currently
existing in the (un)marshaling methods of Int and Rat.

For Int we introduce a new function (*Int).setFromScanner() essentially
implementing the SetString method being given an io.ByteScanner instead
of a string. So we can handle the string case in (*Int).SetString with
a *strings.Reader and the []byte case in (*Int).UnmarshalText() with a
*bytes.Reader now avoiding the []byte/string conversion here.

For Rat we introduce a new function (*Rat).marshal() essentially
implementing the String method outputting []byte instead of string.
Using this new function and the same formatting rules as in
(*Rat).RatString we can implement (*Rat).MarshalText() without
the []byte/string conversion it used to have.

Change-Id: Ic5ef246c1582c428a40f214b95a16671ef0a06d9
Reviewed-on: https://go-review.googlesource.com/65950
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-04 17:16:52 +00:00
Russ Cox
3a35e0253c runtime: deflake TestPeriodicGC
It was only waiting 0.1 seconds for the two GCs it wanted.
Let it wait 1 second.

Change-Id: Ib3cdc8127cbf95694a9f173643c02529a85063af
Reviewed-on: https://go-review.googlesource.com/68151
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-04 16:57:26 +00:00
Julien Schmidt
678ce97635 database/sql: fix unreachable code in ColumnTypes test
Before this change the ct == 0 check could never be true. Moreover the
values were not properly indirected.

Change-Id: Ice47e36e3492babc4b47d2f9099e8772be231c96
Reviewed-on: https://go-review.googlesource.com/68130
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-04 16:30:44 +00:00
David Crawshaw
c80338accb cmd/link: remove ctxt from objfile reader
Preparation for moving the object file reader to its own package.

For #22095

Change-Id: I31fe4a10a2c465f8ea4bf548f40918807e4ec6b5
Reviewed-on: https://go-review.googlesource.com/67314
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 16:02:56 +00:00
Gabriel Aszalos
52abe50c33 bytes: correct Map documentation
Fix incorrect reference to string instead of byte slice.

Change-Id: I95553da32acfbcf5dde9613b07ea38408cb31ae8
Reviewed-on: https://go-review.googlesource.com/68090
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 14:27:22 +00:00
David Crawshaw
0346664421 cmd/link: convert symbol Add* functions to methods
Also reduce the passed context from *Link to *sys.Arch, so fewer
data dependencies need to be wired through all the code dealing
with symbols.

For #22095

Change-Id: I50969405d6562c5152bd1a3c443b72413e9b70bc
Reviewed-on: https://go-review.googlesource.com/67313
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 12:22:30 +00:00
Andrew Bonventre
2e405bde03 doc: update contribute.html to clarify replying to reviews via email
Update golang/go#22120

Change-Id: Ie7dbd0e7b01b116c960243a8cd3fa9fd121f317d
Reviewed-on: https://go-review.googlesource.com/68021
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2017-10-04 05:01:18 +00:00
Author Name
5f83b2d14a net: increase expected time to dial a closed port on all Darwin ports
All current darwin architectures seem to take at least 100ms to dial a closed port,
and that was making the all.bash script fail.

Fixes #22062

Change-Id: Ib79c4b7a5db2373c95ce5d993cdcbee55cc0667f
Reviewed-on: https://go-review.googlesource.com/67350
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 04:55:13 +00:00
David Crawshaw
273b657b4e cmd/link: support -X values for main.* in plugins
Fixes #19418

Change-Id: I98205f40c1915cd68a5d20438469ba06f1efb160
Reviewed-on: https://go-review.googlesource.com/67432
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 00:46:06 +00:00
David Crawshaw
5fe9bbcf63 cmd/link: remove coutbuf global variable
Begin passing coutbuf by as a parameter. To make the initial plumbing
pass easier, it is also a field in the standard ctxt parameter.

Consolidate the byte writing functions into the OutBuf object.
The result is less architecture-dependent initialization.

To avoid plumbing out everywhere we want to report an error, move
handling of out file deletion to an AtExit function.

For #22095

Change-Id: I0863695241562e0662ae3669666c7922b8c846f9
Reviewed-on: https://go-review.googlesource.com/67318
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-04 00:37:27 +00:00
David Crawshaw
5d95de2072 cmd/link: remove SysArch global variable
For #22095

Change-Id: I9d1f0d93f8fd701a24af826dc903eea2bc235de2
Reviewed-on: https://go-review.googlesource.com/67317
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 23:32:02 +00:00
Keith Randall
0a7ef31d7d runtime: give modulesSlice the correct type
No need to type this global as an unsafe.Pointer, we know
what type the referent is.

Change-Id: I7b1374065b53ccf1373754a21d54adbedf1fd587
Reviewed-on: https://go-review.googlesource.com/67990
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-03 23:21:50 +00:00
Giovanni Bajo
d8ff3d5920 runtime: fix wall time computation in macOS High Sierra
Latest macOS High Sierra changed how the wall time information
is exported into the commpage. Backward compatibility was partly
preserved, that is previous Go versions are basically forced to
go through a syscall which is much slower and is not able to
get nanosecond precision.

Implement the new commpage layout and wall time computation,
using a version check to fallback to the previous code on
older operating systems.

Fixes #22037

Change-Id: I8c2176eaca83a5d7be23443946a6b4c653ec7f68
Reviewed-on: https://go-review.googlesource.com/67332
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 20:33:29 +00:00
Russ Cox
b78bce08e3 cmd/go: ignore -linkmode=external during cmd/cgo build
cmd/cgo is special among the build tools because it is (re)built on demand
when needed for a package using cgo, to avoid additional bootstrap logic
elsewhere. (This is in contrast to cmd/compile, cmd/link, and so on, which
must be specially built before even invoking the go command.)

When the go command starts using content-based decisions about staleness,
it is important that the build of cmd/cgo never use -linkmode=external,
because that depends on runtime/cgo, which in turn depends on cmd/cgo.

Change-Id: I72a2be748606d1ed4b93a54f2a5c7084e87d5fbc
Reviewed-on: https://go-review.googlesource.com/67310
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 19:58:10 +00:00
Russ Cox
3cdf6100f1 cmd/go: drop PackageInternal.Pkgdir (unused)
Change-Id: Iab8f0d201780bd571541a6806f071e883a553d35
Reviewed-on: https://go-review.googlesource.com/56286
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2017-10-03 19:56:36 +00:00
Russ Cox
8644463bb2 cmd/go: remove Action.Objpkg
This is an intermediate step toward not being able to predict
the final generated file name for a package build, so that
parent builds can refer directly to cache files.

Change-Id: I4dea5e8d8b80e6b995b3d9dc1d8c6f0ac9b88d72
Reviewed-on: https://go-review.googlesource.com/56285
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 19:56:19 +00:00
Russ Cox
e8fd15fd05 cmd/go: replace PackageInternal.GoFiles, AllGoFiles with methods
These are rarely used and can be computed on demand,
to make clear that they are never out of sync with the
lists in the non-internal Package fields.

Change-Id: I8c621dceaff1aeb39a3ed83f18e848adf14d7106
Reviewed-on: https://go-review.googlesource.com/56284
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 19:56:01 +00:00
Marvin Stenger
b4f21d6e22 cmd/dist: fix mkdeps again
Actually execute topological sort to get those special dependencies right.

Mistake introduced in CL 67650.

Change-Id: I22fd6efb4f033deaf7f191431c0401b59b8a97d0
Reviewed-on: https://go-review.googlesource.com/67870
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 19:43:22 +00:00
Heschi Kreinick
0b6b5641d7 cmd/compile: use correct stack slots in location lists
When variables need to be spilled to the stack, they usually get their
own stack slot. Local variables have a slot allocated if they need one,
and arguments start out on the stack. Before this CL, the debug
information made the assumption that this was always the case, and so
didn't bother storing an actual stack offset during SSA analysis.

There's at least one case where this isn't true: variables that alias
arguments. Since the argument is the source of the variable, the
variable will begin its life on the stack in the argument's stack slot,
not its own. Therefore the debug info needs to track the actual stack
slot for each location entry.

No detectable performance change, despite the O(N) loop in getHomeSlot.

Change-Id: I2701adb7eddee17d4524336cb7aa6786e8f32b46
Reviewed-on: https://go-review.googlesource.com/67231
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
2017-10-03 19:19:46 +00:00
Lynn Boger
ca8c361d86 cmd/dist: use -buildmode=pie for pie testing
Some tests in misc/cgo/test are run with various options including
'-linkmode=external "-extldflags=-pie"'. On ppc64x passing -pie to
the external linker with code that was not compiled as position
independent is incorrect. This works by luck in many cases but is
not guaranteed to work. I suspect it is an issue on other targets
as well.

This will now run the tests using -buildmode=pie for the platforms
that support that buildmode option.

Fixes #21954

Change-Id: I25fc7573f2d3cb5b0d1c691a0ac91aef7715404f
Reviewed-on: https://go-review.googlesource.com/66870
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 18:41:48 +00:00
Tim Cooper
92ba9b5c40 go/printer: allow one-method interfaces to be printed on a single line
Previously, only the empty interface could be formatted to print on a
single line. This behaviour made short one-method interfaces in function
definitions and type assertions more verbose than they had to be.

For example, the following type assertion:

    if c, ok := v.(interface {
        Close() error
    }); ok {
    }

Can now be formatted as:

    if c, ok := v.(interface{ Close() error }); ok {
    }

Fixes #21952

Change-Id: I896f796c5a30b9f4da2be3fe67cb6fea5871b835
Reviewed-on: https://go-review.googlesource.com/66130
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-10-03 16:41:54 +00:00
Joe Tsai
e04ff3d133 archive/tar: fix typo in documentation
s/TypeSymLink/TypeSymlink/g

Change-Id: I2550843248eb27d90684d0036fe2add0b247ae5a
Reviewed-on: https://go-review.googlesource.com/67810
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 16:24:53 +00:00
griesemer
5d1addf45d go/printer: fix formatting of three-index slice expression
Apply gofmt to src, misc.

Fixes #22111.

Change-Id: Ib1bda0caaf2c1787a8137b7a61bbef7a341cc68c
Reviewed-on: https://go-review.googlesource.com/67633
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-03 16:16:30 +00:00
Giovanni Bajo
11f494f37e runtime: rename offsets macros to prepare for multiple versions
High Sierra has a new commpage layout (this is issue #3188), so
we need to adjust the code to handle multiple versions of the
layout.

In preparation for this change, we rename the existing offset
macros with a prefix that identifies the commpage version they
refer to.

Updates #22037

Change-Id: Idca4b7a855a2ff6dbc434cd12453fc3194707aa8
Reviewed-on: https://go-review.googlesource.com/67331
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 14:53:33 +00:00
Florian Uekermann
630d176e7d time: enable ZONEINFO tzdata file support and error reporting
Loading location data from tzdata files was only supported
from default paths on android. This change enables support on
all OS via the ZONEINFO environment variable and reduces the
amount of android specific code significantly.
Furthermore, unsuccessful calls to LoadLocation now return the
first error encountered, including errors from attempting to
load a location from the source specified by ZONEINFO.
Errors indicating that the source or location was not found are
ignored until all possible sources have been traversed.

Change-Id: I45bc23b92253c9447f12f95f3ca29a7e613ed995
Reviewed-on: https://go-review.googlesource.com/67170
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 14:35:32 +00:00
Ian Lance Taylor
a9345307a1 doc: update GCC release info in gccgo_install
Fixes #22077

Change-Id: I8d1b18e78719514fa2a410e85c9d3934c47cd2fe
Reviewed-on: https://go-review.googlesource.com/66930
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2017-10-03 14:33:14 +00:00
Grant Griffiths
0bbc3dd4b5 net/smtp: patch for SMTP injections
Fixes #21159.

Change-Id: I2c5ad505d673e213a548e5d632a5b3ad706e0dde
Reviewed-on: https://go-review.googlesource.com/67635
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 14:23:31 +00:00
Elias Naur
eb5bf55496 misc/ios: always kill lldb process when it hangs
The lldb child process is killed if a test runs too long. Also
kill it when the setup times out (and is retried).

Might help with builder flakes where all 5 attempts to start up
lldb fail even though the tests before and after the timeouts
succeed. For example:

...
ok  	vendor/golang_org/x/net/route	37.797s
lldb setup error: command timeout (lldb start for 17s)
start timeout, trying again
lldb setup error: command timeout (lldb start for 17s)
start timeout, trying again
lldb setup error: command timeout (lldb start for 17s)
start timeout, trying again
lldb setup error: command timeout (lldb start for 17s)
start timeout, trying again
lldb setup error: command timeout (lldb start for 17s)
go_darwin_arm_exec: failed to start test harness (retry attempted)
FAIL	vendor/golang_org/x/text/transform	115.185s
ok  	vendor/golang_org/x/text/unicode/norm	122.773s
...

Change-Id: I6638860522896491dccfa12f1e520c0f23df6d66
Reviewed-on: https://go-review.googlesource.com/67791
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 14:21:35 +00:00
Russ Cox
6b4008db8b cmd/go: drop PackageInternal.Fake
The point of this code is to print a warning about repeated go test
invocations rebuilding the same packages over and over.
The new cache will eliminate this failure mode and with it
the need for the warning and this field.

Change-Id: Ied79b3ca67d51a61f44629de6ae4974e6c8dd5a9
Reviewed-on: https://go-review.googlesource.com/56282
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 14:11:06 +00:00
Russ Cox
9f52b5ab14 cmd/dist: fix mkdeps
Mistake introduced just before submitting CL 67650 that somehow
did not break a final pre-submit all.bash on my laptop.

Not sure why all.bash passes locally when mkdeps.go doesn't build.
I guess the test only runs on builders?

Change-Id: I18fb91ada47605035345ba4b2f5e360a5c4b7f6e
Reviewed-on: https://go-review.googlesource.com/67850
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-03 14:10:17 +00:00
Russ Cox
94e6d3de72 cmd/dist: change mkdeps to be more merge-friendly
In addition to the obvious formatting change, this also drops
from deps.go any indirect dependencies, so that when you add
a new import to one package, the resulting diff only affects that
one package, not every package that imports that package
directly or indirectly. That makes the file a bit easier to understand,
if you need to debug it or deal with a possible merge conflict.

The code to trim the import lists (but not too much) was more
than I wanted to do in shell, so I rewrote mkdeps in Go.

The shell script is left behind for backwards-compatibility with
people who have learned to run ./mkdeps.bash (or documentation
suggesting the same).

Change-Id: I0bf27b5b27d0440e11ea830b00735c73f58eae03
Reviewed-on: https://go-review.googlesource.com/67650
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-03 14:06:29 +00:00
Austin Clements
70258cc59f cmd/compile: rename (*Type).HasPointer to (*Type).HasHeapPointer
This method indicates whether a type contains any *heap* pointers, not
just whether it contains any pointers. Rename the method to make this
clear.

Change-Id: Ifff143e2f02a820444ac26b84250495c0098cb33
Reviewed-on: https://go-review.googlesource.com/67690
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-10-03 13:40:06 +00:00
Lynn Boger
f47c8f130e runtime: skip test that intermittently hangs on ppc64le
A new testcase TestSelectFairness was recently added, and
since then the ppc64le build tests have intermittently failed.

This adds a change to skip this test on ppc64le using
SkipFlaky to help determine if the problem is with the
test or something else with that commit.

Updates #22047

Change-Id: Idfef72ed791c5bd45c42ff180947fea3df280ea7
Reviewed-on: https://go-review.googlesource.com/67631
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-03 12:26:42 +00:00
Keith Randall
41eabc0fc7 cmd/compile: fix merge rules for panic calls
Use entire inlining call stack to decide whether two panic calls
can be merged. We used to merge panic calls when only the leaf
line numbers matched, but that leads to places higher up the call
stack being merged incorrectly.

Fixes #22083

Change-Id: Ia41400a80de4b6ecf3e5089abce0c42b65e9b38a
Reviewed-on: https://go-review.googlesource.com/67632
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-10-03 09:27:37 +00:00
Martin Kreichgauer
d851f10b81 crypto/x509: add string conversion of PKIX names
Fixes #21615

Change-Id: Ic13190617d9b446b35f5dd00f142597c187ab669
Reviewed-on: https://go-review.googlesource.com/67270
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-03 00:11:25 +00:00
Artyom Pervukhin
d1bef43daf net/http: make TimeoutHandler recover child handler panics
Fixes #22084.

Change-Id: If405ffdc57fcf81de3c0e8473c45fc504db735bc
Reviewed-on: https://go-review.googlesource.com/67410
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
2017-10-02 19:42:50 +00:00
Adam Langley
c4d63a0d34 crypto/x509: abstract SAN parsing function
We'll need this for handling name constraints during verification.

Change-Id: I4ef19d9489fb2a9ae9a62699d81cef92a21fda28
Reviewed-on: https://go-review.googlesource.com/62692
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-02 18:30:34 +00:00
Adam Langley
3079b0ad89 crypto/x509: reject empty name constraints extension
Change-Id: Idcda0fc1607157cb5bbf0521fbdc0c77f043ca3a
Reviewed-on: https://go-review.googlesource.com/62691
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-02 18:30:13 +00:00
Alan Donovan
93f1aac246 cmd/vet: in rangeloop check, inspect for loop variables too
+ Test.

Change-Id: I42eaea1c716217f7945c008ff4bde6de14df5687
Reviewed-on: https://go-review.googlesource.com/34619
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-10-02 17:45:00 +00:00
Guilherme Rezende
66fa4fc8b9 net/http: use canonicalAddr on shouldCopyHeaderOnRedirect
Change-Id: Ic3f7f575d3640706adb7d64545ed8027add6c58f
Reviewed-on: https://go-review.googlesource.com/61350
Run-TryBot: Tom Bergan <tombergan@google.com>
Reviewed-by: Tom Bergan <tombergan@google.com>
2017-10-02 17:21:04 +00:00