cmd/cgo: avoid worklist nondeterminism.

+ Regression test.

Fixes issue 9026.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/162490043
misc/cgo/test: fix bad C test code that fails on some configurations

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/169800043
A+C: add Jed Denlea (Fastly corporate CLA)

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews
https://codereview.appspot.com/165170043
A+C: Nathan P Finch (individual CLA)

TBR=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/155560045
cmd/go: fix minor typo

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
sync/atomic: fix comment referencing Value.Store's argument name

Fixes Issue 9029

LGTM=adg, r
R=r, adg
CC=golang-codereviews
https://codereview.appspot.com/161630044
A+C: add Gabriel Aszalos (individual CLA)

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/162580043
cmd/go: fixed typo in doc and generator

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

Committer: Ian Lance Taylor <iant@golang.org>
database/sql: make TestDrivers not crash on second run

Using -test.cpu=1,1 made it crash before.

Fixes Issue 9024

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

Committer: Ian Lance Taylor <iant@golang.org>
net/http: add missing newline in list of leaked goroutines

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/168860044
A+C: add Benoit Sigoure (individual CLA)

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/164410043
misc: Increase issue 6997's test timeout to prevent spurious failures.

On heavily loaded build servers, a 5 second timeout is too aggressive,
which causes this test to fail spuriously.

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

Committer: Ian Lance Taylor <iant@golang.org>
doc: document go get -f flag in 1.4 release notes

LGTM=r, rsc
R=r, rsc, adg
CC=golang-codereviews
https://codereview.appspot.com/168890043
runtime: make Go and C mallocgc signatures match

Previously, the flags argument to mallocgc was an int in Go,
but a uint32 in C.  Change the Go type to use uint32 so these
agree.  The largest flag value is 2 (and of course no flag
values are negative), so this won't change anything on little
endian architectures, but it matters on big endian.

LGTM=rsc
R=khr, rsc
CC=golang-codereviews
https://codereview.appspot.com/169920043
misc/cgo/test: fix freebsd test failure by moving test to its own package.

(The assertion depends on a per-package gensym counter whose
value varies based on what else is in the package.)

LGTM=khr
R=khr, rsc
CC=golang-codereviews
https://codereview.appspot.com/169930043
gc: abort if given an unknown debug (-d) flag

The check for unknown command line debug flags in gc was
incorrect: the loop over debugtab terminates when it reaches a
nil entry, but it was only reporting an error if the parser
had passed the last entry of debugtab (which it never did).
Fix this by reporting the usage error if the loop reaches a
nil entry.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/166110043
test: comment out failing cases from sinit.go

One failing case this removes is:

var bytes = []byte("hello, world")
var copy_bytes = bytes

We could handle this in the compiler, but it requires special
case for a variable that is initialized to the value of a
variable that is initialized to a string literal converted to
[]byte.  This seems an unlikely case--it never occurs in the
standrd library--and it seems unnecessary to write the code to
handle it.

If we do want to support this case, one approach is
https://codereview.appspot.com/171840043.

The other failing cases are of the form

var bx bool
var copy_bx = bx

The compiler used to initialize copy_bx to false.  However,
that led to issue 7665, since bx may be initialized in non-Go
code.  The compiler no longer assumes that bx must be false,
so copy_bx can not be statically initialized.

We can fix these with https://codereview.appspot.com/169040043
if we also pass -complete to the compiler as part of this
test.  This is OK but it's too late in the release cycle.

Fixes issue 8746.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/165400043
5g: don't generate reg variables for direct-called functions

The test intended to skip direct calls when creating
registerization variables was testing p->to.type instead of
p->to.name, so it always failed, causing regopt to create
unnecessary variables for these names.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/169110043
bufio: don't loop generating empty tokens

The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes issue 9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/169970043
doc/go1.4.html: document new subrepo import paths

LGTM=r, adg
R=adg, r, 0xjnml, dr.volker.dobler
CC=golang-codereviews
https://codereview.appspot.com/166980044