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

30476 Commits

Author SHA1 Message Date
Quentin Smith
c2917af628 cmd/go: handle escapes in pkg-config output
This commit also adds a test for pkg-config usage in cgo.

Fixes #16455.

Change-Id: I95fb6a288a4d19093c4613c93878017d95cbe4a2
Reviewed-on: https://go-review.googlesource.com/32735
Run-TryBot: Quentin Smith <quentin@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-11-07 21:50:26 +00:00
Michael Munday
47d1c42aff crypto/tls: use default cipher suites in BenchmarkThroughput
CL 32871 updated the default cipher suites to use AES-GCM in
preference to ChaCha20-Poly1305 on platforms which have hardware
implementations of AES-GCM. This change makes BenchmarkThroughput
use the default cipher suites instead of the test cipher suites to
ensure that the recommended (fastest) algorithms are used.

Updates #17779.

Change-Id: Ib551223e4a00b5ea197d4d73748e1fdd8a47c32d
Reviewed-on: https://go-review.googlesource.com/32838
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2016-11-07 21:18:21 +00:00
Robert Griesemer
1a279b34f6 go/constant: follow-up for https://go-review.googlesource.com/32870
For #17812.

Change-Id: I58411aaa0e8b2250a16ddb20c951e39da3d601e8
Reviewed-on: https://go-review.googlesource.com/32872
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-11-07 20:59:49 +00:00
Quentin Smith
231aa9d6d7 os: use extended-length paths on Windows when possible
Windows has a limit of 260 characters on normal paths, but it's possible
to use longer paths by using "extended-length paths" that begin with
`\\?\`. This commit attempts to transparently convert an absolute path
to an extended-length path, following the subtly different rules those
paths require. It does not attempt to handle relative paths, which
continue to be passed to the operating system unmodified.

This adds a new test, TestLongPath, to the os package. This test makes
sure that it is possible to write a path at least 400 characters long
and runs on every platform. It also tests symlinks and hardlinks, though
symlinks are not testable with our builder configuration.

HasLink is moved to internal/testenv so it can be used by multiple tests.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
has Microsoft's documentation on extended-length paths.

Fixes #3358.
Fixes #10577.
Fixes #17500.

Change-Id: I4ff6bb2ef9c9a4468d383d98379f65cf9c448218
Reviewed-on: https://go-review.googlesource.com/32451
Run-TryBot: Quentin Smith <quentin@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-11-07 20:31:02 +00:00
Shenghou Ma
2058511e4e runtime: os.Executable runtime support for Darwin
Change-Id: Ie21df37016c90cd0479c23ec4845f8195dd90fda
Reviewed-on: https://go-review.googlesource.com/16518
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 20:18:36 +00:00
Shenghou Ma
f335fcf0fc syscall: add Getexecname on Solaris for os.Executable
Change-Id: Icd77ccbfe6a31117a11effb949b5826950df75a9
Reviewed-on: https://go-review.googlesource.com/16550
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 20:18:29 +00:00
Adam Langley
a9ce0f96e1 crypto/{cipher,tls,internal/cryptohw}: prioritise AES-GCM when hardware support is present.
Support for ChaCha20-Poly1305 ciphers was recently added to crypto/tls.
These ciphers are preferable in software, but they cannot beat hardware
support for AES-GCM, if present.

This change moves detection for hardware AES-GCM support into
cipher/internal/cipherhw so that it can be used from crypto/tls. Then,
when AES-GCM hardware is present, the AES-GCM cipher suites are
prioritised by default in crypto/tls. (Some servers, such as Google,
respect the client's preference between AES-GCM and ChaCha20-Poly1305.)

Fixes #17779.

Change-Id: I50de2be486f0b0b8052c4628d3e3205a1d54a646
Reviewed-on: https://go-review.googlesource.com/32871
Run-TryBot: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 20:01:18 +00:00
Quentin Smith
9e4a70e8fd mime/multipart: test for overreading on a stream
Some multipart data arrives in a stream, where subsequent parts may not
be ready yet. Read should return a complete part as soon as
possible.

Fixes #15431

Change-Id: Ie8c041b853f3e07f0f2a66fbf4bcab5fe9132a7c
Reviewed-on: https://go-review.googlesource.com/32032
Run-TryBot: Quentin Smith <quentin@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 19:32:11 +00:00
Brad Fitzpatrick
44febb28b6 cmd/go: parallelize some tests
Cuts tests from 35 to 25 seconds.

Many of these could be parallel if the test runner were modified to
give each test its own workdir cloned from the tempdir files they
use. But later. This helps for now.

Updates #17751

Change-Id: Icc2ff87cca60a33ec5fd8abb1eb0a9ca3e85bf95
Reviewed-on: https://go-review.googlesource.com/32850
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-07 19:20:13 +00:00
Robert Griesemer
4eb9832724 go/constant: improved fatal error messages
Fixes #17812.

Change-Id: I08202165dd3f72ae04420e7b6129b8b689e74f5c
Reviewed-on: https://go-review.googlesource.com/32870
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-11-07 19:09:21 +00:00
Ian Lance Taylor
9d139ac3fa unsafe: remove incorrect type conversion in docs
Fixes #17818.

Change-Id: Id7242b0bdd5e1db254b44ae29900fc4f3362c743
Reviewed-on: https://go-review.googlesource.com/32828
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-07 18:54:14 +00:00
Joe Farrell
f815499fab doc: fix broken links in 1.7 release docs
Change-Id: Ibf73ee7be4591393f4e08d464edfa325c3ec2c11
Reviewed-on: https://go-review.googlesource.com/32798
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-07 18:51:29 +00:00
Michael Munday
4cc83d49d2 cmd/dist: enable more cgo tests on ppc64le
The tests all pass (for me at least) so I don't think there is any
reason not to enable them.

Change-Id: I96e71383e573273f442a849914cf6458ada14f82
Reviewed-on: https://go-review.googlesource.com/32855
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 18:43:11 +00:00
Michael Munday
6c2a35ae0c test/fixedbugs: enable issue 10607 test on ppc64le
ppc64le supports both internal and external linking so I don't
think there is any reason for it to skip this test.

Change-Id: I05c80cc25909c0364f0a1fb7d20766b011ea1ebb
Reviewed-on: https://go-review.googlesource.com/32854
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 18:42:57 +00:00
Lynn Boger
ec77b8e09c cmd/link: don't use trampolines in ppc64le ext linking
On ppc64x, trampolines are used to resolve too-far
branches for internal linking.  The external linking,
solution on ppc64x is to split text sections when they
get too large, allowing the external linker to handle
the long branches.

On arm trampolines are generanted for too-far branches
for internal and external linking.  When the change
was made recently to enable trampolines for external linking
on arm, that broke the ppc64x fix for too-far branches
with external linking.

The fix adds a check to use trampolines only for internal
linking with ppc64x.

Fixes #17795

Change-Id: Icce968fb96545f10a913e07654514643bce96261
Reviewed-on: https://go-review.googlesource.com/32853
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
2016-11-07 15:03:24 +00:00
Brad Fitzpatrick
3df059ece5 net/http/fcgi: fix link to protocol docs
Fixes #17815

Change-Id: I766082d28a14c77f5dfb6cd1974b86cb0a8fe31a
Reviewed-on: https://go-review.googlesource.com/32852
Reviewed-by: Minux Ma <minux@golang.org>
2016-11-07 06:46:01 +00:00
Alex Brainman
f8187ceacf runtime/race: allow TestFail to run longer than 0.00s
Fixes #17811

Change-Id: I7bf9cbc5245417047ad28a14d9b9ad6592607d3d
Reviewed-on: https://go-review.googlesource.com/32774
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-07 02:55:52 +00:00
Brad Fitzpatrick
e017802597 cmd/vet: parallelize tests
Was 2.3 seconds. Now 1.4 seconds.

Next win would be not running a child process and refactoring main so
it could be called from tests easily. But that would also require
rewriting the errchk written in Perl. This appears to be the last user
of errchk in the tree.

Updates #17751

Change-Id: Id7c3cec76f438590789b994e756f55b5397be07f
Reviewed-on: https://go-review.googlesource.com/32754
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-11-06 20:11:48 +00:00
Robert Griesemer
2b445c7645 go/constant: document that BinaryOp doesn't handle comparisons or shifts
Fixes #17797.

Change-Id: I544df81c4bcf3cbd36a793be40050f14f9a9974f
Reviewed-on: https://go-review.googlesource.com/32761
Reviewed-by: Dominik Honnef <dominik@honnef.co>
2016-11-05 23:59:04 +00:00
Josh Bleecher Snyder
d0cf042171 net: fix vet nit
net/fd_windows.go:121: syscall.WSABuf composite literal uses unkeyed fields

Change-Id: I91cbe38199d5b6828379a854d08f6ceaf687dd82
Reviewed-on: https://go-review.googlesource.com/32760
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-05 18:24:40 +00:00
Brad Fitzpatrick
f9d406ebea net/http: deflake TestLinuxSendfile
Fixes #17805

Change-Id: I30d3e63a82b3690a76f2bb33d59ae34c62a7fa59
Reviewed-on: https://go-review.googlesource.com/32759
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-05 01:17:21 +00:00
Brad Fitzpatrick
276c29ff6d net/http: deflake TestClientRedirectTypes and maybe some similar ones
A few tests were using the global DefaultTransport implicitly.
Be explicit instead. And then make some parallel while I'm there.

Change-Id: I3c617e75429ecc8f6d23567d1470f5e5d0cb7cfd
Reviewed-on: https://go-review.googlesource.com/32758
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-05 01:03:25 +00:00
Robert Griesemer
65269e7066 cmd/go/internal/syntax: reintroduce reverted comments
These comments were originally introduced together with the changes
for alias declarations, and then reverted when we backed out alias
support.

Reintroduce them.

Change-Id: I3ef2c4f4672d6af8a900f5d73df273edf28d1a14
Reviewed-on: https://go-review.googlesource.com/32826
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-11-05 00:47:04 +00:00
Robert Griesemer
429edcff10 Revert "cmd/compile/internal/syntax: support for alias declarations"
This reverts commit 32db3f2756.

Reason: Decision to back out current alias implementation.

For #16339.

Change-Id: Ib05e3d96041d8347e49cae292f66bec791a1fdc8
Reviewed-on: https://go-review.googlesource.com/32825
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-11-05 00:46:39 +00:00
Robert Griesemer
a1a688fa00 Revert "go/scanner, go/token: recognize => (ALIAS) token"
This reverts commit 776a90100f.

Reason: Decision to back out current alias implementation.

For #16339.

Change-Id: Icb451a122c661ded05d9293356b466fa72b965f3
Reviewed-on: https://go-review.googlesource.com/32824
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-11-05 00:40:28 +00:00
Robert Griesemer
2808f1f415 Revert "go/ast, go/parser: parse alias declarations"
This reverts commit 57ae83307f.

Reason: Decision to back out current alias implementation.

For #16339.

Change-Id: I7bcc04ac87ea3590999e58ff65a7f2e1e6c6bc77
Reviewed-on: https://go-review.googlesource.com/32823
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-11-05 00:32:33 +00:00
Leon Klingele
c350c5cfdc plugin: fix doc example fmt usage
Change-Id: I0520a37a48a56d231a8ac2dc58b2bf1762282760
Reviewed-on: https://go-review.googlesource.com/32795
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-05 00:23:55 +00:00
Robert Griesemer
7179c1acd9 Revert "go/printer: support for printing alias declarations"
This reverts commit 59c63c711c.

Reason: Decision to back out current alias implementation.

For #16339.

Change-Id: Idd135fe84b7ce4814cb3632f717736fc6985634c
Reviewed-on: https://go-review.googlesource.com/32822
Reviewed-by: Chris Manghane <cmang@golang.org>
2016-11-05 00:22:15 +00:00
Robert Griesemer
26e43779f1 Revert "cmd/vet: teach vet about ast.AliasSpec"
This reverts commit aa8c8e770e.

Reason: Decision to back out current alias implementation.

For #16339.

Change-Id: I4db9a8d6b3625c794be9d2f1ff0e9c047f383d28
Reviewed-on: https://go-review.googlesource.com/32827
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Manghane <cmang@golang.org>
2016-11-05 00:18:05 +00:00
Robert Griesemer
8e970536df cmd/compile: revert user-visible changes related to aliases
Reason: Decision to back out current alias implementation.

Leaving import/export related code in place for now.

For #16339.

TBR=mdempsky

Change-Id: Ib0897cab2c1c3dc8a541f2efb9893271b0b0efe2
Reviewed-on: https://go-review.googlesource.com/32757
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-11-04 23:44:15 +00:00
Brad Fitzpatrick
dd1e7b3be0 crypto/x509: update __MAC_OS_X_VERSION_MAX_ALLOWED on Mac
Reportedly, -mmacosx-version-min=10.6 -D__MAC_OS_X_VERSION_MAX_ALLOWED=1060
is problematic.

It means min 10.6 and max 10.6, thus exactly 10.6. But we only support
10.8+.

It never caused us problems, because we build on Macs, but apparently
if you cross-compile from Linux with some Mac compiler SDK thing, then
things break?

This was added in https://golang.org/cl/5700083 for #3131, and the
intent at the time was to pin to exactly 10.6. So it wasn't a mistake,
but it is definitely outdated.

Given that we now support 10.8 as the min, update it to 1080.

Fixes #17732

Change-Id: I6cc8ab6ac62b8638a5025952b830f23e8822b2a6
Reviewed-on: https://go-review.googlesource.com/32580
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Quentin Smith <quentin@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 23:02:39 +00:00
Robert Griesemer
039e60ce4e go/types: revert user-visible changes related to aliases
Reason: Decision to back out current alias implementation.
For #16339 (comment).

Change-Id: Ie04f24e529db2d29c5dd2e36413f5f37f628df39
Reviewed-on: https://go-review.googlesource.com/32819
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-11-04 22:28:07 +00:00
Alan Donovan
2c6949ec89 go/types: avoid redundant call to recordUse for anonymous fields
Anonymous fields are type expressions, and Checker.typexpr already
correctly records uses within them.  There's no need for a second
call, and the second call caused a bug when we implemented aliases.

Change-Id: I1bf2429cd4948d68b085e75dfb1bdc03ad8caffd
Reviewed-on: https://go-review.googlesource.com/32837
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-11-04 21:44:57 +00:00
Michael Munday
cfd89164bb all: make copyright headers consistent with one space after period
Continuation of CL 20111.

Change-Id: Ie2f62237e6ec316989c021de9b267cc9d6ee6676
Reviewed-on: https://go-review.googlesource.com/32830
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 20:46:25 +00:00
Vladimir Stefanovic
7f033933ce cmd/compile/internal/gc: add support for GOARCH=mips{,le}
Change-Id: Ida4cd647525abce3441bfcb9fdee059344fe717f
Reviewed-on: https://go-review.googlesource.com/31477
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2016-11-04 20:15:23 +00:00
Robert Griesemer
87f4e36ce7 Revert "spec: add new language for alias declarations"
This reverts commit aff37662d1.

Reason: Decision to back out current alias implementation.
https://github.com/golang/go/issues/16339#issuecomment-258527920

Fixes #16339.
Fixes #17746.
Fixes #17784.

Change-Id: I5737b830d7f6fb79cf36f26403b4ad8533ba1dfe
Reviewed-on: https://go-review.googlesource.com/32813
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-11-04 19:57:23 +00:00
Vladimir Stefanovic
585a0b03b2 cmd/link/internal/ld: add support for GOARCH=mips{,le}
Change-Id: Ida214ccc5858969ea60abb0787f4d98bab4336d6
Reviewed-on: https://go-review.googlesource.com/31480
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2016-11-04 19:27:35 +00:00
Vladimir Stefanovic
5bfafff03f cmd/vet: add support for GOARCH=mips{,le}
Change-Id: Ie7b40cc67e9901e252a4a48225bbd745a66d2673
Reviewed-on: https://go-review.googlesource.com/31511
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2016-11-04 18:26:49 +00:00
Brad Fitzpatrick
2341631506 all: sprinkle t.Parallel on some slow tests
I used the slowtests.go tool as described in
https://golang.org/cl/32684 on packages that stood out.

go test -short std drops from ~56 to ~52 seconds.

This isn't a huge win, but it was mostly an exercise.

Updates #17751

Change-Id: I9f3402e36a038d71e662d06ce2c1d52f6c4b674d
Reviewed-on: https://go-review.googlesource.com/32751
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-04 16:56:57 +00:00
Vladimir Stefanovic
3f69909851 test: disable unsupported test for GOARCH=mips{,le}
External linking on mips/mipsle is not supported yet (issue #17792).

Change-Id: Ic25f4f8fe9e0ec35c72ca9f85c053b398df4952c
Reviewed-on: https://go-review.googlesource.com/31512
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 16:46:38 +00:00
Ian Lance Taylor
04d71354eb runtime: remove useless assignment in test code
Change-Id: I5fecdf52e9e3035ea8feb5768985ed5200dbd6af
Reviewed-on: https://go-review.googlesource.com/32752
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Martin Möhrmann <martisch@uos.de>
2016-11-04 14:09:52 +00:00
Emmanuel Odeke
d62b313863 net/http: move extra redirect logic for 307/308 into redirectBehavior
Follow up of CL https://go-review.googlesource.com/32595.

Change-Id: I2b3ff7e6b2c764bb6bc5e9aa692d0aed79eb5626
Reviewed-on: https://go-review.googlesource.com/32750
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-04 04:38:56 +00:00
Brad Fitzpatrick
cd670a61c1 net/http: speed up tests, use t.Parallel when it's safe
Before: 8.9 seconds for go test -short
 After: 2.8 seconds

There are still 250 tests without t.Parallel, but I got the important
onces using a script:

    $ go test -short -v 2>&1 | go run ~/slowtests.go

Where slowtests.go is https://play.golang.org/p/9mh5Wg1nLN

The remaining 250 (the output lines from slowtests.go) all have a
reported duration of 0ms, except one 50ms test which has to be serial.

Where tests can't be parallel, I left a comment at the top saying why,
so people don't add t.Parallel later and get surprised at failures.

Updates #17751

Change-Id: Icbe32cbe2b996e23c89f1af6339287fa22af5115
Reviewed-on: https://go-review.googlesource.com/32684
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2016-11-04 04:28:10 +00:00
Josh Bleecher Snyder
9f5859759e cmd/go: fix minor typo in 'go bug'
Change-Id: I6bb594576e174cb0df8d25d11b84f5a4752ebfd6
Reviewed-on: https://go-review.googlesource.com/32683
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 04:02:09 +00:00
Brad Fitzpatrick
b5c0470c8d net/http: fix type name in comment
Change-Id: Ia03f993287d2929f35b4c92d00fe25c7243bd8b3
Reviewed-on: https://go-review.googlesource.com/32685
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2016-11-04 03:37:38 +00:00
Brad Fitzpatrick
3440c7bc4c net/http: tweak the new Client 307/308 redirect behavior a bit
This CL tweaks the new (unreleased) 307/308 support added in
https://golang.org/cl/29852 for #10767.

Change 1: if a 307/308 response doesn't have a Location header in its
response (as observed in the wild in #17773), just do what we used to
do in Go 1.7 and earlier, and don't try to follow that redirect.

Change 2: don't follow a 307/308 if we sent a body on the first
request and the caller's Request.GetBody func is nil so we can't
"rewind" the body to send it again.

Updates #17773 (will be fixed more elsewhere)

Change-Id: I183570f7346917828a4b6f7f1773094122a30406
Reviewed-on: https://go-review.googlesource.com/32595
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 03:37:26 +00:00
Josh Bleecher Snyder
6e26925626 cmd/objdump: speed up tests
Rebuild cmd/objdump once instead of twice.
Speeds up standalone 'go test cmd/objdump' on my
machine from ~1.4s to ~1s.

Updates #17751

Change-Id: I15fd79cf18c310f892bc28a9e9ca47ee010c989a
Reviewed-on: https://go-review.googlesource.com/32673
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-04 00:50:53 +00:00
Matthew Dempsky
3797446150 cmd/compile: prevent Noalg from breaking user types
Use a separate symbol for reflect metadata for types with Noalg set.

Fixes #17752.

Change-Id: Icb6cade7e3004fc4108f67df61105dc4085cd7e2
Reviewed-on: https://go-review.googlesource.com/32679
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-04 00:11:28 +00:00
Vladimir Stefanovic
fa77001648 runtime/internal/sys: add arch defs for GOARCH=mips{,le}
Change-Id: I6288f1fca1ae4c64b3907af700811ee842053020
Reviewed-on: https://go-review.googlesource.com/31472
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-03 23:28:28 +00:00
Vladimir Stefanovic
66fdf433b0 cmd/internal/sys: add support for GOARCH=mips{,le}
Change-Id: I8c6b8839c68818430510702719dca15b8d748fb8
Reviewed-on: https://go-review.googlesource.com/31473
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-03 23:26:26 +00:00