net/http/httptest: protect against port reuse

Should make BSDs more reliable. (they seem to reuse ports
quicker than Linux)

Tested by hand with local modifications to force reuse on
Linux. (net/http tests failed before, pass now) Details in the
issue.

Fixes issue 4436

R=golang-dev, minux.ma
CC=golang-dev
http://codereview.appspot.com/6847101
net: never return -1 bytes read from netFD.Read

If the a network read would block, and a packet arrived just before the timeout expired, then the number of bytes from the previous (blocking) read, -1, would be returned.

This change restores the previous logic, where n would be unconditionally set to 0 if err != nil, but was skipped due to a change in CL 6851096.

The test for this change is CL 6851061.

R=bradfitz, mikioh.mikioh, dvyukov, rsc
CC=golang-dev
http://codereview.appspot.com/6852085
cmd/gc: check malloc return value

Check the return value from malloc - do not assume that we were
allocated memory just because we asked for it.

Update issue 4415.

R=minux.ma, daniel.morsing, remyoudompheng, rsc
CC=golang-dev
http://codereview.appspot.com/6782100
runtime: implement SysUnused for openbsd

R=golang-dev, minux.ma
CC=golang-dev
http://codereview.appspot.com/6854079
runtime: implement SysUnused for netbsd

R=golang-dev, bradfitz, minux.ma, dave
CC=golang-dev
http://codereview.appspot.com/6842081
net/http: clarify docs of ParseForm and mention ParseForm in docs for FormValue
while we're at it, also fix a return value stutter in ParseForm.

R=bradfitz
CC=golang-dev
http://codereview.appspot.com/6847074
runtime: regenerate defs-files for freebsd

R=minux.ma, jsing
CC=golang-dev
http://codereview.appspot.com/6855080
net, cmd/fix: add IPv6 scoped addressing zone to INET, INET6 address structs

This CL starts to introduce IPv6 scoped addressing capability
into the net package.

The Public API changes are:
+pkg net, type IPAddr struct, Zone string
+pkg net, type IPNet struct, Zone string
+pkg net, type TCPAddr struct, Zone string
+pkg net, type UDPAddr struct, Zone string

Update issue 4234.

R=rsc, bradfitz, iant
CC=golang-dev
http://codereview.appspot.com/6849045
runtime: re-format comments.
add necessary newlines.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6847067

Committer: Russ Cox <rsc@golang.org>
test: add test for floating point rounding of constants

Failed with gccgo.

R=golang-dev, remyoudompheng, rsc
CC=golang-dev
http://codereview.appspot.com/6855053
runtime: duplicate code for runtime.nanotime to avoid stack overflow in vDSO clock_gettime
Fixes issue 4402.

R=remyoudompheng, shivakumar.gn, random0x00, rsc
CC=golang-dev
http://codereview.appspot.com/6842063
cmd/gc: fix invalid indirect error at statement level
Fixes issue 4429.

R=golang-dev, remyoudompheng, daniel.morsing, rsc
CC=golang-dev
http://codereview.appspot.com/6850097
cmd/go: racewalk: fix nested struct handling
Fixes issue 4424.
Fixes issue 4425.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6849093
cnd/gc: fix build

R=golang-dev
CC=golang-dev
http://codereview.appspot.com/6856097
net: add deadline prolongation test
Currently the test exposes data races on deadline vars.

R=golang-dev, dave, bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/6845091
crypto/tls: use 1/n-1 record splitting to protect against BEAST

This requires rebasing the block-mode test scripts.
I used GnuTLS version 3.1.4.

R=agl
CC=golang-dev
http://codereview.appspot.com/6844073
libmach, cmd/cc, cmd/cov, cmd/ld, cmd/prof: check malloc return value

Update issue 4415.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6856080