1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:41:21 -06:00
Commit Graph

24111 Commits

Author SHA1 Message Date
Rob Pike
2d25318f08 asm: fix error messages and comments for "register pair"
The parser treats (R1+R2) on ppc64 the same as (R1,R2) on arm,
but it is not strictly a "register pair". Improve the text.

No semantic change.

Change-Id: Ib8b14881c6467add0d53150a901c01e962afb28b
Reviewed-on: https://go-review.googlesource.com/12212
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 05:45:29 +00:00
Russ Cox
38d9b2a3a9 runtime: diagnose invalid pointers during GC
For #9880. Let's see what breaks.

Change-Id: Ic8b99a604e60177a448af5f7173595feed607875
Reviewed-on: https://go-review.googlesource.com/10818
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
2015-07-15 05:42:06 +00:00
Russ Cox
7feb424928 cmd/compile: fix PtrTo(t) for unnamed t with embedded fields
Fixes #8427.

Change-Id: I826a3bc4519845ad30d6dbaf058fe7ed7bee8db0
Reviewed-on: https://go-review.googlesource.com/12233
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 05:36:27 +00:00
Russ Cox
bed6326a3c math: fix Log2 test failures on ppc64 (and s390)
- Make Log2 exact for powers of two.
- Fix error tolerance function to make tolerance
  a function of the correct (expected) value.

Fixes #9066.

Change-Id: I0320a93ce4130deed1c7b7685627d51acb7bc56d
Reviewed-on: https://go-review.googlesource.com/12230
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 05:35:22 +00:00
Russ Cox
671bddf0b0 encoding/json: fix out of phase error unmarshaling non-string into TextUnmarshaler
Fixes #9650.

Change-Id: I45b879124691e485b86c1e99a3227032283850d2
Reviewed-on: https://go-review.googlesource.com/12208
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 05:34:56 +00:00
Russ Cox
29f03a37c1 net/smtp: give example addrs in docs
Fixes #9140.

Change-Id: I3b85053262cac3c30358f8e03a5aca65dbc67623
Reviewed-on: https://go-review.googlesource.com/12231
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 05:34:29 +00:00
Russ Cox
307d6919bd cmd/go: print all test flags in "go test -h"
Originally 'go test -h' printed the output of 'go help test'.
Then issue #6576 was filed, because that output didn't list (for example) -bench.
CL 14502065 changed 'go test -h' to print the output of 'go help testflag'.
Then issue #9209 was filed, because that output didn't list (for example) -c.

To print all the relevant flags, parts of both 'go help test' and 'go help testflag'
are needed. Refactor the help messages to make those parts available
and print them.

Fixes #9209.

Change-Id: Ie8205b8fb37d00c10d25b3fc98f14286ec46c4e3
Reviewed-on: https://go-review.googlesource.com/12173
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 05:34:13 +00:00
Russ Cox
ef6d3a94fb cmd/dist: diagnose lack of gcc earlier in build
Fixes #10731.

Change-Id: I105629b03fd3323c0a2ca5b6b0fd35ee92b7fd2e
Reviewed-on: https://go-review.googlesource.com/12146
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 05:33:55 +00:00
Nigel Tao
c2023a0791 image/color: tweak the YCbCr to RGBA conversion formula.
Before, calling the RGBA method of YCbCr color would return red values
in the range [0x0080, 0xff80]. After, the range is [0x0000, 0xffff] and
is consistent with what Gray colors' RGBA method returns. In particular,
pure black, pure white and every Gray color in between are now exactly
representable as a YCbCr color.

This fixes a regression from Go 1.4 (where YCbCr{0x00, 0x80, 0x80} was
no longer equivalent to pure black), introduced by golang.org/cl/8073 in
the Go 1.5 development cycle. In Go 1.4, the +0x80 rounding was not
noticable when Cb == 0x80 && Cr == 0x80, because the YCbCr to RGBA
conversion truncated to 8 bits before multiplying by 0x101, so the
output range was [0x0000, 0xffff].

The TestYCbCrRoundtrip fuzzy-match tolerance grows from 1 to 2 because
the YCbCr to RGB conversion now maps to an ever-so-slightly larger
range, along with the usual imprecision of accumulating rounding errors.

Also s/int/int32/ in ycbcr.go. The conversion shouldn't overflow either
way, as int is always at least 32 bits, but it does make it clearer that
the computation doesn't depend on sizeof(int).

Fixes #11691

Change-Id: I538ca0adf7e040fa96c5bc8b3aef4454535126b9
Reviewed-on: https://go-review.googlesource.com/12220
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 05:29:00 +00:00
Russ Cox
5a4cc600b7 cmd/go: fix nocgo builder
Change-Id: I0f167d9769d9b6b9888c13fcb48e538fc87aa1b7
Reviewed-on: https://go-review.googlesource.com/12240
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 05:23:35 +00:00
Rob Pike
47f22ab775 time: make it clearer how to format a fractional second
Fixes #10963.

Change-Id: I8d769b4d25b306f2df41f882ec01d97bbd63171d
Reviewed-on: https://go-review.googlesource.com/12221
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 05:13:05 +00:00
Russ Cox
d000e8742a os/exec: document that Cmd.Wait waits for stdin I/O
Fixes #10338.

Change-Id: Ib86cb9a6c694b1e442a9957153c7ca38a7d11c3e
Reviewed-on: https://go-review.googlesource.com/12232
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 05:11:37 +00:00
Russ Cox
3d3a0169bf reflect: wait longer before declaring select test stuck
Fixes #9427.

Change-Id: If8094d4d4f6737c03d83e08e177c2a7f0ff9d89f
Reviewed-on: https://go-review.googlesource.com/12234
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 05:10:53 +00:00
Russ Cox
238a39594b cmd/go: add test for issue 3652
Fixes #3652. (Well, already fixed, but tests that it stays fixed.)

Change-Id: I4e17f595ee2ad513de86ac3861e8e66b1230b3be
Reviewed-on: https://go-review.googlesource.com/12195
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 05:06:50 +00:00
Russ Cox
7126da2fd5 cmd/go: fix build
Failures noted by dashboard.

Change-Id: I22f90120c6687b64b9efff9df7a7fa8f26d24bac
Reviewed-on: https://go-review.googlesource.com/12207
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 05:05:52 +00:00
Russ Cox
2f54de0df8 cmd/go: accept go get domain.root
Fixes #9357.

Change-Id: I11f0652758c4ea80debec29c3b99a72baca6d745
Reviewed-on: https://go-review.googlesource.com/12193
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 04:44:54 +00:00
Russ Cox
af96030150 cmd/go: fix go get -u handling of changing dependencies
Fixes #9224.

Change-Id: Ie0f4f14407099e4fa7ebe361a95b6492012928a2
Reviewed-on: https://go-review.googlesource.com/12192
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 04:41:08 +00:00
Russ Cox
8df0bcc1fb cmd/go: disable password prompt when running git
This fix only works on Git 2.3.0 and later.

There appears to be no portable way to fix the earlier versions.
We already run git with stdin closed, but on Unix git calls getpass,
which opens /dev/tty itself. We could do package syscall-specific
things to get /dev/tty invalidated during the exec, but I'd really
rather not. And on Windows, Git opens "CONIN$" and "CONOUT$"
itself, and I have no idea how to invalidate those.

Fix the problem for newish Git versions and wait for people to update.
Best we can do.

Fixes #9341.

Change-Id: I576579b106764029853e0f74d411e19108deecf5
Reviewed-on: https://go-review.googlesource.com/12175
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:36:49 +00:00
Russ Cox
3c9f60c99a database/sql: document closing requirements for Stmts
Fixes #8952.

Change-Id: I678f9706eccb5a344eeb0244f45b7b7669830bdc
Reviewed-on: https://go-review.googlesource.com/12204
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 04:31:41 +00:00
Russ Cox
f8c97abf54 crypto/x509: add /etc/ssl/cacert.pem to OmniOS cert search list
Fixes #9146.

Change-Id: If5cb5ae92a201825b9ff32b3d0edfa032b9a0965
Reviewed-on: https://go-review.googlesource.com/12203
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 04:31:06 +00:00
Russ Cox
505f6e335e cmd/pprof: store temporary files in temporary directory
Fixes #9180.

Change-Id: Id5adaea0ca9005946fb89c88a10c6f59d8c0943c
Reviewed-on: https://go-review.googlesource.com/12202
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 04:30:50 +00:00
Russ Cox
2bd1e5e50b cmd/pprof: run $BROWSER and system browser before Chrome
Fixes #10259.

Change-Id: Ica6b8301cc8291785a3c496fb513050813b2d8df
Reviewed-on: https://go-review.googlesource.com/12201
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 04:30:35 +00:00
Russ Cox
9adf684686 cmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path
Fixes #11305.

Change-Id: Icaa3a009aa4ab214c9aaf74f52c3e622fa266a9d
Reviewed-on: https://go-review.googlesource.com/12194
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-15 04:30:13 +00:00
Russ Cox
4325a9ee2a cmd/go: reject missing source code in go get -d, same as go get -d -u
Fixes #11090.

Change-Id: I1518df7a48346b175ec80079a07225901fdd51fb
Reviewed-on: https://go-review.googlesource.com/12177
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:29:10 +00:00
Russ Cox
f849f6b7fd cmd/go: give full import stack for errors in dependencies of test dependencies
Fixes #9558.

Change-Id: I68506af58088155d38d492b49b19c5fc2048b087
Reviewed-on: https://go-review.googlesource.com/12176
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:28:00 +00:00
Russ Cox
6ab582a80d cmd/go: go test -race -i runtime/race must not install race-enabled cmd/cgo
Fix now uses same test as 'go build'.

Fixes #10500.

Change-Id: I2fcf2d95430643370aa29165d89a188988dee446
Reviewed-on: https://go-review.googlesource.com/12174
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:27:17 +00:00
Russ Cox
91a480c325 doc: add cmd/go's -pkgdir build option
Also use more consistent language for the new build options.

Change-Id: I88cbe200c13f452713be73d2e00337ddb793b8c6
Reviewed-on: https://go-review.googlesource.com/12172
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:22:25 +00:00
Russ Cox
b2cb3b416c cmd/go: add -pkgdir build flag
Fixes #10210.

Change-Id: I82ddd665bca31773b1fb1b056338c04818ef68f5
Reviewed-on: https://go-review.googlesource.com/12171
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:19:08 +00:00
Russ Cox
b5bc87ce59 cmd/go: remove duplication of build flag info in testflag.go
Also adds to 'go test' all the build flags that were missing
due to inconsistency in the duplication (for example, -toolexec).

Fixes #10504.

Change-Id: I1935b5caa13d5e551a0483904adffa8877087df7
Reviewed-on: https://go-review.googlesource.com/12170
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:18:54 +00:00
Russ Cox
3585f215c8 cmd/go: fix error for go run with files in different directories
Fixes #9853.

Change-Id: Ic4803aa499ca20215085a87bad649014984d84c8
Reviewed-on: https://go-review.googlesource.com/12149
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:18:39 +00:00
Russ Cox
687925ffcf cmd/go: document that <meta> tags should be early in the HTML for go get
While we are here, fix a few things not updated for -insecure.

Fixes #8163.

Change-Id: Ib80c9ac00d6b61cce26c3d20bee3d30ab9af1331
Reviewed-on: https://go-review.googlesource.com/12148
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:13:56 +00:00
Russ Cox
023047d14b cmd/go: diagnose trivial test import cycle
Was detecting only non-trivial ones.

Fixes #9690.

Change-Id: I662d81dd4818ddf29592057c090805772c84287b
Reviewed-on: https://go-review.googlesource.com/12147
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:13:55 +00:00
Russ Cox
ea918ef535 Revert "cmd/compile: define func value symbols at declaration"
This reverts commit 3b411bf1a1bb08d6868083981cecba8088dc7aea.

Change-Id: I321a43fa378a43b3e4d7aa97e0222775640af64b
Reviewed-on: https://go-review.googlesource.com/12205
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 04:11:54 +00:00
Russ Cox
fa1ea497d5 cmd/compile: define func value symbols at declaration
These used to be defined at use, but that breaks when shared libraries
are involved.

For #11480.

Change-Id: I416a848754fb615c0d75f9f0ccc00723d07f7f01
Reviewed-on: https://go-review.googlesource.com/12145
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:11:01 +00:00
Russ Cox
0a3c991fd3 cmd/internal/obj: fix pc/sp information for prologue
When the prologue call to morestack was moved down to the
bottom of the function, the pc/sp tables were not updated.
If a traceback through a call to morestack is needed, it would
get confused at and stop at morestack.

Confirmed the fix by adding //go:systemstack (which calls
morestackc, but same issue) where it did not belong
and inspecting the crash.

Change-Id: Id0294bb9dba51ef1a49154637228fb57f1086a94
Reviewed-on: https://go-review.googlesource.com/12144
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 04:09:35 +00:00
Jeff R. Allen
0c72eeb121 net/http: do not allow space or slash in Host headers
A malformed Host header can result in a malformed HTTP request.
Clean them to avoid this.

Updates #11206. We may come back and make this stricter for 1.6.

Change-Id: I23c7d821cd9dbf66c3c15d26750f305e3672d984
Reviewed-on: https://go-review.googlesource.com/11241
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 03:15:59 +00:00
David du Colombier
e6a0c21e7d net: fix setKeepAlivePeriod on Plan 9
The interface to set TCP keepalive on Plan 9 is
writing the "keepalive n" string to the TCP ctl file,
where n is the milliseconds between keepalives.

Fixes #11266.

Change-Id: Ic96f6c584063665a1ddf921a9a4ddfa13cc7501b
Reviewed-on: https://go-review.googlesource.com/11860
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 02:53:34 +00:00
Rob Pike
df9423f4dc doc: add a few more details about arm and ppc64 to asm.html
Update #10096

Arm64 and Ppc64 are still pretty sketchy.

Change-Id: Iaf821b0f17bad8c71d338d45de75d4a345cac2dd
Reviewed-on: https://go-review.googlesource.com/12160
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 02:37:09 +00:00
Robert Griesemer
e7a10a9614 go/types: fix internal inInteger operand predicate
When testing if a value is an integer, if the value is a constant,
don't ignore the type if it has one.

Fixes #11594.

Change-Id: I2ff387e4f9e8ab7cae35c4838350e0a1fce2e625
Reviewed-on: https://go-review.googlesource.com/12045
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-15 02:25:47 +00:00
Didier Spezia
8b6527b70e encoding/xml: improve marshaller sanity checks of directives
When building a directive, the current sanity check prevents
a '>' to be used, which makes a DOCTYPE directive with an
internal subset be rejected. It is accepted by the parser
though, so what can be parsed cannot be encoded.

Improved the corresponding sanity check to mirror the behavior
of the parser (in the way it handles angle brackets, quotes,
and comments).

Fixes #10158

Change-Id: Ieffea9f870f2694548e12897f8f47babc0ea4414
Reviewed-on: https://go-review.googlesource.com/11630
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 01:56:14 +00:00
Jonathan Rudenberg
aed74b9ddf doc/go1.5.html: fix and expand crypto/tls changes
- Fix incomplete description of minimum protocol version.
- Add mention of the new ConnectionState.OCSPResponse field.
- Clarify session ticket key rotation description.

Change-Id: I6b62d30a4d0e0f84fd2c0e70e8f66ec14e6a5a90
Reviewed-on: https://go-review.googlesource.com/12197
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 01:52:08 +00:00
Brad Fitzpatrick
6c848c6e88 A+C: more updates before release
Includes subrepos and some special cases.

Updates #10639

Change-Id: I3c9ad4f6ec689903f88ccf5599d93a338e3eec4d
Reviewed-on: https://go-review.googlesource.com/12211
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 01:38:53 +00:00
Larz Conwell
1a4e1770f6 encoding/json: Only allow string option for valid types
The "string" option only applies for strings, floats, integers, and
booleans as per the documentation. So when decoding ignore the "string"
option if the value is not of one of the types mentioned. This matches
the Marshal step which also ignores the "string" option for invalid
types.

Fixes #9812

Change-Id: I0fb2b43d0668bc0e2985886d989abbf2252070e2
Reviewed-on: https://go-review.googlesource.com/10183
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 01:35:56 +00:00
Brad Fitzpatrick
e66d04ea59 A+C: update for release
This is an automated update for the main branch of the main repo.
Some special cases and other repos will follow.

Updates #10639

Change-Id: I4b149c037e9292b7e323a9f4c009092ce6b70ce5
Reviewed-on: https://go-review.googlesource.com/12159
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 00:59:00 +00:00
Jonathan Rudenberg
f4b4c881cb doc/go1.5.html: fix typo
This is the first mention of the fmt package in the changes list.

Change-Id: I5d378d8707e6735e0e590527db4196b517fefd72
Reviewed-on: https://go-review.googlesource.com/12198
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 00:52:31 +00:00
Jonathan Rudenberg
9e88f79d32 doc/go1.5.html: fix typo
Change-Id: I8bbdf6c769e089fca8458166dffff5aea0f74675
Reviewed-on: https://go-review.googlesource.com/12196
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-14 23:08:23 +00:00
Nevins Bartolomeo
1fff4bb156 crypto: add SHA-512/224 and SHA-512/256 as described in FIPS 180-4
Change-Id: Ifbab8203dea1eb0df4c834df22e12cb7c37c14fd
Reviewed-on: https://go-review.googlesource.com/10683
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2015-07-14 19:45:21 +00:00
David Crawshaw
e3c67dda0a cmd/go: do not create subdirs of $GOBIN
Fixes #9769.

Change-Id: I2959906c71d0ce62cdb750dab78eab631a26f229
Reviewed-on: https://go-review.googlesource.com/12080
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 19:25:40 +00:00
Ian Lance Taylor
a6dc541436 cmd/go: warn on get from code.google.com that it is shutting down
Fixes #10193.

Change-Id: Ibbb747babb697a66b943e5da76b0ada41f1fb14f
Reviewed-on: https://go-review.googlesource.com/12070
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 18:18:12 +00:00
Ian Lance Taylor
443ec4f44d doc/go1.5.html: fix typo.
Fixes #11704.

Change-Id: If103f8eca7e53b0120885e2ec086db12176ea078
Reviewed-on: https://go-review.googlesource.com/12155
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-14 17:17:25 +00:00