runtime: optionally check all allocations in hashmap.c

Adds the new debugging constant 'checkgc'. If its value is non-zero
all calls to mallocgc() from hashmap.c will start a garbage collection.

Fixes issue 5074.

R=golang-dev, khr
CC=golang-dev, rsc
https://codereview.appspot.com/7663051
math: make Hypot special cases look like others

The edit makes Hypot's description match the form
used in the other routines in this package.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/8003046
cmd/5l, cmd/6l, cmd/8l: fix segfault on reading LOCALS for a duplicate definition.

Fixes issue 5105.

R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://codereview.appspot.com/7965043
runtime: store asmcgocall return PC where the ARM unwind expects it

The ARM implementation of runtime.cgocallback_gofunc diverged
from the calling convention by leaving a word of garbage at
the top of the stack and storing the return PC above the
locals.  This change stores the return PC at the top of the
stack and removes the save area above the locals.

Update Issue 5124
This CL fixes first part of the ARM issues and added the unwind test.

R=golang-dev, bradfitz, minux.ma, cshapiro, rsc
CC=golang-dev
https://codereview.appspot.com/7728045
cmd/gc: instrument logical && and ||.

The right operand of a && and || is only executed conditionnally,
so the instrumentation must be more careful. In particular
it should not turn nodes assumed to be cheap after walk into
expensive ones.

Update issue 4228

R=dvyukov, golang-dev
CC=golang-dev
https://codereview.appspot.com/7986043
runtime: delete mkasmh.sh

This functionality moved into cmd/dist for Go 1.0.
Changes to this script have no effect.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/8020043
runtime: pass setmg function to cgo_init

This keeps the logic about how to set the thread-local variables
m and g in code compiled and linked by the gc toolchain,
an important property for upcoming cgo changes.

It's also just a nice cleanup: one less place to update when
these details change.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7560048
doc: add summary of net/http additions to Go 1.1

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7812050
cmd/ld: permit sym to be both cgo_export_static and cgo_export_dynamic

Fixes SWIG callbacks.  Previously crosscall2 was only
cgo_export_static, despite the use of two #pragma declarations
in runtime/cgo/callbacks.c.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://codereview.appspot.com/7817048
crypto/rsa: don't correct private exponent unless needed.

At some point in the past, I believe the GCD algorithm was setting d to
be negative. The RSA code has been correcting that ever since but, now,
it appears to have changed and the correction isn't needed.

Having d be too large is harmless, it's just a little odd and I
happened to notice.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7948044
database/sql: don't close a driver.Conn until its Stmts are closed

Fixes issue 5046

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/8016044
database/sql: link to driver wiki page

Fixes issue 5127

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/8011044
doc/go1.1.html: introduction

R=golang-dev, adg, bradfitz
CC=golang-dev
https://codereview.appspot.com/7696045
database/sql: optimized []byte copy + []byte(nil) -> *interface fix

Make the copy directly in the convert switch instead of an extra loop.
Also stops converting nil-[]byte to zero-[]byte when assigning to *interface

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7962044

Committer: Brad Fitzpatrick <bradfitz@golang.org>
doc/articles: update reference to obsolete "package documentation".

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7475048
image/gif: make test repeatable

Fixes issue with go test -cpu=1,1

R=minux.ma, bradfitz, nigeltao
CC=golang-dev
https://codereview.appspot.com/7808045
misc/vim: make Godoc command work with "log.Print".

R=dsymonds
CC=golang-dev
https://codereview.appspot.com/7757043

Committer: David Symonds <dsymonds@golang.org>
cmd/gc: fix nil pointer dereferences.

Fixes issue 5119.

R=golang-dev, dvyukov, dave, rsc
CC=golang-dev
https://codereview.appspot.com/7838050
cmd/gc: more race instrumentation.

Handle interface comparison correctly,
add a few more tests, mark more nodes as impossible.

R=dvyukov, golang-dev
CC=golang-dev
https://codereview.appspot.com/7942045
net: fix test data corruption in repetitive test runs by -cpu

This CL avoids test data sharing in repetitive test runs;
e.g., go test net -cpu=1,1,1

R=golang-dev, fullung, bradfitz
CC=golang-dev
https://codereview.appspot.com/8011043