]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
8 years ago[release-branch.go1.4] go1.4.3 go1.4.3
Chris Broadfoot [Wed, 23 Sep 2015 04:12:21 +0000 (21:12 -0700)]
[release-branch.go1.4] go1.4.3

Change-Id: I9f0c6cf2dfc83f95905e75977a3e679a4152aa41
Reviewed-on: https://go-review.googlesource.com/14855
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
8 years ago[release-branch.go1.4] doc: document go1.4.3
Chris Broadfoot [Wed, 23 Sep 2015 03:45:16 +0000 (20:45 -0700)]
[release-branch.go1.4] doc: document go1.4.3

Change-Id: Ib1bfe4038e2b125a31acd9ff7772e462b0a6358f
Reviewed-on: https://go-review.googlesource.com/14852
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14853

8 years ago[release-branch.go1.4] net/http: backport some potential request smuggling vectors...
Brad Fitzpatrick [Mon, 21 Sep 2015 14:09:47 +0000 (16:09 +0200)]
[release-branch.go1.4] net/http: backport some potential request smuggling vectors from Go 1.5

This CL contains the verbatim tests from these two changes, but with
alternate minimal fixes against the 1.4 tree:

https://go-review.googlesource.com/#/c/12865/
https://go-review.googlesource.com/#/c/13148/

Change-Id: If98c2198e24e30e14a3b7b5e954b504d1f18db89
Reviewed-on: https://go-review.googlesource.com/14802
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Run-TryBot: Chris Broadfoot <cbro@golang.org>

8 years ago[release-branch.go1.4] net/http: harden Server against request smuggling
Brad Fitzpatrick [Tue, 30 Jun 2015 21:21:15 +0000 (14:21 -0700)]
[release-branch.go1.4] net/http: harden Server against request smuggling

See RFC 7230.

Thanks to Régis Leroy for the report.

Change-Id: Ic1779bc2180900430d4d7a4938cac04ed73c304c
Reviewed-on: https://go-review.googlesource.com/11810
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/14250
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years ago[release-branch.go1.4] net/textproto: don't treat spaces as hyphens in header keys
Brad Fitzpatrick [Tue, 30 Jun 2015 16:22:41 +0000 (09:22 -0700)]
[release-branch.go1.4] net/textproto: don't treat spaces as hyphens in header keys

This was originally done in https://codereview.appspot.com/5690059
(Feb 2012) to deal with bad response headers coming back from webcams,
but it presents a potential security problem with HTTP request
smuggling for request headers containing "Content Length" instead of
"Content-Length".

Part of overall HTTP hardening for request smuggling. See RFC 7230.

Thanks to Régis Leroy for the report.

Change-Id: I92b17fb637c9171c5774ea1437979ae2c17ca88a
Reviewed-on: https://go-review.googlesource.com/11772
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/14249
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years ago[release-branch.go1.4] runtime: don't return a slice with nil ptr but non-zero len...
Shenghou Ma [Wed, 11 Mar 2015 16:07:50 +0000 (12:07 -0400)]
[release-branch.go1.4] runtime: don't return a slice with nil ptr but non-zero len from growslice

Fixes #10135.

Change-Id: Ic4c5ab15bcb7b9c3fcc685a788d3b59c60c26e1e
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/7400
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/14248
Reviewed-by: Andrew Gerrand <adg@golang.org>
8 years agocmd/dist: remove -Werror from CFLAGS
Shenghou Ma [Thu, 27 Aug 2015 01:18:15 +0000 (21:18 -0400)]
cmd/dist: remove -Werror from CFLAGS

Fixes #12345.

Change-Id: I43d91e3f33171c333803036b29c3238c6aff3c60
Reviewed-on: https://go-review.googlesource.com/13962
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] go1.4.2 go1.4.2
Andrew Gerrand [Wed, 18 Feb 2015 02:37:37 +0000 (13:37 +1100)]
[release-branch.go1.4] go1.4.2

Change-Id: I0f198e4a94c50a11228c15d6aaac0cea890b5b58
Reviewed-on: https://go-review.googlesource.com/5111
Reviewed-by: Rob Pike <r@golang.org>
9 years ago[release-branch.go1.4] doc: document Go 1.4.2
Andrew Gerrand [Wed, 18 Feb 2015 02:40:57 +0000 (13:40 +1100)]
[release-branch.go1.4] doc: document Go 1.4.2

Change-Id: Ia87047cbc720fb03d2f67aec48abe18bce8dbf78
Reviewed-on: https://go-review.googlesource.com/5112
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/5113
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] runtime: don't fail if we find a pointer to an invalid span...
Keith Randall [Sat, 14 Feb 2015 23:46:36 +0000 (15:46 -0800)]
[release-branch.go1.4] runtime: don't fail if we find a pointer to an invalid span on 32 bit

The 32-bit heap may have holes in it.  Pointers to (non-heap) objects
in those holes shouldn't cause the GC to throw.

This change is somewhat of a band-aid fix for 1.4.2.  We should do
a more thorough fix for tip (keep track of the holes in the heap
with special MSpans, say).

Update #9872

Change-Id: Ife9ba27b77ae6ac5a6792d249c68893b3df62134
Reviewed-on: https://go-review.googlesource.com/4920
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
9 years ago[release-branch.go1.4] cmd/gc: treat non-local vars inlined into wrapper as escaping
Ian Lance Taylor [Wed, 21 Jan 2015 05:32:22 +0000 (21:32 -0800)]
[release-branch.go1.4] cmd/gc: treat non-local vars inlined into wrapper as escaping

The compiler has a phase ordering problem.  Escape analysis runs
before wrapper generation.  When a generated wrapper calls a method
defined in a different package, if that call is inlined, there will be
no escape information for the variables defined in the inlined call.
Those variables will be placed on the stack, which fails if they
actually do escape.

There are probably various complex ways to fix this.  This is a simple
way to avoid it: when a generated wrapper calls a method defined in a
different package, treat all local variables as escaping.

Fixes #9537.

Change-Id: I530f39346de16ad173371c6c3f69cc189351a4e9
Reviewed-on: https://go-review.googlesource.com/3092
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit ec0ebc2281f79294c299ece35c5a690a6415e0e0)
Reviewed-on: https://go-review.googlesource.com/5003
Run-TryBot: Andrew Gerrand <adg@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] cmd/gc: don't recurse infinitely when a recursive type referen...
Shenghou Ma [Tue, 23 Dec 2014 22:14:04 +0000 (17:14 -0500)]
[release-branch.go1.4] cmd/gc: don't recurse infinitely when a recursive type references itself more than once

Fixes #9432

Change-Id: I08c92481afa7c7fac890aa780efc1cb2fabad528
Reviewed-on: https://go-review.googlesource.com/2115
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit fcff3ba740ed6638cece4dea8478bd1dfb2411bf)
Reviewed-on: https://go-review.googlesource.com/5004
Run-TryBot: Andrew Gerrand <adg@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] runtime: don't panic when given a callback with no input param...
Shenghou Ma [Tue, 17 Feb 2015 04:43:40 +0000 (23:43 -0500)]
[release-branch.go1.4] runtime: don't panic when given a callback with no input params on windows

Fixes #9871 for Go 1.4.

Change-Id: I550a5bdb29e9a872652e0dd468a434227d7d9502
Reviewed-on: https://go-review.googlesource.com/4937
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] cmd/gc: don't unpack struct arguments to append
Chris Manghane [Tue, 20 Jan 2015 22:35:33 +0000 (14:35 -0800)]
[release-branch.go1.4] cmd/gc: don't unpack struct arguments to append

Fixes #9634.

Change-Id: I7b18f26c2fb812978fc7adc5bfd39ebfffe48701
Reviewed-on: https://go-review.googlesource.com/3080
Reviewed-by: Minux Ma <minux@golang.org>
(cherry picked from commit f5b8813e93f3d61556ecc0ba112478fa319e4e30)
Reviewed-on: https://go-review.googlesource.com/5000
Run-TryBot: Andrew Gerrand <adg@golang.org>

9 years ago[release-branch.go1.4] cmd/5g: make sure we normalize after unary ops on small types
Keith Randall [Thu, 15 Jan 2015 22:39:58 +0000 (14:39 -0800)]
[release-branch.go1.4] cmd/5g: make sure we normalize after unary ops on small types

We were failing ^uint16(0xffff) == 0, as we computed 0xffff0000 instead.

I could only trigger a failure for the above case, the other two tests
^uint16(0xfffe) == 1 and -uint16(0xffff) == 1 didn't seem to fail
previously.  Somehow they get MOVHUs inserted for other reasons (used
by CMP instead of TST?).  I fixed OMINUS anyway, better safe than
sorry.

Fixes #9604

Change-Id: I4c2d5bdc667742873ac029fdbe3db0cf12893c27
Reviewed-on: https://go-review.googlesource.com/2940
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
(cherry picked from commit daa64ddfe64dda368e80cf224dc485fa63386f81)
Reviewed-on: https://go-review.googlesource.com/5002

9 years ago[release-branch.go1.4] math/big: bug in AndNot(x,y) for x>0,y<0.
Keith Randall [Fri, 16 Jan 2015 04:45:07 +0000 (20:45 -0800)]
[release-branch.go1.4] math/big: bug in AndNot(x,y) for x>0,y<0.

The comment says to use (y-1), but then we did add(y.abs, natOne).  We meant sub.

Fixes #9609

Change-Id: I4fe4783326ca082c05588310a0af7895a48fc779
Reviewed-on: https://go-review.googlesource.com/2961
Reviewed-by: Robert Griesemer <gri@golang.org>
(cherry picked from commit c6ddca2aec4218e1af7f51fad3b761afb33b4c20)
Reviewed-on: https://go-review.googlesource.com/5001

9 years ago[release-branch.go1.4] cmd/go: handle \r in input text
Rob Pike [Mon, 15 Dec 2014 04:00:56 +0000 (15:00 +1100)]
[release-branch.go1.4] cmd/go: handle \r in input text

Remove carriage returns from //go:generate lines.
Carriage returns are the predecessor of BOMs and still
live on Windows.

Fixes #9264

Change-Id: I637748c74335c696b3630f52f2100061153fcdb4
Reviewed-on: https://go-review.googlesource.com/1564
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
(cherry picked from commit fde3ab843faaf4ba7a741bfdc192dbb5f2ddf209)
Reviewed-on: https://go-review.googlesource.com/4999
Reviewed-by: David Symonds <dsymonds@golang.org>
9 years ago[release-branch.go1.4] cmd/go: document that -run isn't implemented
Rob Pike [Tue, 10 Feb 2015 00:54:06 +0000 (16:54 -0800)]
[release-branch.go1.4] cmd/go: document that -run isn't implemented

I am an idiot but the failure to implement this means we can decide
exactly what its design should be for 1.5

Change-Id: Ie2b025fcd899d306ddeddd09d1d0e8f9a99ab7a8
Reviewed-on: https://go-review.googlesource.com/4291
Reviewed-by: Minux Ma <minux@golang.org>
(cherry picked from commit 1e5d8bb5444368a7b6f2f169bbbb43452a0479d9)
Reviewed-on: https://go-review.googlesource.com/4998
Reviewed-by: David Symonds <dsymonds@golang.org>
9 years ago[release-branch.go1.4] go1.4.1 go1.4.1
Andrew Gerrand [Thu, 15 Jan 2015 04:21:14 +0000 (15:21 +1100)]
[release-branch.go1.4] go1.4.1

Change-Id: If275a5caa07cfd16b7052ad50709e1d0f1258223
Reviewed-on: https://go-review.googlesource.com/2856
Reviewed-by: Rob Pike <r@golang.org>
9 years ago[release-branch.go1.4] doc: document Go 1.4.1
Andrew Gerrand [Thu, 15 Jan 2015 04:28:12 +0000 (15:28 +1100)]
[release-branch.go1.4] doc: document Go 1.4.1

Change-Id: I4e9737497f4995657c46e52e0722d921499f8d17
Reviewed-on: https://go-review.googlesource.com/2854
Reviewed-by: Rob Pike <r@golang.org>
(cherry picked from commit 7785be8f2227df881e7ab3a4e81a2fc69a165cf8)
Reviewed-on: https://go-review.googlesource.com/2855

9 years ago[release-branch.go1.4] doc: update source install instruction to use tag 'go1.4.1'
Andrew Gerrand [Wed, 14 Jan 2015 22:27:09 +0000 (09:27 +1100)]
[release-branch.go1.4] doc: update source install instruction to use tag 'go1.4.1'

Change-Id: I12e531fc0d92d3b6fc7ec2bbd8c029f63f55fbe1
Reviewed-on: https://go-review.googlesource.com/2798
Reviewed-by: Russ Cox <rsc@golang.org>
9 years ago[release-branch.go1.4] syscall: fix the deprecated way of parsing routing message...
Mikio Hara [Mon, 22 Dec 2014 03:30:16 +0000 (12:30 +0900)]
[release-branch.go1.4] syscall: fix the deprecated way of parsing routing message on openbsd

OpenBSD 5.5 changed its kernel ABI and OpenBSD 5.6 enabled it.
This CL works on both 5.5 and 5.6.

Fixes #9102.

Change-Id: I4a295be9ab8acbc99e550d8cb7e8f8dacf3a03c5
Reviewed-on: https://go-review.googlesource.com/1932
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 13e16b39fc269fcba3383bd6c133da3e0e0345e9)
Reviewed-on: https://go-review.googlesource.com/2826
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
9 years ago[release-branch.go1.4] runtime: fix nacl build, hashmap overflow field offset was...
Keith Randall [Mon, 22 Dec 2014 23:24:30 +0000 (15:24 -0800)]
[release-branch.go1.4] runtime: fix nacl build, hashmap overflow field offset was incorrect.

Change-Id: Ieb305b2a4d4ef28d70a8b8ece703f495c5af0529
Reviewed-on: https://go-review.googlesource.com/2051
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit c6669e7af58cb9406226c038b1cadef6e754dc74)
Reviewed-on: https://go-review.googlesource.com/2820
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
9 years ago[release-branch.go1.4] cmd/go: adjust error for custom import checkout mismatch
Russ Cox [Wed, 14 Jan 2015 06:23:26 +0000 (01:23 -0500)]
[release-branch.go1.4] cmd/go: adjust error for custom import checkout mismatch

Before:

...
imports golang.org/x/net/context: /Users/rsc/g/src/golang.org/x/net is from https://code.google.com/p/go.net, should be from https://go.googlesource.com/net

After:

...
imports golang.org/x/net/context: golang.org/x/net is a custom import path for https://go.googlesource.com/net, but /Users/rsc/g/src/golang.org/x/net is checked out from https://code.google.com/p/go.net

Change-Id: I93c35b85f955c7de684f71fbd4baecc717405318
Reviewed-on: https://go-review.googlesource.com/2808
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
(cherry picked from commit b8d67596f67ea13525e752a02f45c9d9f346472d)
Reviewed-on: https://go-review.googlesource.com/2813
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
9 years ago[release-branch.go1.4] runtime: fix deadlock in runtime.Stack
Keith Randall [Mon, 15 Dec 2014 22:39:28 +0000 (14:39 -0800)]
[release-branch.go1.4] runtime: fix deadlock in runtime.Stack

It shouldn't semacquire() inside an acquirem(), the runtime
thinks that means deadlock.  It actually isn't a deadlock, but it
looks like it because acquirem() does m.locks++.

Candidate for inclusion in 1.4.1.  runtime.Stack with all=true
is pretty unuseable in GOMAXPROCS>1 environment.

fixes #9321

Change-Id: Iac6b664217d24763b9878c20e49229a1ecffc805
Reviewed-on: https://go-review.googlesource.com/1600
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
(cherry picked from commit 50bc3d5bbc6710663c082aa72c8ba4f9ee515ab3)
Reviewed-on: https://go-review.googlesource.com/2807
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] runtime: fix SIGPROF change
Russ Cox [Wed, 14 Jan 2015 05:54:50 +0000 (00:54 -0500)]
[release-branch.go1.4] runtime: fix SIGPROF change

CL 2789 backported a change that required a barrage of followup CLs.
This CL backports all the followup CLs together.

There are manual edits to os_plan9.go and syscall_windows.go to take
the place of edits to defs_windows_{amd64,386}.go and os2_plan9.go
in the original. Those files do not exist in the release branch, but the
definition being added must go somewhere.

Original change descriptions below.

---

runtime/cgo: initialize our pthread_create wrapper earlier on openbsd

This is a genuine bug exposed by our test for issue 9456: our wrapper
for pthread_create is not initialized until we initialize cgo itself,
but it is possible that a static constructor could call pthread_create,
and in that case, it will be calling a nil function pointer.

Fix that by also initializing the sys_pthread_create function pointer
inside our pthread_create wrapper function, and use a pthread_once to
make sure it is only initialized once.

Fix build for openbsd.

Change-Id: Ica4da2c21fcaec186fdd3379128ef46f0e767ed7
Reviewed-on: https://go-review.googlesource.com/2232
Reviewed-by: David Crawshaw <crawshaw@golang.org>
(cherry picked from commit 77cd6197d7561ab7ccbf5d892efb6f97d929546a)

---

runtime: provide a dummy value of _SIGPROF on plan9 and windows

Fixes build on plan9 and windows.

Change-Id: Ic9b02c641ab84e4f6d8149de71b9eb495e3343b2
Reviewed-on: https://go-review.googlesource.com/2233
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
(cherry picked from commit 1f282385579fc404f1246fd7ffa8b4e517401d19)

---

runtime/cgo: remove unused variable

I missed this one in golang.org/cl/2232 and only tested the patch
on openbsd/amd64.

Change-Id: I4ff437ae0bfc61c989896c01904b6d33f9bdf0ec
Reviewed-on: https://go-review.googlesource.com/2234
Reviewed-by: Minux Ma <minux@golang.org>
(cherry picked from commit 0b2a74e89cf940e1c4cd91785ff3d744684edc49)

---

runtime: skip TestCgoExternalThreadSIGPROF on OS X 10.6

The test program requires static constructor, which in turn needs
external linking to work, but external linking never works on 10.6.

This should fix the darwin-{386,amd64} builders.

Change-Id: I714fdd3e35f9a7e5f5659cf26367feec9412444f
Reviewed-on: https://go-review.googlesource.com/2235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 2cbe27a27202dca5a643b75c79e25d4cccc3ae67)

---

runtime: fix TestCgoExternalThreadSIGPROF again

Shell out to `uname -r` this time, so that the test will compile
even if the platform doesn't have syscall.Sysctl.

Change-Id: I3a19ab5d820bdb94586a97f4507b3837d7040525
Reviewed-on: https://go-review.googlesource.com/2271
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 865e5e98b685eb3a7888f5263021049c0694d16f)

---

runtime: remove unnecessary GOOS switch

Change-Id: I8f518e273c02110042b08f7c50c3d38a648c8b6e
Reviewed-on: https://go-review.googlesource.com/2281
Reviewed-by: Minux Ma <minux@golang.org>
(cherry picked from commit 1ebfb082a7a5cc31efd572fd88549048a82a5c1c)

---

Change-Id: Ifee9667ca90eda2b074817c319b1b7c66d4f741d
Reviewed-on: https://go-review.googlesource.com/2805
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] all: copy master .gitattributes and .gitignore
Russ Cox [Wed, 14 Jan 2015 06:03:53 +0000 (01:03 -0500)]
[release-branch.go1.4] all: copy master .gitattributes and .gitignore

Change-Id: I10e60fb6bf2cf3daa2bc1184df7ded0a712a1905
Reviewed-on: https://go-review.googlesource.com/2806
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] cmd/ld: put .bss from external objects into real .bss section
Shenghou Ma [Sun, 21 Dec 2014 07:48:01 +0000 (02:48 -0500)]
[release-branch.go1.4] cmd/ld: put .bss from external objects into real .bss section

Fixes #9359.

Change-Id: Iba62935b5a14de23d914f433a09a40417d7e88ed
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1889
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 1c0c611fc2a7e1ce7eb39626ca7b120b62aac557)
Reviewed-on: https://go-review.googlesource.com/2802
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] runtime: hashmap: move overflow pointer to end of bucket
Keith Randall [Sat, 20 Dec 2014 04:44:18 +0000 (20:44 -0800)]
[release-branch.go1.4] runtime: hashmap: move overflow pointer to end of bucket

Pointers to zero-sized values may end up pointing to the next
object in memory, and possibly off the end of a span.  This
can cause memory leaks and/or confuse the garbage collector.

By putting the overflow pointer at the end of the bucket, we
make sure that pointers to any zero-sized keys or values don't
accidentally point to the next object in memory.

fixes #9384

Change-Id: I5d434df176984cb0210b4d0195dd106d6eb28f73
Reviewed-on: https://go-review.googlesource.com/1869
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit fbc56cf05015899aba236d5a68096a770de3ad0a)
Reviewed-on: https://go-review.googlesource.com/2801
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] reflect: add kindNoPointers if a function layout has no pointers.
Keith Randall [Tue, 23 Dec 2014 03:07:05 +0000 (19:07 -0800)]
[release-branch.go1.4] reflect: add kindNoPointers if a function layout has no pointers.

malloc checks kindNoPointers and if it is not set and the object
is one pointer in size, it assumes it contains a pointer.  So we
must set kindNoPointers correctly; it isn't just a hint.

Fixes #9425

Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf
Reviewed-on: https://go-review.googlesource.com/2055
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit d11f41118116e0b5c2fb3b3296323d888dff2d6e)
Reviewed-on: https://go-review.googlesource.com/2800
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] runtime: ignore SIGPROF to foreign threads before cgocallback...
Shenghou Ma [Sun, 28 Dec 2014 00:15:38 +0000 (19:15 -0500)]
[release-branch.go1.4] runtime: ignore SIGPROF to foreign threads before cgocallback is fully initialized

Some libraries, for example, OpenBLAS, create work threads in a global constructor.
If we're doing cpu profiling, it's possible that SIGPROF might come to some of the
worker threads before we make our first cgo call. Cgocallback used to terminate the
process when that happens, but it's better to miss a couple profiling signals than
to abort in this case.

Fixes #9456.

Change-Id: I112b8e1a6e10e6cc8ac695a4b518c0f577309b6b
Reviewed-on: https://go-review.googlesource.com/2141
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 5da9c8cd0a0427d1771b3a9a6d8d931430ce50dd)
Reviewed-on: https://go-review.googlesource.com/2789
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years ago[release-branch.go1.4] doc: copy contribute.html and install-source.html from master
Russ Cox [Wed, 14 Jan 2015 04:57:27 +0000 (23:57 -0500)]
[release-branch.go1.4] doc: copy contribute.html and install-source.html from master

This incorporates the various git-related updates that have
happened since the Go 1.4 release. Since Go 1.4.1 will be issued
from Git, it is appropriate to replace the Mercurial instructions
with Git instructions.

Change-Id: Idec041002c7f325c4eee6f25c50423b088b11468
Reviewed-on: https://go-review.googlesource.com/2788
Reviewed-by: Andrew Gerrand <adg@golang.org>
9 years agocmd/dist: convert dist from Hg to Git.
David Symonds [Mon, 8 Dec 2014 02:53:11 +0000 (13:53 +1100)]
cmd/dist: convert dist from Hg to Git.

Change-Id: Ic25d46df6a79c4a18ed3f0a7e900591a115e48e3
Reviewed-on: https://go-review.googlesource.com/1403
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
9 years agogo1.4 go1.4
Andrew Gerrand [Thu, 11 Dec 2014 00:27:56 +0000 (11:27 +1100)]
go1.4

LGTM=bradfitz, minux, dsymonds
R=rsc, bradfitz, iant, dsymonds, minux
CC=golang-codereviews
https://golang.org/cl/188920043

9 years agodoc: tweak Go 1.4 release notes
Andrew Gerrand [Thu, 11 Dec 2014 00:22:54 +0000 (11:22 +1100)]
doc: tweak Go 1.4 release notes

LGTM=dave, dsymonds
R=golang-codereviews, dave, dsymonds
CC=golang-codereviews
https://golang.org/cl/184350043

9 years agodoc: document go1.4
Andrew Gerrand [Wed, 10 Dec 2014 22:16:41 +0000 (09:16 +1100)]
doc: document go1.4

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/189810043

9 years agodoc: remove TODO from go1.4 release notes
Andrew Gerrand [Wed, 10 Dec 2014 22:11:08 +0000 (09:11 +1100)]
doc: remove TODO from go1.4 release notes

LGTM=bradfitz
R=iant, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/191750043

9 years agomisc/makerelease: handle git sub-repositories
Andrew Gerrand [Wed, 10 Dec 2014 02:04:06 +0000 (13:04 +1100)]
misc/makerelease: handle git sub-repositories

Also: checkout sub-repos from Mercurial manually
instead of using "go get". (for the 1.4 release)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/190720043

9 years ago[release-branch.go1.4] api: create go1.4.txt
Russ Cox [Wed, 10 Dec 2014 00:07:40 +0000 (11:07 +1100)]
[release-branch.go1.4] api: create go1.4.txt

I read through and vetted these but others should look too.

LGTM=bradfitz, adg
R=r, minux, bradfitz, adg
CC=adg, golang-codereviews, gri, iant
https://golang.org/cl/182560043

9 years ago[release-branch.go1.4] [release-branch.go1.4] doc: scrub references to code.google.com
Andrew Gerrand [Wed, 10 Dec 2014 00:01:55 +0000 (11:01 +1100)]
[release-branch.go1.4] [release-branch.go1.4] doc: scrub references to code.google.com

These are the references that affect current Go users.
I left intact references in older release notes;
we can figure out what to do with them later.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/186140043

9 years ago[release-branch.go1.4] [release-branch.go1.4] doc: update contribution guidelines
Andrew Gerrand [Tue, 9 Dec 2014 22:29:35 +0000 (09:29 +1100)]
[release-branch.go1.4] [release-branch.go1.4] doc: update contribution guidelines

LGTM=minux, adg, rsc
R=rsc, r, dsymonds, minux, bradfitz, adg, dave, iant
CC=golang-codereviews
https://golang.org/cl/185190043

9 years ago[release-branch.go1.4] [release-branch.go1.4] misc/cgo/test: skip test8694 on ARM.
Andrew Gerrand [Tue, 9 Dec 2014 22:13:58 +0000 (09:13 +1100)]
[release-branch.go1.4] [release-branch.go1.4] misc/cgo/test: skip test8694 on ARM.

««« CL 185130043 / 586738173884
misc/cgo/test: skip test8694 on ARM.

LGTM=dave, bradfitz, rsc
R=golang-codereviews, dave, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/185130043

»»»

LGTM=minux
R=golang-codereviews, minux, bradfitz
CC=golang-codereviews
https://golang.org/cl/188870043

9 years ago[release-branch.go1.4] cmd/go: document import path checking
Russ Cox [Tue, 9 Dec 2014 03:25:51 +0000 (22:25 -0500)]
[release-branch.go1.4] cmd/go: document import path checking

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/189760043

9 years ago[release-branch.go1.4] [release-branch.go1.4] encoding/xml: remove SyntaxError.Byte
Russ Cox [Sat, 6 Dec 2014 03:19:13 +0000 (22:19 -0500)]
[release-branch.go1.4] [release-branch.go1.4] encoding/xml: remove SyntaxError.Byte

««« CL 182580043 / 2d1ab17a670a
encoding/xml: remove SyntaxError.Byte

It is unused. It was introduced in the CL that added InputOffset.
I suspect it was an editing mistake.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/182580043
»»»

TBR=bradfitz
CC=golang-codereviews
https://golang.org/cl/180630043

9 years ago[release-branch.go1.4] codereview: add release-branch.go1.4 prefix, like for dev...
Russ Cox [Fri, 5 Dec 2014 20:27:48 +0000 (15:27 -0500)]
[release-branch.go1.4] codereview: add release-branch.go1.4 prefix, like for dev branches

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/178710043

9 years ago[release-branch.go1.4] cmd/api: make API check fail for undeclared API in release...
Russ Cox [Fri, 5 Dec 2014 19:04:17 +0000 (14:04 -0500)]
[release-branch.go1.4] cmd/api: make API check fail for undeclared API in release branch

We forgot to do the usual API review.
Make that not possible in the future.
I'll pull this change over to the main
branch too, but it's more important
(and only testable) here.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/185050043

9 years agocodereview: release-branch.go1.4 is now a work branch
Russ Cox [Fri, 5 Dec 2014 19:02:51 +0000 (14:02 -0500)]
codereview: release-branch.go1.4 is now a work branch

(That is, changes can originate in the branch.
The main branch has diverged enough that this
may be necessary.)

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/187810043

9 years ago[release-branch.go1.4] cmd/go: fix build
Russ Cox [Fri, 5 Dec 2014 04:43:01 +0000 (23:43 -0500)]
[release-branch.go1.4] cmd/go: fix build

««« CL 182480043 / 8d42099cdc23
cmd/go: fix build
The new semantics of split require the newline be present.
The test was stale.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/182480043
»»»

TBR=r
CC=golang-codereviews
https://golang.org/cl/178690043

9 years ago[release-branch.go1.4] cmd/go: avoid use of bufio.Scanner in generate
Russ Cox [Fri, 5 Dec 2014 04:42:16 +0000 (23:42 -0500)]
[release-branch.go1.4] cmd/go: avoid use of bufio.Scanner in generate

««« CL 182970043 / 573a7b5178c4
cmd/go: avoid use of bufio.Scanner in generate

Scanner can't handle stupid long lines and there are
reports of stupid long lines in production.

Note the issue isn't long "//go:generate" lines, but
any long line in any Go source file.

To be fair, if you're going to have a stupid long line
it's not a bad bet you'll want to run it through go
generate, because it's some embeddable asset that
has been machine generated. (One could ask why
that generation process didn't add a newline or two,
but we should cope anyway.)

Rewrite the file scanner in "go generate" so it can
handle arbitrarily long lines, and only stores in memory
those lines that start "//go:generate".

Also: Adjust the documentation to make clear that it
does not parse the file.

Fixes #9143.
Fixes #9196.

LGTM=rsc, dominik.honnef
R=rsc, cespare, minux, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/182970043
»»»

TBR=r
CC=golang-codereviews
https://golang.org/cl/183060044

9 years ago[release-branch.go1.4] cmd/pprof/internal/commands: add command to open browser on...
Russ Cox [Thu, 4 Dec 2014 16:25:25 +0000 (11:25 -0500)]
[release-branch.go1.4] cmd/pprof/internal/commands: add command to open browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes #9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043

9 years ago[release-branch.go1.4] lib/time: update to ICANN time zone database 2014j
Andrew Gerrand [Thu, 4 Dec 2014 04:32:30 +0000 (15:32 +1100)]
[release-branch.go1.4] lib/time: update to ICANN time zone database 2014j

««« CL 178660043 / ac865d86fc2a
lib/time: update to ICANN time zone database 2014j

Fixes #9189.

LGTM=dsymonds
R=golang-codereviews, dsymonds
CC=golang-codereviews
https://golang.org/cl/178660043
»»»

LGTM=minux, dsymonds
R=dsymonds, r, minux
CC=golang-codereviews
https://golang.org/cl/182460043

9 years ago[release-branch.go1.4] cmd/pprof: fix symbol resolution for remote profiles
Russ Cox [Wed, 3 Dec 2014 19:14:50 +0000 (14:14 -0500)]
[release-branch.go1.4] cmd/pprof: fix symbol resolution for remote profiles

««« CL 183080043 / b663cc7e6c15
cmd/pprof: fix symbol resolution for remote profiles

Fixes #9199.

LGTM=iant
R=golang-codereviews, iant
CC=austin, golang-codereviews, minux
https://golang.org/cl/183080043
»»»

TBR=iant
CC=golang-codereviews
https://golang.org/cl/176680043

9 years ago[release-branch.go1.4] cmd/go: regenerate doc.go
Andrew Gerrand [Tue, 2 Dec 2014 23:50:28 +0000 (10:50 +1100)]
[release-branch.go1.4] cmd/go: regenerate doc.go

««« CL 183000043 / 871468f5ceaf
cmd/go: regenerate doc.go

Move change from CL 170770043 to correct file and regenerate docs
for changes from CL 164120043.

LGTM=adg
R=golang-codereviews, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/183000043

»»»

LGTM=minux
R=bradfitz, minux
CC=golang-codereviews
https://golang.org/cl/181490043

9 years agogo1.4rc2 go1.4rc2
Andrew Gerrand [Tue, 2 Dec 2014 02:43:43 +0000 (13:43 +1100)]
go1.4rc2

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/179700043

9 years ago[release-branch.go1.4] runtime: fix hang in GC due to shrinkstack vs netpoll race
Russ Cox [Mon, 1 Dec 2014 21:42:41 +0000 (16:42 -0500)]
[release-branch.go1.4] runtime: fix hang in GC due to shrinkstack vs netpoll race

««« CL 179680043 / 752cd9199639
runtime: fix hang in GC due to shrinkstack vs netpoll race

During garbage collection, after scanning a stack, we think about
shrinking it to reclaim some memory. The shrinking code (called
while the world is stopped) checked that the status was Gwaiting
or Grunnable and then changed the state to Gcopystack, to essentially
lock the stack so that no other GC thread is scanning it.
The same locking happens for stack growth (and is more necessary there).

        oldstatus = runtime·readgstatus(gp);
        oldstatus &= ~Gscan;
        if(oldstatus == Gwaiting || oldstatus == Grunnable)
                runtime·casgstatus(gp, oldstatus, Gcopystack); // oldstatus is Gwaiting or Grunnable
        else
                runtime·throw("copystack: bad status, not Gwaiting or Grunnable");

Unfortunately, "stop the world" doesn't stop everything. It stops all
normal goroutine execution, but the network polling thread is still
blocked in epoll and may wake up. If it does, and it chooses a goroutine
to mark runnable, and that goroutine is the one whose stack is shrinking,
then it can happen that between readgstatus and casgstatus, the status
changes from Gwaiting to Grunnable.

casgstatus assumes that if the status is not what is expected, it is a
transient change (like from Gwaiting to Gscanwaiting and back, or like
from Gwaiting to Gcopystack and back), and it loops until the status
has been restored to the expected value. In this case, the status has
changed semi-permanently from Gwaiting to Grunnable - it won't
change again until the GC is done and the world can continue, but the
GC is waiting for the status to change back. This wedges the program.

To fix, call a special variant of casgstatus that accepts either Gwaiting
or Grunnable as valid statuses.

Without the fix bug with the extra check+throw in casgstatus, the
program below dies in a few seconds (2-10) with GOMAXPROCS=8
on a 2012 Retina MacBook Pro. With the fix, it runs for minutes
and minutes.

package main

import (
        "io"
        "log"
        "net"
        "runtime"
)

func main() {
        const N = 100
        for i := 0; i < N; i++ {
                l, err := net.Listen("tcp", "127.0.0.1:0")
                if err != nil {
                        log.Fatal(err)
                }
                ch := make(chan net.Conn, 1)
                go func() {
                        var err error
                        c1, err := net.Dial("tcp", l.Addr().String())
                        if err != nil {
                                log.Fatal(err)
                        }
                        ch <- c1
                }()
                c2, err := l.Accept()
                if err != nil {
                        log.Fatal(err)
                }
                c1 := <-ch
                l.Close()
                go netguy(c1, c2)
                go netguy(c2, c1)
                c1.Write(make([]byte, 100))
        }
        for {
                runtime.GC()
        }
}

func netguy(r, w net.Conn) {
        buf := make([]byte, 100)
        for {
                bigstack(1000)
                _, err := io.ReadFull(r, buf)
                if err != nil {
                        log.Fatal(err)
                }
                w.Write(buf)
        }
}

var g int

func bigstack(n int) {
        var buf [100]byte
        if n > 0 {
                bigstack(n - 1)
        }
        g = int(buf[0]) + int(buf[99])
}

Fixes #9186.

LGTM=rlh
R=austin, rlh
CC=dvyukov, golang-codereviews, iant, khr, r
https://golang.org/cl/179680043
»»»

TBR=rlh
CC=golang-codereviews
https://golang.org/cl/184030043

9 years ago[release-branch.go1.4] reflect: Fix reflect.funcLayout. The GC bitmap has two bits per
Russ Cox [Mon, 1 Dec 2014 16:18:47 +0000 (11:18 -0500)]
[release-branch.go1.4] reflect: Fix reflect.funcLayout.  The GC bitmap has two bits per

««« CL 182160043 / 321d04dea9d6
reflect: Fix reflect.funcLayout.  The GC bitmap has two bits per
pointer, not one.

Fixes #9179

LGTM=iant, rsc
R=golang-codereviews, iant, rsc
CC=golang-codereviews
https://golang.org/cl/182160043
»»»

TBR=khr
CC=golang-codereviews
https://golang.org/cl/180440044

9 years ago[release-branch.go1.4] doc: tidy up "Projects" page; add Go 1.4
Andrew Gerrand [Tue, 25 Nov 2014 20:57:03 +0000 (07:57 +1100)]
[release-branch.go1.4] doc: tidy up "Projects" page; add Go 1.4

««« CL 182750043 / ffe33f1f1f17
doc: tidy up "Projects" page; add Go 1.4

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/182750043
»»»

TBR=r
CC=golang-codereviews
https://golang.org/cl/176350043

9 years ago[release-branch.go1.4] go/build: build $GOOS_test.go always
Russ Cox [Tue, 25 Nov 2014 03:00:01 +0000 (22:00 -0500)]
[release-branch.go1.4] go/build: build $GOOS_test.go always

««« CL 176290043 / 8025b7d1e6c9
go/build: build $GOOS_test.go always

We decided to build $GOOS.go always
but forgot to test $GOOS_test.go.

Fixes #9159.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/176290043
»»»

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/182740043

9 years ago[release-branch.go1.4] image/jpeg: handle Read returning n > 0, err != nil in d.fill
Russ Cox [Sun, 23 Nov 2014 16:15:26 +0000 (11:15 -0500)]
[release-branch.go1.4] image/jpeg: handle Read returning n > 0, err != nil in d.fill

««« CL 178120043 / 95f5614b4648
image/jpeg: handle Read returning n > 0, err != nil in d.fill

Fixes #9127.

LGTM=r
R=bradfitz, r
CC=golang-codereviews, nigeltao
https://golang.org/cl/178120043
»»»

TBR=r
CC=golang-codereviews
https://golang.org/cl/181870043

9 years ago[release-branch.go1.4] cmd/go: fix running pprof on windows.
Russ Cox [Sat, 22 Nov 2014 18:38:29 +0000 (13:38 -0500)]
[release-branch.go1.4] cmd/go: fix running pprof on windows.

««« CL 176170043 / 61bbf19823d5
cmd/go: fix running pprof on windows.

Fixes #9149.

LGTM=alex.brainman, rsc
R=rsc, dave, alex.brainman
CC=golang-codereviews
https://golang.org/cl/176170043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/175550043

9 years ago[release-branch.go1.4] runtime: fix atomic operations on non-heap addresses
Russ Cox [Thu, 20 Nov 2014 15:14:49 +0000 (10:14 -0500)]
[release-branch.go1.4] runtime: fix atomic operations on non-heap addresses

««« CL 179030043 / e4ab8f908aac
runtime: fix atomic operations on non-heap addresses
Race detector runtime does not tolerate operations on addresses
that was not previously declared with __tsan_map_shadow
(namely, data, bss and heap). The corresponding address
checks for atomic operations were removed in
https://golang.org/cl/111310044
Restore these checks.
It's tricker than just not calling into race runtime,
because it is the race runtime that makes the atomic
operations themselves (if we do not call into race runtime
we skip the atomic operation itself as well). So instead we call
__tsan_go_ignore_sync_start/end around the atomic operation.
This forces race runtime to skip all other processing
except than doing the atomic operation itself.
Fixes #9136.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/179030043

»»»

TBR=dvyukov
CC=golang-codereviews
https://golang.org/cl/180030043

9 years ago[release-branch.go1.4] build: disable race external linking test on OS X 10.6 and...
Russ Cox [Thu, 20 Nov 2014 02:25:07 +0000 (21:25 -0500)]
[release-branch.go1.4] build: disable race external linking test on OS X 10.6 and earlier

««« CL 176070043 / 500cb52e08e6
build: disable race external linking test on OS X 10.6 and earlier

External linking doesn't work there at all.

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/176070043
»»»

LGTM=bradfitz, adg
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/175400043

9 years ago[release-branch.go1.4] runtime: remove assumption that noptrdata data bss noptrbss...
Russ Cox [Wed, 19 Nov 2014 20:31:31 +0000 (15:31 -0500)]
[release-branch.go1.4] runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous

««« CL 179980043 / d71cc7e8a0e0
runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous

The assumption can be violated by external linkers reordering them or
inserting non-Go sections in between them. I looked briefly at trying
to write out the _go_.o in external linking mode in a way that forced
the ordering, but no matter what there's no way to force Go's data
and Go's bss to be next to each other. If there is any data or bss from
non-Go objects, it's very likely to get stuck in between them.

Instead, rewrite the two places we know about that make the assumption.
I grepped for noptrdata to look for more and didn't find any.

The added race test (os/exec in external linking mode) fails without
the changes in the runtime. It crashes with an invalid pointer dereference.

Fixes #9133.

LGTM=dneil
R=dneil
CC=dvyukov, golang-codereviews, iant
https://golang.org/cl/179980043
»»»

LGTM=dneil
R=dneil
CC=golang-codereviews
https://golang.org/cl/173510043

9 years ago[release-branch.go1.4] undo CL 131750044 / 2d6d44ceb80e
Russ Cox [Wed, 19 Nov 2014 19:38:22 +0000 (14:38 -0500)]
[release-branch.go1.4] undo CL 131750044 / 2d6d44ceb80e

««« CL 174450043 / 699cc091a16d
undo CL 131750044 / 2d6d44ceb80e

Breaks reading from stdin in parent after exec with SysProcAttr{Setpgid: true}.

package main

import (
        "fmt"
        "os"
        "os/exec"
        "syscall"
)

func main() {
        cmd := exec.Command("true")
        cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
        cmd.Run()

        fmt.Printf("Hit enter:")
        os.Stdin.Read(make([]byte, 100))
        fmt.Printf("Bye\n")
}

In go1.3, I type enter at the prompt and the program exits.
With the CL being rolled back, the program wedges at the
prompt.

««« original CL description
syscall: SysProcAttr job control changes

Making the child's process group the foreground process group and
placing the child in a specific process group involves co-ordination
between the parent and child that must be done post-fork but pre-exec.

LGTM=iant
R=golang-codereviews, gobot, iant, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/131750044

»»»

LGTM=minux, dneil
R=dneil, minux
CC=golang-codereviews, iant, michael.p.macinnis
https://golang.org/cl/174450043
»»»

LGTM=minux
R=dneil, minux
CC=golang-codereviews
https://golang.org/cl/179970043

9 years ago[release-branch.go1.4] doc/go1.4.html: rewrite first sentence to make it clearer
Andrew Gerrand [Tue, 18 Nov 2014 22:47:56 +0000 (09:47 +1100)]
[release-branch.go1.4] doc/go1.4.html: rewrite first sentence to make it clearer

««« CL 178910043 / 3916b070c5f3
doc/go1.4.html: rewrite first sentence to make it clearer
The grammar was atrocious, probably the victim of an editing error.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/178910043
»»»

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/175310043

9 years ago[release-branch.go1.4] remove cmd/link from nacl test zip go1.4rc1
Andrew Gerrand [Mon, 17 Nov 2014 02:55:59 +0000 (13:55 +1100)]
[release-branch.go1.4] remove cmd/link from nacl test zip

LGTM=dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/179830043

9 years ago[release-branch.go1.4] remove cmd/link
Andrew Gerrand [Mon, 17 Nov 2014 02:46:45 +0000 (13:46 +1100)]
[release-branch.go1.4] remove cmd/link

LGTM=dsymonds, minux
R=rsc, dsymonds, minux
CC=golang-codereviews
https://golang.org/cl/176910043

9 years ago[release-branch.go1.4] debug/goobj: move to cmd/internal/goobj
Andrew Gerrand [Mon, 17 Nov 2014 01:56:35 +0000 (12:56 +1100)]
[release-branch.go1.4] debug/goobj: move to cmd/internal/goobj

««« CL 174250043 / c16349455e05
debug/goobj: move to cmd/internal/goobj

debug/goobj is not ready to be published but it is
needed for the various binary-reading commands.
Move to cmd/internal/goobj.

(The Go 1.3 release branch deleted it, but that's not
an option anymore due to the command dependencies.
The API is still not vetted nor terribly well designed.)

LGTM=adg, dsymonds
R=adg, dsymonds
CC=golang-codereviews
https://golang.org/cl/174250043
»»»

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/177890043

9 years agogo1.4rc1
Andrew Gerrand [Sun, 16 Nov 2014 22:37:04 +0000 (09:37 +1100)]
go1.4rc1

9 years agoruntime: fix sudog leak
Russ Cox [Sun, 16 Nov 2014 21:44:45 +0000 (16:44 -0500)]
runtime: fix sudog leak

The SudoG used to sit on the stack, so it was cheap to allocated
and didn't need to be cleaned up when finished.

For the conversion to Go, we had to move sudog off the stack
for a few reasons, so we added a cache of recently used sudogs
to keep allocation cheap. But we didn't add any of the necessary
cleanup before adding a SudoG to the new cache, and so the cached
SudoGs had stale pointers inside them that have caused all sorts
of awful, hard to debug problems.

CL 155760043 made sure SudoG.elem is cleaned up.
CL 150520043 made sure SudoG.selectdone is cleaned up.

This CL makes sure SudoG.next, SudoG.prev, and SudoG.waitlink
are cleaned up. I should have done this when I did the other two
fields; instead I wasted a week tracking down a leak they caused.

A dangling SudoG.waitlink can point into a sudogcache list that
has been "forgotten" in order to let the GC collect it, but that
dangling .waitlink keeps the list from being collected.
And then the list holding the SudoG with the dangling waitlink
can find itself in the same situation, and so on. We end up
with lists of lists of unusable SudoGs that are still linked into
the object graph and never collected (given the right mix of
non-trivial selects and non-channel synchronization).

More details in golang.org/issue/9110.

Fixes #9110.

LGTM=r
R=r
CC=dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/177870043

9 years agoruntime: update URL for heap dump format
Russ Cox [Sun, 16 Nov 2014 19:25:33 +0000 (14:25 -0500)]
runtime: update URL for heap dump format

I just created that redirect, so we can change
it once the wiki moves.

LGTM=bradfitz, khr
R=khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/177780043

9 years agoC: add Nick Cooper (Google CLA).
Nigel Tao [Fri, 14 Nov 2014 06:03:17 +0000 (17:03 +1100)]
C: add Nick Cooper (Google CLA).

LGTM=dsymonds
R=dsymonds
CC=golang-codereviews, nmvc
https://golang.org/cl/169580043

9 years agodoc: fix small typo in doc
Yasuhiro Matsumoto [Fri, 14 Nov 2014 03:05:14 +0000 (14:05 +1100)]
doc: fix small typo in doc

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/170660043

9 years agonet/http: add comment to clarify whether Dir is '/' or '\'.
Nigel Tao [Fri, 14 Nov 2014 00:43:01 +0000 (11:43 +1100)]
net/http: add comment to clarify whether Dir is '/' or '\'.

LGTM=bradfitz
R=bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/168600044

9 years agonet/url: add example of using URL.Opaque with http.Request
Brad Fitzpatrick [Wed, 12 Nov 2014 22:27:27 +0000 (14:27 -0800)]
net/url: add example of using URL.Opaque with http.Request

Per private thread soliciting help. I realized part of this is
documented in several places, but we lacked a unifying
example.

LGTM=rsc
R=golang-codereviews
CC=adg, golang-codereviews, iant, rsc
https://golang.org/cl/171620043

9 years agoA+C: add another email address for Emil Hessman
Emil Hessman [Wed, 12 Nov 2014 18:01:23 +0000 (10:01 -0800)]
A+C: add another email address for Emil Hessman

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/143470043

9 years agohash/crc32: fix comment that the IEEE polynomial applies to MPEG-2.
Nigel Tao [Wed, 12 Nov 2014 07:48:00 +0000 (18:48 +1100)]
hash/crc32: fix comment that the IEEE polynomial applies to MPEG-2.

LGTM=minux
R=adg, minux
CC=golang-codereviews
https://golang.org/cl/170520043

9 years agoregexp/syntax: Clarify comment of OpAnyCharNotNL.
Robin Eklind [Wed, 12 Nov 2014 02:52:07 +0000 (18:52 -0800)]
regexp/syntax: Clarify comment of OpAnyCharNotNL.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/171560043

9 years agospec: method selectors don't auto-deref named pointer types
Robert Griesemer [Tue, 11 Nov 2014 21:19:47 +0000 (13:19 -0800)]
spec: method selectors don't auto-deref named pointer types

Language clarification.

The existing rules for selector expressions imply
automatic dereferencing of pointers to struct fields.
They also implied automatic dereferencing of selectors
denoting methods. In almost all cases, such automatic
dereferencing does indeed take place for methods but the
reason is not the selector rules but the fact that method
sets include both methods with T and *T receivers; so for
a *T actual receiver, a method expecting a formal T
receiver, also accepts a *T (and the invocation or method
value expression is the reason for the auto-derefering).

However, the rules as stated so far implied that even in
case of a variable p of named pointer type P, a selector
expression p.f would always be shorthand for (*p).f. This
is true for field selectors f, but cannot be true for
method selectors since a named pointer type always has an
empty method set.

Named pointer types may never appear as anonymous field
types (and method receivers, for that matter), so this
only applies to variables declared of a named pointer
type. This is exceedingly rare and perhaps shouldn't be
permitted in the first place (but we cannot change that).

Amended the selector rules to make auto-deref of values
of named pointer types an exception to the general rules
and added corresponding examples with explanations.

Both gc and gccgo have a bug where they do auto-deref
pointers of named types in method selectors where they
should not:

See http://play.golang.org/p/c6VhjcIVdM , line 45.

Fixes #5769.
Fixes #8989.

LGTM=r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/168790043

9 years agodoc/gopher: add jpgs of the 5th anniversary image
Rob Pike [Tue, 11 Nov 2014 12:46:20 +0000 (23:46 +1100)]
doc/gopher: add jpgs of the 5th anniversary image

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/172980043

9 years agodoc: update go1.4.html's minor library changes.
Nigel Tao [Tue, 11 Nov 2014 05:06:47 +0000 (16:06 +1100)]
doc: update go1.4.html's minor library changes.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/173920043

9 years agocmd/cgo: tweak doc to not show example of passing Go pointer
Ian Lance Taylor [Mon, 10 Nov 2014 16:12:43 +0000 (08:12 -0800)]
cmd/cgo: tweak doc to not show example of passing Go pointer

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171360043

9 years agocrypto/x509: add Solaris certificate file location
Ian Lance Taylor [Mon, 10 Nov 2014 04:57:44 +0000 (20:57 -0800)]
crypto/x509: add Solaris certificate file location

Fixes #9078.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/172920043

9 years agocmd/5g: fix bit mask for div/mod routines clobbering R12
Ian Lance Taylor [Mon, 10 Nov 2014 02:55:36 +0000 (18:55 -0800)]
cmd/5g: fix bit mask for div/mod routines clobbering R12

This patch is based only on reading the code.  I have not
tried to construct a test case.

Fixes #9077.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/172110043

9 years agotest: fix nacl build
Russ Cox [Mon, 10 Nov 2014 02:10:49 +0000 (21:10 -0500)]
test: fix nacl build

Disable linkx_run.go and sinit_run.go, because they
exec subprocesses, which NaCl cannot.

TBR=r
CC=golang-codereviews
https://golang.org/cl/171350043

9 years agocmd/internal/objfile: minor edits
Russ Cox [Mon, 10 Nov 2014 01:21:37 +0000 (20:21 -0500)]
cmd/internal/objfile: minor edits

Follow-up in response to comments on
TBR'ed CL 171260043.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/172080043

9 years agoruntime: fix sudog leak in syncsemrelease
Russ Cox [Mon, 10 Nov 2014 01:21:03 +0000 (20:21 -0500)]
runtime: fix sudog leak in syncsemrelease

Manifested as increased memory usage in a Google production system.

Not an unbounded leak, but can significantly increase the number
of sudogs allocated between garbage collections.

I checked all the other calls to acquireSudog.
This is the only one that was missing a releaseSudog.

LGTM=r, dneil
R=dneil, r
CC=golang-codereviews
https://golang.org/cl/169260043

9 years agoruntime/cgo: add +build tags to files named for $GOOS
Russ Cox [Mon, 10 Nov 2014 01:20:45 +0000 (20:20 -0500)]
runtime/cgo: add +build tags to files named for $GOOS

These are being built into the runtime/cgo for every
operating system. It doesn't seem to matter, but
restore the Go 1.3 behavior anyway.

LGTM=r
R=r, dave
CC=golang-codereviews
https://golang.org/cl/171290043

9 years agocmd/dist: remove old misc/pprof
Russ Cox [Mon, 10 Nov 2014 01:20:26 +0000 (20:20 -0500)]
cmd/dist: remove old misc/pprof

LGTM=dave, bradfitz, r, alex.brainman
R=r, dave, bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/167350043

9 years agocmd/pprof: install as go tool pprof
Russ Cox [Mon, 10 Nov 2014 01:20:06 +0000 (20:20 -0500)]
cmd/pprof: install as go tool pprof

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/168320043

9 years agoundo CL 169000043 / 05b838013df9
Andrew Gerrand [Sun, 9 Nov 2014 22:46:27 +0000 (09:46 +1100)]
undo CL 169000043 / 05b838013df9

This was a mistake. The cmd/api tool
depends on an old version of go/types.

««« original CL description
cmd/api: use golang.org/x/... import paths

LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/169000043
»»»

TBR=rsc, bradfitz
R=bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/169320043

9 years agoundo CL 166380043 / 0b54a0927656
Andrew Gerrand [Sun, 9 Nov 2014 22:39:17 +0000 (09:39 +1100)]
undo CL 166380043 / 0b54a0927656

This was a mistake; the cmd/api tool
depends on an old version of go/types.

««« original CL description
cmd/api: bump go.tools golden CL hash

TBR=bradfitz
R=rsc
CC=golang-codereviews
https://golang.org/cl/166380043
»»»

TBR=bradfitz, rsc
R=bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/167430043

9 years agocmd/api: bump go.tools golden CL hash
Andrew Gerrand [Sun, 9 Nov 2014 22:30:57 +0000 (09:30 +1100)]
cmd/api: bump go.tools golden CL hash

TBR=bradfitz
R=rsc
CC=golang-codereviews
https://golang.org/cl/166380043

9 years agocmd/go: use golang.org/x/... import paths
Andrew Gerrand [Sun, 9 Nov 2014 22:27:25 +0000 (09:27 +1100)]
cmd/go: use golang.org/x/... import paths

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/168170043

9 years agoall: use golang.org/x/... import paths
Andrew Gerrand [Sun, 9 Nov 2014 22:15:57 +0000 (09:15 +1100)]
all: use golang.org/x/... import paths

LGTM=rsc, r
R=r, rsc
CC=golang-codereview, golang-codereviews
https://golang.org/cl/168050043

9 years agocmd/api: use golang.org/x/... import paths
Andrew Gerrand [Sun, 9 Nov 2014 22:13:04 +0000 (09:13 +1100)]
cmd/api: use golang.org/x/... import paths

LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/169000043

9 years agolib/codereview: fix with more recent hg revisions.
Adam Langley [Sun, 9 Nov 2014 01:12:23 +0000 (17:12 -0800)]
lib/codereview: fix with more recent hg revisions.

I've Mercurial version 3.2 and hg submit fails with:

  File "/home/agl/devel/go/lib/codereview/codereview.py", line 3567, in get_hg_status
    ret = hg_commands.status(fui, self.repo, *[], **{'rev': [rev], 'copies': True})
  File "/usr/lib/python2.7/site-packages/mercurial/commands.py", line 5714, in status
    fm = ui.formatter('status', opts)
  File "/home/agl/devel/go/lib/codereview/codereview.py", line 3464, in formatter
    return plainformatter(self, topic, opts)
  File "/usr/lib/python2.7/site-packages/mercurial/formatter.py", line 57, in __init__
    if ui.debugflag:
  AttributeError: 'FakeMercurialUI' object has no attribute 'debugflag'

This change dumbly adds a boolean debugflag and that seems to work.

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/167410043

9 years agonet/http: fix benchmark goroutine leak
Brad Fitzpatrick [Sat, 8 Nov 2014 18:13:28 +0000 (15:13 -0300)]
net/http: fix benchmark goroutine leak

New detection because of net/http now using TestMain.

Fixes #9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043

9 years agocmd/go: disable warnings from cmd/cc when building for SWIG
Ian Lance Taylor [Fri, 7 Nov 2014 16:19:19 +0000 (08:19 -0800)]
cmd/go: disable warnings from cmd/cc when building for SWIG

Fixes #9065.

LGTM=rsc
R=rsc, misch
CC=golang-codereviews
https://golang.org/cl/171270043

9 years agocmd/internal/objfile: add Disasm
Russ Cox [Fri, 7 Nov 2014 01:08:00 +0000 (20:08 -0500)]
cmd/internal/objfile: add Disasm

This was missing from CL 167320043.
Happy to apply comments in a followup.
TBR to fix build.

TBR=r
CC=golang-codereviews
https://golang.org/cl/171260043