runtime: fix debug output

R=golang-dev, minux.ma
CC=golang-dev
https://codereview.appspot.com/7312101
crypto/x509: support IP SANs.

Subject Alternative Names in X.509 certificates may include IP
addresses. This change adds support for marshaling, unmarshaling and
verifying this form of SAN.

It also causes IP addresses to only be checked against IP SANs,
rather than against hostnames as was previously the case. This
reflects RFC 6125.

Fixes issue 4658.

R=golang-dev, mikioh.mikioh, bradfitz
CC=golang-dev
https://codereview.appspot.com/7336046
runtime: fix running under nohup

There are two ways nohup(1) might be implemented:
it might mask away the signal, or it might set the handler
to SIG_IGN, both of which are inherited across fork+exec.
So two fixes:

* Make sure to preserve the inherited signal mask at
minit instead of clearing it.

* If the SIGHUP handler is SIG_IGN, leave it that way.

Fixes issue 4491.

R=golang-dev, mikioh.mikioh, iant
CC=golang-dev
https://codereview.appspot.com/7308102
exp/cookiejar: fix windows builder

TBR=nigeltao
CC=golang-dev
https://codereview.appspot.com/7322084
runtime: fix build on linux

In addition to the compile failure fixed in signal*.c,
preserving the signal mask led to very strange crashes.
Testing shows that looking for SIG_IGN is all that
matters to get along with nohup, so reintroduce
sigset_zero instead of trying to preserve the signal mask.

TBR=iant
CC=golang-dev
https://codereview.appspot.com/7323067
exp/cookiejar: fix windows/386 build

More mysteriously broken tests.

TBR=nigeltao
CC=golang-dev
https://codereview.appspot.com/7342048
encoding/binary: make type error more specific

Right now it says 'invalid type S' for a struct type S.
Instead, say which type inside the struct is the problem.

Fixes issue 4825.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7301102
runtime: check rt_sigaction return values on linux

(If the mask size is wrong the system call fails.)

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7305097
runtime: ensure forward progress of runtime.Gosched() for locked goroutines
The removed code leads to the situation when M executes the same locked G again and again.
Fixes issue 4820.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7310096
runtime: allocate heap metadata at run time

Before, the mheap structure was in the bss,
but it's quite large (today, 256 MB, much of
which is never actually paged in), and it makes
Go binaries run afoul of exec-time bss size
limits on some BSD systems.

Fixes issue 4447.

R=golang-dev, dave, minux.ma, remyoudompheng, iant
CC=golang-dev
https://codereview.appspot.com/7307122
runtime/pprof: adjust reported line numbers to show call sites

This is the same logic used in the standard tracebacks.
The caller pc is the pc after the call, so except in the
fake "call" caused by a panic, back up the pc enough
that the lookup will use the previous instruction.

Fixes issue 4150.
Fixes issue 4151.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7317047