[release-branch.go1.3] runtime: fix nacl amd64p32 flakiness

««« CL 102710043 / 5640e19d768d
runtime: fix nacl amd64p32 flakiness

newproc takes two extra pointers, not two extra registers.
On amd64p32 (nacl) they are different.

We diagnosed this before the 1.3 cut but the tree was frozen.
I believe this is causing the random problems on the builder.

Fixes issue 8199.

TBR=r
CC=golang-codereviews
https://codereview.appspot.com/102710043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/124120044
[release-branch.go1.3] net: Don't read beyond end of slice when parsing resolv.conf options.

««« CL 102470046 / 5207b394de96
net: Don't read beyond end of slice when parsing resolv.conf options.

Fixes issue 8252.

LGTM=adg
R=ruiu, josharian, adg
CC=golang-codereviews
https://codereview.appspot.com/102470046

Committer: Andrew Gerrand <adg@golang.org>
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/124140043
[release-branch.go1.3] include/u.h: define _DEFAULT_SOURCE for new glibc

««« CL 112530043 / c8059ac4e0ec
include/u.h: define _DEFAULT_SOURCE for new glibc

glibc devs have apparently decided _BSD_SOURCE will be
deprecated on Linux, and issue a preprocessor warning if
declaring _BSD_SOURCE without _DEFAULT_SOURCE.

https://sourceware.org/glibc/wiki/Release/2.20

Fixes issue 8397.

LGTM=iant
R=dave, gobot, iant
CC=golang-codereviews
https://codereview.appspot.com/112530043

Committer: Ian Lance Taylor <iant@golang.org>
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/124150043
[release-branch.go1.3] cmd/cgo: fix recursive type mapping

««« CL 122850043 / 0015a2541545
cmd/cgo: fix recursive type mapping

Instead of immediately completing pointer type mappings, add them to
a queue to allow them to be completed later.  This fixes issues	caused
by Type() returning arbitrary in-progress type mappings.

Fixes issue 8368.
Fixes issue 8441.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/122850043

Committer: Ian Lance Taylor <iant@golang.org>
»»»

TBR=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/128940043
[release-branch.go1.3] crypto/rsa: fix out-of-bound access with short session keys.

««« CL 102670044 / c5f72a685e25
crypto/rsa: fix out-of-bound access with short session keys.

Thanks to Cedric Staub for noting that a short session key would lead
to an out-of-bounds access when conditionally copying the too short
buffer over the random session key.

LGTM=davidben, bradfitz
R=davidben, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/102670044
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/128930044
[release-branch.go1.3] runtime: turn off 'unexpected return pc' print on arm traceback

««« CL 118670043 / 671fa8a9eb80
runtime: turn off 'unexpected return pc' print on arm traceback

It can happen legitimately if a profiling signal arrives at just the wrong moment.
It's harmless.

Fixes issue 8153.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews, iant, r
https://codereview.appspot.com/118670043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/127950044
[release-branch.go1.3] doc: document new ParseMultipartForm behavior

««« CL 123860043 / cf99a05f0fbc
doc: document new ParseMultipartForm behavior

Fixes issue 8403.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/123860043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/127070043
[release-branch.go1.3] cmd/6g, cmd/8g: fix, test byte-sized magic multiply

««« CL 124950043 / 8e5ec6948793
cmd/6g, cmd/8g: fix, test byte-sized magic multiply

Credit to Rémy for finding and writing test case.

Fixes issue 8325.

LGTM=r
R=golang-codereviews, r
CC=dave, golang-codereviews, iant, remyoudompheng
https://codereview.appspot.com/124950043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/126000043
[release-branch.go1.3] runtime: ignore exceptions from foreign threads.

««« CL 104200046 / 14683b1cf2cc
runtime: ignore exceptions from foreign threads.
Fixes issue 8224.

LGTM=alex.brainman, rsc
R=alex.brainman, rsc, dave
CC=golang-codereviews
https://codereview.appspot.com/104200046
»»»

LGTM=alex.brainman, minux
R=rsc, alex.brainman, minux
CC=golang-codereviews
https://codereview.appspot.com/126010043
[release-branch.go1.3] cmd/8g: fix build

««« CL 129720043 / 0449858880be
cmd/8g: fix build

Fixes issue 8510.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/129720043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/129760043
[release-branch.go1.3] cmd/gc: make liveness ~10x faster

««« CL 125720043 / b92e5df7d3ba
cmd/gc: make liveness ~10x faster

1) The arrayindexof lookup function is O(n). Replace with O(1) lookups.

2) The checkptxt function is O(n²) and is purely for debugging.
Only run when the debugging flags are turned on.

3) Iterating over sparse bitmaps can be done faster word by word.
Introduce and use bvnext for that.

Run times before and after, on my 2.5 GHz Core i5 MacBook Pro.

x.go       9.48  0.84  issue 8259

x100.go    0.01  0.01  issue 8354
x1000.go   0.10  0.10
x2000.go   0.62  0.19
x3000.go   1.33  0.34
x4000.go   2.29  0.49
x5000.go   3.89  0.67
x6000.go   5.00  0.90
x7000.go   6.70  1.13
x8000.go   9.44  1.38
x9000.go  11.23  1.87
x10000.go 13.78  2.09

Fixes issue 8259.
Fixes issue 8354.

LGTM=iant, r
R=golang-codereviews, iant, r
CC=golang-codereviews
https://codereview.appspot.com/125720043
»»»

TBR=rsc
CC=golang-codereviews
https://codereview.appspot.com/121600043
go1.3.1

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/129020043
[release-branch.go1.3] doc: document go1.3.1

««« CL 126060043 / e3cf4c202bd8
doc: document go1.3.1

LGTM=r
R=r, rsc
CC=golang-codereviews
https://codereview.appspot.com/126060043
»»»

TBR=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/126070043
[release-branch.go1.3] net: prevent spurious on-connect events via epoll on linux

««« CL 120820043 / 06a4b59c1393
net: prevent spurious on-connect events via epoll on linux

On Linux, adding a socket descriptor to epoll instance before getting
the EINPROGRESS return value from connect system call could be a root
cause of spurious on-connect events.

See golang.org/issue/8276, golang.org/issue/8426 for further information.

All credit to Jason Eggleston <jason@eggnet.com>

Fixes issue 8276.
Fixes issue 8426.

LGTM=dvyukov
R=dvyukov, golang-codereviews, adg, dave, iant, alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/120820043
»»»

TBR=r, rsc
CC=golang-codereviews
https://codereview.appspot.com/128110045
[release-branch.go1.3] runtime: fix GC bitmap corruption

««« CL 103640044 / d2f256096d8d
runtime: fix GC bitmap corruption
Fixes issue 8299.

R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://codereview.appspot.com/103640044
»»»

TBR=r, rsc
CC=golang-codereviews
https://codereview.appspot.com/125150044
[release-branch.go1.3] undo 941ef9ddbada / 125150044

It broke the build across all platforms.
The original change wasn't even reviewed.
Probably should never have been ported to this branch.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/128130043