]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
8 years agolib/time: update to IANA release 2015e.
David Symonds [Wed, 22 Jul 2015 02:42:28 +0000 (12:42 +1000)]
lib/time: update to IANA release 2015e.

Fixes #11810.

Change-Id: I8453e53a72e242a69ea34eb393999e7291d4358f
Reviewed-on: https://go-review.googlesource.com/12502
Run-TryBot: David Symonds <dsymonds@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
8 years agodoc: add a clause about embedded methods to go1compat
Rob Pike [Tue, 21 Jul 2015 04:05:13 +0000 (14:05 +1000)]
doc: add a clause about embedded methods to go1compat

This is a corner case but it is suggested we call it out.

Fixes #11798.

Change-Id: I2ddb5b363cd2921666dbf03bbf98107697ca40e5
Reviewed-on: https://go-review.googlesource.com/12460
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agocmd/dist: remove prints during test registration
Brad Fitzpatrick [Tue, 21 Jul 2015 19:47:22 +0000 (12:47 -0700)]
cmd/dist: remove prints during test registration

dist test should not print (especially to stdout) during test
registration.  This confuses other tools interacting with dist using
dist test --list, etc.

Change-Id: Ie4f82c13e49590c23a7a235d90ddbc4f5ed81e0b
Reviewed-on: https://go-review.googlesource.com/12487
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/go: fix typo in comment
Ian Lance Taylor [Tue, 21 Jul 2015 21:05:59 +0000 (14:05 -0700)]
cmd/go: fix typo in comment

Change-Id: I3d5e46d376953fbdd21ce8c161214eaed6378d84
Reviewed-on: https://go-review.googlesource.com/12490
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/go: pass an unmodified environment to a go run program
Ian Lance Taylor [Tue, 21 Jul 2015 19:17:29 +0000 (12:17 -0700)]
cmd/go: pass an unmodified environment to a go run program

Fixes #11709.
Fixed #11449.

Change-Id: If8fdb27d3dc25fb7017226d143a29cbebc1374c5
Reviewed-on: https://go-review.googlesource.com/12483
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agogo/types: make types.Typ a slice, unexport UniverseByte/Rune
Robert Griesemer [Tue, 21 Jul 2015 19:32:59 +0000 (12:32 -0700)]
go/types: make types.Typ a slice, unexport UniverseByte/Rune

In lieu of the more invasive https://go-review.googlesource.com/#/c/12373/ .

Change-Id: I0221783fcaa8af04520c80cd2993d7d542d2c431
Reviewed-on: https://go-review.googlesource.com/12486
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agocmd/go: skip TestGoInstallErrorOnCrossCompileToBin in short mode
Ian Lance Taylor [Tue, 21 Jul 2015 18:17:08 +0000 (11:17 -0700)]
cmd/go: skip TestGoInstallErrorOnCrossCompileToBin in short mode

That test will install cmd/pack for linux_386; we don't want to change
GOROOT in short mode.

Change-Id: I4b00c578a99779a13c558208bfd4115f8f0513fa
Reviewed-on: https://go-review.googlesource.com/12481
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agomisc/cgo/testsovar: needs the `extern` keyword to export variables on non-windows...
Ingo Krabbe [Tue, 21 Jul 2015 10:49:59 +0000 (12:49 +0200)]
misc/cgo/testsovar: needs the `extern` keyword to export variables on non-windows platforms

Change-Id: I87fa25214fbf24469148a63f4e1e61e261105c16
Reviewed-on: https://go-review.googlesource.com/12470
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agocmd/link: if -B option was used, pass it to the external linker
Ian Lance Taylor [Wed, 15 Jul 2015 07:18:51 +0000 (00:18 -0700)]
cmd/link: if -B option was used, pass it to the external linker

Fixes #10607.

Change-Id: Ib294cf65b07103b60f62b86b21ff2d07b25136fe
Reviewed-on: https://go-review.googlesource.com/12242
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agodoc: add missing preposition in go1.5.html
Brad Fitzpatrick [Tue, 21 Jul 2015 02:46:12 +0000 (19:46 -0700)]
doc: add missing preposition in go1.5.html

Change-Id: I2f855b9ad1676b3c4efedd764ce99e21c104a4ec
Reviewed-on: https://go-review.googlesource.com/12446
Reviewed-by: Rob Pike <r@golang.org>
8 years agodoc/go1.5.html: update the net.Dial release notes.
Paul Marks [Fri, 17 Jul 2015 21:23:26 +0000 (14:23 -0700)]
doc/go1.5.html: update the net.Dial release notes.

Change-Id: Ie02426b2b726170d858de96fdd8c51bfdf20d7dc
Reviewed-on: https://go-review.googlesource.com/12376
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoapi: add go1.5.txt API file, reset next.txt
Brad Fitzpatrick [Fri, 17 Jul 2015 15:38:52 +0000 (08:38 -0700)]
api: add go1.5.txt API file, reset next.txt

Fixes #11752

Change-Id: If4196b4bbba4f1485608bfafa98fa54781177273
Reviewed-on: https://go-review.googlesource.com/12325
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agodoc: remove mention of default GOMAXPROCS(1) in Effective Go
Brad Fitzpatrick [Sat, 18 Jul 2015 16:49:23 +0000 (09:49 -0700)]
doc: remove mention of default GOMAXPROCS(1) in Effective Go

Fixes #11781

Change-Id: Idc46a6a4fb5bf1c4d394eadf2d860d7ef75c8ccf
Reviewed-on: https://go-review.googlesource.com/12390
Reviewed-by: Rob Pike <r@golang.org>
8 years agosyscall: warn not to use FormatMessage
Alex Brainman [Mon, 13 Jul 2015 00:55:49 +0000 (10:55 +1000)]
syscall: warn not to use FormatMessage

Fixes #11147

Change-Id: Ib31160946a53f6f9b11daea211ff04d186b51b3f
Reviewed-on: https://go-review.googlesource.com/12067
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agogo/internal/gccgoimporter: fix handling of "byte" and "rune" alias types
Matthew Dempsky [Tue, 21 Jul 2015 00:04:18 +0000 (17:04 -0700)]
go/internal/gccgoimporter: fix handling of "byte" and "rune" alias types

Fixes #11762.

Change-Id: I0c7797a2dfdbbcf137bb287f854037a4a697c6e4
Reviewed-on: https://go-review.googlesource.com/12443
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

8 years agodoc: document net/http.Request.Cancel in go1.5.html
Brad Fitzpatrick [Mon, 20 Jul 2015 19:30:06 +0000 (12:30 -0700)]
doc: document net/http.Request.Cancel in go1.5.html

Change-Id: If1c12b43ef467c3ef2cbbaaba1bda4ea98032c7e
Reviewed-on: https://go-review.googlesource.com/12430
Reviewed-by: Rob Pike <r@golang.org>
8 years agodoc: add crypto/sha512 additions to go1.5.html
Brad Fitzpatrick [Mon, 20 Jul 2015 22:14:01 +0000 (15:14 -0700)]
doc: add crypto/sha512 additions to go1.5.html

Change-Id: I805bb7ba40c8ed579c4ca796e408995586d219b3
Reviewed-on: https://go-review.googlesource.com/12434
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
8 years agogo/types: remove non-existing mention of MethodSetCache from comment
Robert Griesemer [Mon, 20 Jul 2015 21:49:14 +0000 (14:49 -0700)]
go/types: remove non-existing mention of MethodSetCache from comment

Fixes #11800.

Change-Id: I5eb178331f4ae80821f188e19c0c6fadeb330278
Reviewed-on: https://go-review.googlesource.com/12433
Reviewed-by: Alan Donovan <adonovan@google.com>
8 years agocmd/dist: increase timeout for standard tests
Ian Lance Taylor [Mon, 20 Jul 2015 17:18:26 +0000 (10:18 -0700)]
cmd/dist: increase timeout for standard tests

The cmd/go tests run too long on a Raspberry Pi.  I've cut times as
much as I can see without more serious steps like not running tests.

Fixes #11779.

Change-Id: Ice5da052902decea2e6ac32d0f2ce084c39ea1ab
Reviewed-on: https://go-review.googlesource.com/12368
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/go: build errors rather than fmt in a couple of tests
Ian Lance Taylor [Mon, 20 Jul 2015 16:15:46 +0000 (09:15 -0700)]
cmd/go: build errors rather than fmt in a couple of tests

The errors package is smaller and builds faster.

Update #11779.

Change-Id: Iaf2d43734ec4b0aa325590eb5d38522306b608cb
Reviewed-on: https://go-review.googlesource.com/12366
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/go: build errors rather than strings in some tests
Ian Lance Taylor [Mon, 20 Jul 2015 15:30:45 +0000 (08:30 -0700)]
cmd/go: build errors rather than strings in some tests

Speed up the test suite by building the errors package rather than the
strings package in some cases where the specific package we are
building doesn't matter.  The errors package is smaller, and doesn't
have any assembler code.

Also make a couple of tests run in parallel.

Update #11779.

Change-Id: I62e47f8655f9d85bf93c70ae6e6121276d96aee0
Reviewed-on: https://go-review.googlesource.com/12365
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/go: don't run TestInstalls in short mode
Ian Lance Taylor [Mon, 20 Jul 2015 01:20:06 +0000 (18:20 -0700)]
cmd/go: don't run TestInstalls in short mode

It changes GOROOT, so we shouldn't run it in short mode.  Also, it's
fairly slow.

Update #11779.

Change-Id: I3d3344954cf9b2ac70070c878a67cb65ac8fd85c
Reviewed-on: https://go-review.googlesource.com/12364
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/go: rewrite TestNoteReading to use test harness
Ian Lance Taylor [Mon, 20 Jul 2015 01:14:53 +0000 (18:14 -0700)]
cmd/go: rewrite TestNoteReading to use test harness

On my laptop reduces time required for test from 22 seconds to 0.14
seconds.

Update #11779.

Change-Id: I715d85bd9c6f7683c6915eedd2539813aa5efc58
Reviewed-on: https://go-review.googlesource.com/12363
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/compile: define func value symbols at declaration
Michael Hudson-Doyle [Tue, 14 Jul 2015 23:31:30 +0000 (11:31 +1200)]
cmd/compile: define func value symbols at declaration

This is mostly Russ's https://golang.org/cl/12145 but with some extra fixes to
account for the fact that function declarations without implementations now
break shared libraries, and including my test case.

Fixes #11480.

Change-Id: Iabdc2934a0378e5025e4e7affadb535eaef2c8f1
Reviewed-on: https://go-review.googlesource.com/12340
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agonet/http: add example for setting trailers in an Handler
Brad Fitzpatrick [Fri, 17 Jul 2015 16:40:04 +0000 (09:40 -0700)]
net/http: add example for setting trailers in an Handler

Change-Id: I6a8bb853a538c80d95589321d3226784bc017eef
Reviewed-on: https://go-review.googlesource.com/12327
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agoruntime: clarify runtime.GC blocking behavior
Austin Clements [Sun, 19 Jul 2015 06:22:18 +0000 (23:22 -0700)]
runtime: clarify runtime.GC blocking behavior

The runtime.GC documentation was rewritten in df2809f to make it clear
that it blocks until GC is complete, but the re-rewrite in ed9a4c9 and
e28a679 lost this property when clarifying that it may also block the
entire program and not just the caller.

Try to arrive at wording that conveys both of these properties.

Change-Id: I1e255322aa28a21a548556ecf2a44d8d8ac524ef
Reviewed-on: https://go-review.googlesource.com/12392
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
8 years agoruntime: check for findmoduledatap returning nil
Ian Lance Taylor [Sat, 18 Jul 2015 20:35:12 +0000 (13:35 -0700)]
runtime: check for findmoduledatap returning nil

The findmoduledatap function will not return nil in ordinary use, but
check for nil to try to avoid crashing when we are already crashing.

Update #11783.

Change-Id: If7b1adb51efab13b4c1a37b6f3c9ad22641a0b56
Reviewed-on: https://go-review.googlesource.com/12391
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agointernal/trace: fix fuzzer crashers
Dmitry Vyukov [Sat, 18 Jul 2015 00:53:48 +0000 (17:53 -0700)]
internal/trace: fix fuzzer crashers

Fixes #11766
Fixes #11769
Fixes #11767
Fixes #11770

Change-Id: I441382af58f60deb46dcdd70076763b2c47738d4
Reviewed-on: https://go-review.googlesource.com/12378
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agobufio: Remove unneeded error initialization
Silvan Jegen [Tue, 13 Jan 2015 20:41:23 +0000 (21:41 +0100)]
bufio: Remove unneeded error initialization

The default value for error is nil so there is no need to assign this
value here.

Change-Id: I4714ef7607996ccbf91b704390e1d1d39ee3847b
Reviewed-on: https://go-review.googlesource.com/12355
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/compile: ignore carriage return in magic comments
Ian Lance Taylor [Sat, 18 Jul 2015 05:29:44 +0000 (22:29 -0700)]
cmd/compile: ignore carriage return in magic comments

Update #11771.

Change-Id: I3bb3262619765d3ca79652817e17e8f260f41907
Reviewed-on: https://go-review.googlesource.com/12379
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet: classify site-local unicast in address selection
Mikio Hara [Fri, 17 Jul 2015 08:31:49 +0000 (17:31 +0900)]
net: classify site-local unicast in address selection

This change adds site-local unicast classification for users still using
the deprecated addresses internally.

Change-Id: If50870c6d4a85fe471c002b161eec59efcebe2f4
Reviewed-on: https://go-review.googlesource.com/12344
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoos: remove stuttering return value names
Brad Fitzpatrick [Fri, 17 Jul 2015 15:26:29 +0000 (08:26 -0700)]
os: remove stuttering return value names

Old style. Make it compliant with our code review comments document.

Also, make WriteString's return parameter named 'n', not 'ret', for
consistency.

Noticed during another documentation review.

Change-Id: Ie88910c5841f8353bc5c0152e2168b497578e15e
Reviewed-on: https://go-review.googlesource.com/12324
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agoruntime: skip TestReturnAfterStackGrowInCallback if gcc is not found
Alex Brainman [Sat, 18 Jul 2015 00:54:50 +0000 (10:54 +1000)]
runtime: skip TestReturnAfterStackGrowInCallback if gcc is not found

Fixes #11754

Change-Id: Ifa423ca6eea46d1500278db290498724a9559d14
Reviewed-on: https://go-review.googlesource.com/12347
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agodoc: document GODEBUG=netdns=X and netcgo in go1.5.txt
Brad Fitzpatrick [Fri, 17 Jul 2015 16:25:45 +0000 (09:25 -0700)]
doc: document GODEBUG=netdns=X and netcgo in go1.5.txt

Change-Id: I720aeb1511e407750617e23c4cba1edcddf745bb
Reviewed-on: https://go-review.googlesource.com/12326
Reviewed-by: Rob Pike <r@golang.org>
8 years agoruntime: make the GC message less committal.
Rob Pike [Fri, 17 Jul 2015 22:42:20 +0000 (08:42 +1000)]
runtime: make the GC message less committal.

We shouldn't guarantee this behavior, but suggest it's possible.

Change-Id: I4c2afb48b99be4d91537306d3337171a13c9990a
Reviewed-on: https://go-review.googlesource.com/12346
Reviewed-by: David Crawshaw <crawshaw@golang.org>
8 years agocmd/go: ignore import of "C" when fetching dependencies
Ian Lance Taylor [Thu, 16 Jul 2015 23:25:44 +0000 (16:25 -0700)]
cmd/go: ignore import of "C" when fetching dependencies

The change https://golang.org/cl/12192 changed the get code to use the
list of package imports, not the computed list of dependencies, as the
computed list could be out of date if the package changed when using
go get -u.  Computing the dependency list would skip an import of "C",
but that would still be on the package import list.  This changes the
code to skip "C" when walking the import list.

No test--the best test would be to add an import of "C" to
github.com/rsc/go-get-issue-9224-cmd for TestGoGetUpdate.

Fixes #11738.

Change-Id: Id89ddafeade2391d15688bfd142fafd67844a941
Reviewed-on: https://go-review.googlesource.com/12322
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agoos: add test to ensure Rename returns *LinkError
Dave Cheney [Fri, 17 Jul 2015 17:46:38 +0000 (10:46 -0700)]
os: add test to ensure Rename returns *LinkError

Updates #10061

CL 12353 updated the documentation for os.Rename to stipulate the function will
return errors of type *os.LinkError. This CL adds a test to ensure that the
implementations continue to obey this contract.

Change-Id: I41beb8c9d8356c737de251fdc6f652caab3ee636
Reviewed-on: https://go-review.googlesource.com/12329
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agoruntime: document that GC blocks the whole program
Rob Pike [Fri, 17 Jul 2015 21:37:51 +0000 (07:37 +1000)]
runtime: document that GC blocks the whole program

No code changes. Just make it clear that runtime.GC is not concurrent.

Change-Id: I00a99ebd26402817c665c9a128978cef19f037be
Reviewed-on: https://go-review.googlesource.com/12345
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agodoc: fix typo
Paolo Martini [Fri, 17 Jul 2015 15:26:08 +0000 (17:26 +0200)]
doc: fix typo

The document `doc/go_spec.html` uses "preceeding" instead of the word
"preceding" in one place.

Fixed another occurrence in `src/go/types/typexpr.go`.

Change-Id: Ic67f62026b5c9d002c5c5632299f14ecac8b02ae
Reviewed-on: https://go-review.googlesource.com/12354
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agoandroidtest.bash: robust cleanup in case of failure.
Hyang-Ah (Hana) Kim [Fri, 17 Jul 2015 19:40:26 +0000 (15:40 -0400)]
androidtest.bash: robust cleanup in case of failure.

Change-Id: I69ed001bca4987e08b46a8288f6feae2aca6a142
Reviewed-on: https://go-review.googlesource.com/12380
Reviewed-by: David Crawshaw <crawshaw@golang.org>
8 years agodoc: document ios build tag for crypto/x509
David Crawshaw [Thu, 16 Jul 2015 19:30:47 +0000 (15:30 -0400)]
doc: document ios build tag for crypto/x509

Change-Id: I6e6d38ae347b4f5a33dff609b89785a038bc384c
Reviewed-on: https://go-review.googlesource.com/12304
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agoruntime: remove out-of-date comment
Austin Clements [Fri, 17 Jul 2015 16:49:33 +0000 (09:49 -0700)]
runtime: remove out-of-date comment

An out-of-date comment snuck in to cc8f544. Remove it.

Change-Id: I5bc7c17e737d1cabe57b88de06d7579c60ca28ff
Reviewed-on: https://go-review.googlesource.com/12328
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
8 years agoos: improve documentation on Rename
Jeff R. Allen [Fri, 17 Jul 2015 14:33:51 +0000 (16:33 +0200)]
os: improve documentation on Rename

Rename should document that it returns *LinkError,
like Create and Stat do.

Fixes #10061

Change-Id: I7bfe8b0267f6c4a57dd6b26cba44928714711724
Reviewed-on: https://go-review.googlesource.com/12353
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet: avoid unnecessary conversion in address selection
Mikio Hara [Fri, 17 Jul 2015 01:16:45 +0000 (10:16 +0900)]
net: avoid unnecessary conversion in address selection

Change-Id: I0d940810b493249bc092cd38bdb434f7fa67cafb
Reviewed-on: https://go-review.googlesource.com/12341
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agoruntime: don't free large spans until heapBitsSweepSpan returns go1.5beta2
Austin Clements [Thu, 16 Jul 2015 20:27:09 +0000 (16:27 -0400)]
runtime: don't free large spans until heapBitsSweepSpan returns

This fixes a race between 1) sweeping and freeing an unmarked large
span and 2) reusing that span and allocating from it. This race arises
because mSpan_Sweep returns spans for large objects to the heap
*before* heapBitsSweepSpan clears the mark bit on the object in the
span.

Specifically, the following sequence of events can lead to an
incorrectly zeroed bitmap byte, which causes the garbage collector to
not trace any pointers in that object (the pointer bits for the first
four words are cleared, and the scan bits are also cleared, so it
looks like a no-scan object).

1) P0 calls mSpan_Sweep on a large span S0 with an unmarked object on it.

2) mSpan_Sweep calls heapBitsSweepSpan, which invokes the callback for
   the one (unmarked) object on the span.

3) The callback calls mHeap_Free, which makes span S0 available for
   allocation, but this is too early.

4) P1 grabs this S0 from the heap to use for allocation.

5) P1 allocates an object on this span and writes that object's type
   bits to the bitmap.

6) P0 returns from the callback to heapBitsSweepSpan.
   heapBitsSweepSpan clears the byte containing the mark, even though
   this span is now owned by P1 and this byte contains important
   bitmap information.

This fixes this problem by simply delaying the mHeap_Free until after
the heapBitsSweepSpan. I think the overall logic of mSpan_Sweep could
be simplified now, but this seems like the minimal change.

Fixes #11617.

Change-Id: I6b1382c7e7cc35f81984467c0772fe9848b7522a
Reviewed-on: https://go-review.googlesource.com/12320
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
8 years agocmd/fix: add gotypes module
Rob Pike [Thu, 16 Jul 2015 03:47:01 +0000 (13:47 +1000)]
cmd/fix: add gotypes module

Adjusts for the move from golang.org/x/tools/go/types and .../go/exact
to go/types and go/constant in the main repository.

Change-Id: I0da7248c540939e3e9b09c915b0a296937f1be73
Reviewed-on: https://go-review.googlesource.com/12284
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/go: don't put mycmd in wrong directory
Mikio Hara [Thu, 16 Jul 2015 06:41:34 +0000 (15:41 +0900)]
cmd/go: don't put mycmd in wrong directory

Change-Id: Ia7cc1d52211b32a2eb2b3888d621b28d6932aca9
Reviewed-on: https://go-review.googlesource.com/12290
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agonet/mail: add example to package
Carlos C [Thu, 9 Jul 2015 13:08:39 +0000 (15:08 +0200)]
net/mail: add example to package

Change-Id: I912cafc66463f81cde839afc8f06b7eadcbf6f57
Reviewed-on: https://go-review.googlesource.com/11992
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoA+C: more updates
Brad Fitzpatrick [Thu, 16 Jul 2015 21:40:35 +0000 (14:40 -0700)]
A+C: more updates

Update #10639

Change-Id: I2d7817ac0aefb5dd2569d7e83afbc51851e24b42
Reviewed-on: https://go-review.googlesource.com/12321
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet: RFC 6724 address selection
Brad Fitzpatrick [Thu, 16 Jul 2015 00:02:06 +0000 (17:02 -0700)]
net: RFC 6724 address selection

At least the most important parts, I think.

Fixes #10552

Change-Id: I1a03c5405bdbef337e0245d226e9247d3d067393
Reviewed-on: https://go-review.googlesource.com/12246
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agocrypto/x509: iOS build tag
David Crawshaw [Thu, 16 Jul 2015 17:14:56 +0000 (13:14 -0400)]
crypto/x509: iOS build tag

The iOS simulator compiles with GOOS=darwin GOARCH=386, and x509
sets the inappropriate flag -mmacosx-version-min=10.6. Condition
its compilation on the absence of an "ios" build tag.

Fixes #11736.

Change-Id: I4aa230643347320c3cb9d03b972734b2e0db930e
Reviewed-on: https://go-review.googlesource.com/12301
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agonet/url: add example to URL.ResolveReference
Carlos C [Thu, 9 Jul 2015 13:08:39 +0000 (15:08 +0200)]
net/url: add example to URL.ResolveReference

Change-Id: I9db1997b8dc7e06e9d124753ead6221470a1edf9
Reviewed-on: https://go-review.googlesource.com/12254
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agodoc: describe tracing, mention go fix
Rob Pike [Thu, 16 Jul 2015 04:45:46 +0000 (14:45 +1000)]
doc: describe tracing, mention go fix

Also add a link to a couple of the talks from GopherCon 2015.

Change-Id: I11e1c550e999553163d3fb5e900f167c849ce33f
Reviewed-on: https://go-review.googlesource.com/12287
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agoflag: add comment stating that Set is called in sequence across the command line
Rob Pike [Thu, 16 Jul 2015 04:30:15 +0000 (14:30 +1000)]
flag: add comment stating that Set is called in sequence across the command line

No code changes.

Change-Id: I3b78b1048318a4b80747fde8cab919282fc444a8
Reviewed-on: https://go-review.googlesource.com/12285
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agotest/fixedbugs: disable issue11656.go on arm64
Russ Cox [Thu, 16 Jul 2015 02:08:27 +0000 (22:08 -0400)]
test/fixedbugs: disable issue11656.go on arm64

For #11656.

Change-Id: I8365d33a15419bd0e54f71182ad0994e41650264
Reviewed-on: https://go-review.googlesource.com/12248
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agoRevert "runtime: diagnose invalid pointers during GC"
Russ Cox [Thu, 16 Jul 2015 01:49:47 +0000 (01:49 +0000)]
Revert "runtime: diagnose invalid pointers during GC"

Broke arm64. Update #9880.

This reverts commit 38d9b2a3a942892193195a6912ab23cdaff23e20.

Change-Id: I35fa21005af2183828a9d8b195ebcfbe45ec5138
Reviewed-on: https://go-review.googlesource.com/12247
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agoimage/color: fix format typo in the tests.
Nigel Tao [Thu, 16 Jul 2015 01:13:42 +0000 (11:13 +1000)]
image/color: fix format typo in the tests.

Change-Id: I6f79d201aa4e8c0e3be8d965f14ed36518536036
Reviewed-on: https://go-review.googlesource.com/12281
Reviewed-by: Rob Pike <r@golang.org>
8 years agoA+C: Add missing entries, full names.
Chris Broadfoot [Thu, 16 Jul 2015 00:12:43 +0000 (10:12 +1000)]
A+C: Add missing entries, full names.

Updates #10639

Change-Id: Ifece75b8d1d822869df8abf654725a00bef4fc25
Reviewed-on: https://go-review.googlesource.com/12280
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
8 years agoRevert "cmd/internal/obj: fix pc/sp information for prologue"
Russ Cox [Wed, 15 Jul 2015 23:28:31 +0000 (23:28 +0000)]
Revert "cmd/internal/obj: fix pc/sp information for prologue"

This seems to have broken arm64 in a mysterious way. Will try again later.

This reverts commit 0a3c991fd330276f6876c401541dcbacbb860985.

Change-Id: Ic1b53413c4168977a27381d9cc6fb8d9d7cbb780
Reviewed-on: https://go-review.googlesource.com/12245
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agonet/http: don't reuse conns after incomplete 100-continue requests
Brad Fitzpatrick [Sun, 5 Jul 2015 16:15:11 +0000 (09:15 -0700)]
net/http: don't reuse conns after incomplete 100-continue requests

If we receive an HTTP request with "Expect: 100-continue" and the
Handler never read to EOF, the conn is in an unknown state.
Don't reuse that connection.

Fixes #11549

Change-Id: I5be93e7a54e899d615b05f72bdcf12b25304bc60
Reviewed-on: https://go-review.googlesource.com/12262
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

8 years agoA+C: more updates, including Medium corporate CLA
Brad Fitzpatrick [Wed, 15 Jul 2015 21:42:14 +0000 (14:42 -0700)]
A+C: more updates, including Medium corporate CLA

Updates #10639

Change-Id: I0958e150f6eab122095bfc148746a38028b72dbc
Reviewed-on: https://go-review.googlesource.com/12263
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/go: fix parsing of Git SCP-like remotes
Andrew Gerrand [Wed, 15 Jul 2015 08:36:49 +0000 (18:36 +1000)]
cmd/go: fix parsing of Git SCP-like remotes

Now that we care about the protocol of Git remotes (for the -insecure
flag), we need to recognize and parse the SCP-like remote format.

Fixes golang/go#11457

Change-Id: Ia26132274fafb1cbfefe2475f7ac5f17ccd6da40
Reviewed-on: https://go-review.googlesource.com/12226
Reviewed-by: Ian Lance Taylor <iant@golang.org>
8 years agoruntime: fix saved PC/SP after safe-point function in syscall
Austin Clements [Mon, 13 Jul 2015 22:30:10 +0000 (18:30 -0400)]
runtime: fix saved PC/SP after safe-point function in syscall

Running a safe-point function on syscall entry uses systemstack() and
hence clobbers g.sched.pc and g.sched.sp. Fix this by re-saving them
after the systemstack, just like in the other uses of systemstack in
reentersyscall.

Change-Id: I47868a53eba24d81919fda56ef6bbcf72f1f922e
Reviewed-on: https://go-review.googlesource.com/12125
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agoruntime: run safe-point function before entering _Psyscall
Austin Clements [Mon, 13 Jul 2015 22:27:24 +0000 (18:27 -0400)]
runtime: run safe-point function before entering _Psyscall

Currently, we run a P's safe-point function immediately after entering
_Psyscall state. This is unsafe, since as soon as we put the P in
_Psyscall, we no longer control the P and another M may claim it.
We'll still run the safe-point function only once (because doing so
races on an atomic), but the P may no longer be at a safe-point when
we do so.

In particular, this means that the use of forEachP to dispose all P's
gcw caches is unsafe. A P may enter a syscall, run the safe-point
function, and dispose the P's gcw cache concurrently with another M
claiming the P and attempting to use its gcw cache. If this happens,
we may empty the gcw's workbuf after putting it on
work.{full,partial}, or add pointers to it after putting it in
work.empty. This will cause an assertion failure when we later pop the
workbuf from the list and its object count is inconsistent with the
list we got it from.

Fix this by running the safe-point function just before putting the P
in _Psyscall.

Related to #11640. This probably fixes this issue, but while I'm able
to show that we can enter a bad safe-point state as a result of this,
I can't reproduce that specific failure.

Change-Id: I6989c8ca7ef2a4a941ae1931e9a0748cbbb59434
Reviewed-on: https://go-review.googlesource.com/12124
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agoruntime: fix go:nowritebarrier annotation on gcmarkwb_m
Matthew Dempsky [Wed, 15 Jul 2015 20:27:30 +0000 (13:27 -0700)]
runtime: fix go:nowritebarrier annotation on gcmarkwb_m

Change-Id: I945d46d3bb63f1992bce0d0b1e89e75cac9bbd54
Reviewed-on: https://go-review.googlesource.com/12271
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

8 years agocmd/compile: recognize embedded field in inlined function
Ian Lance Taylor [Wed, 15 Jul 2015 05:17:41 +0000 (22:17 -0700)]
cmd/compile: recognize embedded field in inlined function

There was already special code to recognize "?" in hidden_structdcl,
which is used for inlined types and variables.  This recognizes "?" in
structdcl as well, a case that arises when a struct type appears
within an inlined function body.

Fixes #10219.

Change-Id: Ic5257ae54f817e0d4a189c2294dcd633c9f2101a
Reviewed-on: https://go-review.googlesource.com/12241
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agoencoding/json: document and test overwrite of slice, map during Unmarshal
Russ Cox [Wed, 15 Jul 2015 01:32:47 +0000 (21:32 -0400)]
encoding/json: document and test overwrite of slice, map during Unmarshal

Fixes #8837.

Change-Id: Iaaecbb0b324004cb74b16b764126b01315e6a16e
Reviewed-on: https://go-review.googlesource.com/12209
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agoasm: fix error messages and comments for "register pair"
Rob Pike [Wed, 15 Jul 2015 02:41:08 +0000 (12:41 +1000)]
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>
8 years agoruntime: diagnose invalid pointers during GC
Russ Cox [Mon, 8 Jun 2015 03:42:03 +0000 (23:42 -0400)]
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>

8 years agocmd/compile: fix PtrTo(t) for unnamed t with embedded fields
Russ Cox [Wed, 15 Jul 2015 04:01:54 +0000 (00:01 -0400)]
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>
8 years agomath: fix Log2 test failures on ppc64 (and s390)
Russ Cox [Wed, 15 Jul 2015 02:42:16 +0000 (22:42 -0400)]
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>
8 years agoencoding/json: fix out of phase error unmarshaling non-string into TextUnmarshaler
Russ Cox [Tue, 14 Jul 2015 23:31:44 +0000 (19:31 -0400)]
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>
8 years agonet/smtp: give example addrs in docs
Russ Cox [Wed, 15 Jul 2015 03:33:29 +0000 (23:33 -0400)]
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>
8 years agocmd/go: print all test flags in "go test -h"
Russ Cox [Tue, 14 Jul 2015 05:08:30 +0000 (01:08 -0400)]
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>
8 years agocmd/dist: diagnose lack of gcc earlier in build
Russ Cox [Tue, 14 Jul 2015 02:27:10 +0000 (22:27 -0400)]
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>
8 years agoimage/color: tweak the YCbCr to RGBA conversion formula.
Nigel Tao [Wed, 15 Jul 2015 04:55:02 +0000 (14:55 +1000)]
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>
8 years agocmd/go: fix nocgo builder
Russ Cox [Wed, 15 Jul 2015 05:16:47 +0000 (01:16 -0400)]
cmd/go: fix nocgo builder

Change-Id: I0f167d9769d9b6b9888c13fcb48e538fc87aa1b7
Reviewed-on: https://go-review.googlesource.com/12240
Reviewed-by: Russ Cox <rsc@golang.org>
8 years agotime: make it clearer how to format a fractional second
Rob Pike [Wed, 15 Jul 2015 05:02:38 +0000 (15:02 +1000)]
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>
8 years agoos/exec: document that Cmd.Wait waits for stdin I/O
Russ Cox [Wed, 15 Jul 2015 03:48:34 +0000 (23:48 -0400)]
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>
8 years agoreflect: wait longer before declaring select test stuck
Russ Cox [Wed, 15 Jul 2015 04:04:27 +0000 (00:04 -0400)]
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>
8 years agocmd/go: add test for issue 3652
Russ Cox [Tue, 14 Jul 2015 19:24:26 +0000 (15:24 -0400)]
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>
8 years agocmd/go: fix build
Russ Cox [Wed, 15 Jul 2015 04:51:24 +0000 (00:51 -0400)]
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>
8 years agocmd/go: accept go get domain.root
Russ Cox [Tue, 14 Jul 2015 19:08:10 +0000 (15:08 -0400)]
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>
8 years agocmd/go: fix go get -u handling of changing dependencies
Russ Cox [Tue, 14 Jul 2015 18:52:04 +0000 (14:52 -0400)]
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>
8 years agocmd/go: disable password prompt when running git
Russ Cox [Tue, 14 Jul 2015 05:22:53 +0000 (01:22 -0400)]
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>
8 years agodatabase/sql: document closing requirements for Stmts
Russ Cox [Tue, 14 Jul 2015 20:28:28 +0000 (16:28 -0400)]
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>
8 years agocrypto/x509: add /etc/ssl/cacert.pem to OmniOS cert search list
Russ Cox [Tue, 14 Jul 2015 20:20:13 +0000 (16:20 -0400)]
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>
8 years agocmd/pprof: store temporary files in temporary directory
Russ Cox [Tue, 14 Jul 2015 19:43:33 +0000 (15:43 -0400)]
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>
8 years agocmd/pprof: run $BROWSER and system browser before Chrome
Russ Cox [Tue, 14 Jul 2015 19:38:46 +0000 (15:38 -0400)]
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>
8 years agocmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path
Russ Cox [Tue, 14 Jul 2015 19:15:37 +0000 (15:15 -0400)]
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>
8 years agocmd/go: reject missing source code in go get -d, same as go get -d -u
Russ Cox [Tue, 14 Jul 2015 06:17:39 +0000 (02:17 -0400)]
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>
8 years agocmd/go: give full import stack for errors in dependencies of test dependencies
Russ Cox [Tue, 14 Jul 2015 05:56:51 +0000 (01:56 -0400)]
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>
8 years agocmd/go: go test -race -i runtime/race must not install race-enabled cmd/cgo
Russ Cox [Tue, 14 Jul 2015 05:14:08 +0000 (01:14 -0400)]
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>
8 years agodoc: add cmd/go's -pkgdir build option
Russ Cox [Tue, 14 Jul 2015 04:34:36 +0000 (00:34 -0400)]
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>
8 years agocmd/go: add -pkgdir build flag
Russ Cox [Tue, 14 Jul 2015 04:27:59 +0000 (00:27 -0400)]
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>
8 years agocmd/go: remove duplication of build flag info in testflag.go
Russ Cox [Tue, 14 Jul 2015 04:04:50 +0000 (00:04 -0400)]
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>
8 years agocmd/go: fix error for go run with files in different directories
Russ Cox [Tue, 14 Jul 2015 03:31:14 +0000 (23:31 -0400)]
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>
8 years agocmd/go: document that <meta> tags should be early in the HTML for go get
Russ Cox [Tue, 14 Jul 2015 02:55:26 +0000 (22:55 -0400)]
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>
8 years agocmd/go: diagnose trivial test import cycle
Russ Cox [Tue, 14 Jul 2015 02:39:17 +0000 (22:39 -0400)]
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>
8 years agoRevert "cmd/compile: define func value symbols at declaration"
Russ Cox [Wed, 15 Jul 2015 04:11:26 +0000 (04:11 +0000)]
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>