]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agocmd/addr2line: accept optional "0x" prefix for addresses.
Shenghou Ma [Sat, 10 May 2014 17:35:40 +0000 (13:35 -0400)]
cmd/addr2line: accept optional "0x" prefix for addresses.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/91250043

11 years agoundo CL 100330043 / e4248ed0037c
Brad Fitzpatrick [Sat, 10 May 2014 00:31:35 +0000 (17:31 -0700)]
undo CL 100330043 / e4248ed0037c

<enter reason for undo>

««« original CL description
runtime/race: fix the link for the race detector.

LGTM=bradfitz
R=golang-dev, bradfitz
CC=golang-codereviews
https://golang.org/cl/100330043

»»»

TBR=minux
R=minux.ma
CC=golang-codereviews
https://golang.org/cl/96200044

11 years agoruntime/race: fix the link for the race detector.
Bill Neubauer [Fri, 9 May 2014 23:33:23 +0000 (16:33 -0700)]
runtime/race: fix the link for the race detector.

LGTM=bradfitz
R=golang-dev, bradfitz
CC=golang-codereviews
https://golang.org/cl/100330043

11 years agoruntime: be a lot more lenient on smhasher avalanche test.
Keith Randall [Fri, 9 May 2014 22:50:57 +0000 (15:50 -0700)]
runtime: be a lot more lenient on smhasher avalanche test.

Fixes #7943

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98170043

11 years agonet/url: correct documentation of Values.Add
Ian Lance Taylor [Fri, 9 May 2014 22:49:21 +0000 (15:49 -0700)]
net/url: correct documentation of Values.Add

Fixes #7816.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98160043

11 years agobytes: fix typos
Rui Ueyama [Fri, 9 May 2014 22:13:42 +0000 (07:13 +0900)]
bytes: fix typos

LGTM=mikioh.mikioh
R=golang-codereviews, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/94240045

11 years agotest/bench/shootout: support windows
ChaiShushan [Fri, 9 May 2014 21:34:50 +0000 (14:34 -0700)]
test/bench/shootout: support windows

1. fix executable extension (a.out -> a.exe).
2. fix pthread build error on mingw
3. if depends lib messing, skip the test

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/100210043

11 years agoencoding/binary: document that Read requires exported struct fields
Ian Lance Taylor [Fri, 9 May 2014 21:19:21 +0000 (14:19 -0700)]
encoding/binary: document that Read requires exported struct fields

Add a test for the current behaviour.

Fixes #7482.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/95160043

11 years agocmd/go: accept build flags in clean and list
Russ Cox [Fri, 9 May 2014 20:32:38 +0000 (16:32 -0400)]
cmd/go: accept build flags in clean and list

list has been adding them one at a time haphazardly
(race and tags were there and documented; compiler
was there and undocumented).

clean -i needs -compiler in order to clean the
installed targets for alternate compilers.

Fixes #7302.

While we're here, tweak the language in the 'go get' docs
about build flags.

Fixes #7807.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/99130043

11 years agomath/cmplx: specify which square root Sqrt returns
Russ Cox [Fri, 9 May 2014 20:04:03 +0000 (16:04 -0400)]
math/cmplx: specify which square root Sqrt returns

Fixes #7851.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/93200043

11 years agocmd/gc: disable link-time copying of un-Go-initialized globals
Russ Cox [Fri, 9 May 2014 20:03:44 +0000 (16:03 -0400)]
cmd/gc: disable link-time copying of un-Go-initialized globals

If you write:

        var x = 3

then the compiler arranges for x to be initialized in the linker
with an actual 3 from the data segment, rather than putting
x in the bss and emitting init-time "x = 3" assignment code.

If you write:

        var y = x
        var x = 3

then the compiler is clever and treats this the same as if
the code said 'y = 3': they both end up in the data segment
with no init-time assignments.

If you write

        var y = x
        var x int

then the compiler was treating this the same as if the
code said 'x = 0', making both x and y zero and avoiding
any init-time assignment.

This copying optimization to avoid init-time assignment of y
is incorrect if 'var x int' doesn't mean 'x = 0' but instead means
'x is initialized in C or assembly code'. The program ends up
with 'y = 0' instead of 'y = the value specified for x in that other code'.

Disable the propagation if there is no initializer for x.

This comes up in some uses of cgo, because cgo generates
Go globals that are initialized in accompanying C files.

Fixes #7665.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/93200044

11 years agocrypto/aes: fix overrun in assembly encrypt/decrypt
Russ Cox [Fri, 9 May 2014 19:40:55 +0000 (15:40 -0400)]
crypto/aes: fix overrun in assembly encrypt/decrypt

Fixes #7928.

LGTM=bradfitz
R=golang-codereviews
CC=agl, bradfitz, golang-codereviews
https://golang.org/cl/91320043

11 years agocmd/gc: fix ... escape analysis bug
Russ Cox [Fri, 9 May 2014 19:40:45 +0000 (15:40 -0400)]
cmd/gc: fix ... escape analysis bug

If the ... element type contained no pointers,
then the escape analysis did not track the ... itself.
This manifested in an escaping ...byte being treated
as non-escaping.

Fixes #7934.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/100310043

11 years agocmd/gc: don't give credit for NOPs during register allocation
Josh Bleecher Snyder [Fri, 9 May 2014 16:55:17 +0000 (09:55 -0700)]
cmd/gc: don't give credit for NOPs during register allocation

The register allocator decides which variables should be placed into registers by charging for each load/store and crediting for each use, and then selecting an allocation with minimal cost. NOPs will be eliminated, however, so using a variable in a NOP should not generate credit.

Issue 7867 arises from attempted registerization of multi-word variables because they are used in NOPs. By not crediting for that use, they will no longer be considered for registerization.

This fix could theoretically lead to better register allocation, but NOPs are rare relative to other instructions.

Fixes #7867.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/94810044

11 years agocmd/go: mark regexp as dependency of testmain
Robert Hencke [Fri, 9 May 2014 16:19:00 +0000 (12:19 -0400)]
cmd/go: mark regexp as dependency of testmain

Fixes #6844.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/97840043

11 years agotesting: write profiles on failure
Russ Cox [Fri, 9 May 2014 16:18:50 +0000 (12:18 -0400)]
testing: write profiles on failure

Fixes #7901.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/90930044

11 years agonet: drop flakey TestDialFailPDLeak
Mikio Hara [Fri, 9 May 2014 00:38:29 +0000 (09:38 +0900)]
net: drop flakey TestDialFailPDLeak

TestDialFailPDLeak was created for testing runtime-integrated netwrok
poller stuff and used during Go 1.2 development cycle. Unfortunately
it's still flakey because it depends on MemStats of runtime, not
pollcache directly, and MemStats accounts and revises its own stats
occasionally.

For now the codepaths related to runtime-intergrated network poller
are pretty stable, so removing this test case never suffers us.

Fixes #6553.

LGTM=josharian, iant
R=iant, josharian
CC=golang-codereviews
https://golang.org/cl/98080043

11 years agoruntime: write memory profile statistics to the heap dump.
Keith Randall [Thu, 8 May 2014 15:35:49 +0000 (08:35 -0700)]
runtime: write memory profile statistics to the heap dump.

LGTM=rsc
R=rsc, khr
CC=golang-codereviews
https://golang.org/cl/97010043

11 years agoencoding/json: add example for Indent, clarify the docs.
Stephen McQuay [Thu, 8 May 2014 06:52:36 +0000 (16:52 +1000)]
encoding/json: add example for Indent, clarify the docs.

There was confusion in the behavior of json.Indent; This change
attempts to clarify the behavior by providing a bit more verbiage
to the documentation as well as provide an example function.

Fixes #7821.

LGTM=robert.hencke, adg
R=golang-codereviews, minux.ma, bradfitz, aram, robert.hencke, r, adg
CC=golang-codereviews
https://golang.org/cl/97840044

11 years agocmd/objdump: actually accept hex address without "0x" prefix.
Shenghou Ma [Thu, 8 May 2014 05:25:56 +0000 (01:25 -0400)]
cmd/objdump: actually accept hex address without "0x" prefix.
Fixes #7936.

LGTM=alex.brainman, bradfitz, iant
R=golang-codereviews, alex.brainman, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/100060043

11 years agodoc/install.html: update wrt to OS and compiler support.
Shenghou Ma [Thu, 8 May 2014 05:25:28 +0000 (01:25 -0400)]
doc/install.html: update wrt to OS and compiler support.
Update #7188
Fixes #7894.

LGTM=alex.brainman, bradfitz, r
R=golang-codereviews, alex.brainman, mikioh.mikioh, gobot, r, bradfitz
CC=golang-codereviews
https://golang.org/cl/95870043

11 years agoruntime: use duff zero and copy to initialize memory
Keith Randall [Wed, 7 May 2014 20:17:10 +0000 (13:17 -0700)]
runtime: use duff zero and copy to initialize memory

benchmark                 old ns/op     new ns/op     delta
BenchmarkCopyFat512       1307          329           -74.83%
BenchmarkCopyFat256       666           169           -74.62%
BenchmarkCopyFat1024      2617          671           -74.36%
BenchmarkCopyFat128       343           89.0          -74.05%
BenchmarkCopyFat64        182           48.9          -73.13%
BenchmarkCopyFat32        103           28.8          -72.04%
BenchmarkClearFat128      102           46.6          -54.31%
BenchmarkClearFat512      344           167           -51.45%
BenchmarkClearFat64       50.5          26.5          -47.52%
BenchmarkClearFat256      147           87.2          -40.68%
BenchmarkClearFat32       22.7          16.4          -27.75%
BenchmarkClearFat1024     511           662           +29.55%

Fixes #7624

LGTM=rsc
R=golang-codereviews, khr, bradfitz, josharian, dave, rsc
CC=golang-codereviews
https://golang.org/cl/92760044

11 years agodatabase/sql: fix accounting of open connections
Brad Fitzpatrick [Wed, 7 May 2014 18:54:29 +0000 (11:54 -0700)]
database/sql: fix accounting of open connections

Existing test TestMaxOpenConns was failing occasionally, especially
with higher values of GOMAXPROCS.

Fixes #7532

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/95130043

11 years agospec: several clarifications to language on channels
Robert Griesemer [Wed, 7 May 2014 17:40:39 +0000 (10:40 -0700)]
spec: several clarifications to language on channels

- A channel may be used between any number of goroutines,
  not just two.
- Replace "passing a value" (which is not further defined)
  by "sending and receiving a value".
- Made syntax production more symmetric.
- Talk about unbuffered channels before buffered channels.
- Clarify what the comma,ok receive values mean (issue 7785).

Not a language change.

Fixes #7785.

LGTM=rsc, r, iant
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/94030045

11 years agospec: remove evaluation order inconsistency
Robert Griesemer [Wed, 7 May 2014 15:50:52 +0000 (08:50 -0700)]
spec: remove evaluation order inconsistency

This is a clarification of what happens already.
Not a language change.

Fixes #7137.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/96000044

11 years agospec: clarify type properties
Robert Griesemer [Wed, 7 May 2014 15:42:08 +0000 (08:42 -0700)]
spec: clarify type properties

If the underlying type of a type T is a boolean, numeric,
or string type, then T is also a boolean, numeric, or
string type, respectively.

Not a language change.

Fixes #7551.

LGTM=iant, rsc, robert.hencke, r
R=r, rsc, iant, ken, robert.hencke
CC=golang-codereviews
https://golang.org/cl/100130044

11 years agoruntime: optimize markspan
Dmitriy Vyukov [Wed, 7 May 2014 15:32:34 +0000 (19:32 +0400)]
runtime: optimize markspan
Increases throughput by 2x on a memory hungry program on 8-node NUMA machine.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/100230043

11 years agodoc: replace absolute links to golang.org with relative links
Dmitriy Vyukov [Wed, 7 May 2014 14:49:13 +0000 (18:49 +0400)]
doc: replace absolute links to golang.org with relative links
Currently tip.golang.org leads to golang.org and
local godoc also leads to golang.org (when you don't have internet connectivity).

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/100200043

11 years agoruntime: fix bug in cpu profiler
Dmitriy Vyukov [Wed, 7 May 2014 14:48:14 +0000 (18:48 +0400)]
runtime: fix bug in cpu profiler
Number of lost samples was overcounted (never reset).
Also remove unused variable (it's trivial to restore it for debugging if needed).

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, rsc
https://golang.org/cl/96060043

11 years agonet/mail: propagate unsupported charset error
David Crawshaw [Wed, 7 May 2014 09:58:36 +0000 (05:58 -0400)]
net/mail: propagate unsupported charset error

Fixes #6807.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/95060043

11 years agorace.bash,race.bat: unset GOROOT_FINAL during tests
Alex Brainman [Wed, 7 May 2014 06:34:21 +0000 (16:34 +1000)]
race.bash,race.bat: unset GOROOT_FINAL during tests

Just like run.* scripts do.
Fixes race build.

LGTM=dave, dvyukov
R=dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/98980043

11 years agoC: Patrick Riley (Google CLA)
Nigel Tao [Wed, 7 May 2014 02:08:46 +0000 (22:08 -0400)]
C: Patrick Riley (Google CLA)

LGTM=iant
R=dsymonds, iant
CC=golang-codereviews, pfr
https://golang.org/cl/98970045

11 years agocmd/addr2line: skip broken TestAddr2Line on plan9 (fixes build)
Alex Brainman [Wed, 7 May 2014 01:58:25 +0000 (11:58 +1000)]
cmd/addr2line: skip broken TestAddr2Line on plan9 (fixes build)

Update #7947

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/100180043

11 years agodoc/go1.3.html: mention go build -i
David Crawshaw [Wed, 7 May 2014 01:10:36 +0000 (21:10 -0400)]
doc/go1.3.html: mention go build -i

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/95010049

11 years agocmd/addr2line: works with windows pe executables now
Alex Brainman [Wed, 7 May 2014 00:16:55 +0000 (10:16 +1000)]
cmd/addr2line: works with windows pe executables now

Update #7406
Fixes #7899

LGTM=bradfitz
R=golang-codereviews, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/96960043

11 years agocmd/go: add go build -i
David Crawshaw [Tue, 6 May 2014 13:12:15 +0000 (09:12 -0400)]
cmd/go: add go build -i

Fixes #7071.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/93770044

11 years agotest: add test that gccgo compiled incorrectly
Ian Lance Taylor [Tue, 6 May 2014 13:01:38 +0000 (09:01 -0400)]
test: add test that gccgo compiled incorrectly

LGTM=minux.ma
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/94100045

11 years agocmd/ld: correct pe section number in symbol table
Alex Brainman [Tue, 6 May 2014 01:40:43 +0000 (11:40 +1000)]
cmd/ld: correct pe section number in symbol table

Update #7899

LGTM=iant
R=golang-codereviews, rsc, iant
CC=golang-codereviews
https://golang.org/cl/97920044

11 years agosyscall: add missing TIOCGSID for openbsd/386
Mikio Hara [Mon, 5 May 2014 22:22:10 +0000 (07:22 +0900)]
syscall: add missing TIOCGSID for openbsd/386

The previous syscall constants regeneration on openbsd was conducted
with OpenBSD current 3 months ago and it missed updating openbsd/386.
This CL adds TIOCGSID for fixing the inconsistency between opensbd/amd64
and openbsd/386.

Update #7049

LGTM=iant
R=jsing, rsc, iant
CC=golang-codereviews
https://golang.org/cl/96960044

11 years agodoc: refer to wiki page for downloads
Andrew Gerrand [Mon, 5 May 2014 21:31:26 +0000 (14:31 -0700)]
doc: refer to wiki page for downloads

We will serve downloads from here until we work out a better plan.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/95980044

11 years agoC: Sean Burford (Google CLA)
Adam Langley [Mon, 5 May 2014 18:34:03 +0000 (11:34 -0700)]
C: Sean Burford (Google CLA)

R=gobot
CC=golang-codereviews
https://golang.org/cl/97070043

11 years agotag go1.2.2
Andrew Gerrand [Mon, 5 May 2014 17:45:56 +0000 (10:45 -0700)]
tag go1.2.2

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/96000043

11 years agodoc: document go1.2.2
Andrew Gerrand [Mon, 5 May 2014 16:56:26 +0000 (09:56 -0700)]
doc: document go1.2.2

R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/100110043

11 years ago archive/zip: Document ModTime is always UTC
Tyler Bunnell [Mon, 5 May 2014 03:00:47 +0000 (23:00 -0400)]
  archive/zip: Document ModTime is always UTC

Fixes #7592

LGTM=robert.hencke, adg
R=golang-codereviews, robert.hencke, gobot, adg
CC=golang-codereviews
https://golang.org/cl/90810043

11 years agostd lib: fix various typos in comments
Robert Griesemer [Fri, 2 May 2014 20:17:55 +0000 (13:17 -0700)]
std lib: fix various typos in comments

Where the spelling changed from British to
US norm (e.g., optimise -> optimize) it follows
the style in that file.

LGTM=adonovan
R=golang-codereviews, adonovan
CC=golang-codereviews
https://golang.org/cl/96980043

11 years agoA+C: David Calavera (individual CLA)
Adam Langley [Fri, 2 May 2014 17:54:50 +0000 (10:54 -0700)]
A+C: David Calavera (individual CLA)

Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/90970048

11 years agoruntime: fix bug in GOTRACEBACK=crash causing suppression of core dumps.
Alan Donovan [Fri, 2 May 2014 17:06:58 +0000 (13:06 -0400)]
runtime: fix bug in GOTRACEBACK=crash causing suppression of core dumps.

Because gotraceback is called early and often, its cache commits to the value of getenv("GOTRACEBACK") before getenv is even ready.  So now we reset its cache once getenv becomes ready.  Panicking programs now dump core again.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/97800045

11 years agoruntime: do not set m->locks around memory allocation
Dmitriy Vyukov [Fri, 2 May 2014 16:39:25 +0000 (17:39 +0100)]
runtime: do not set m->locks around memory allocation
If slice append is the only place where a program allocates,
then it will consume all available memory w/o triggering GC.
This was demonstrated in the issue.
Fixes #7922.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, iant, khr
https://golang.org/cl/91010048

11 years agoruntime: make MemStats.LastGC Unix time again
Dmitriy Vyukov [Fri, 2 May 2014 16:32:42 +0000 (17:32 +0100)]
runtime: make MemStats.LastGC Unix time again
The monotonic clock patch changed all runtime times
to abstract monotonic time. As the result user-visible
MemStats.LastGC become monotonic time as well.
Restore Unix time for LastGC.

This is the simplest way to expose time.now to runtime that I found.
Another option would be to change time.now to C called
int64 runtime.unixnanotime() and then express time.now in terms of it.
But this would require to introduce 2 64-bit divisions into time.now.
Another option would be to change time.now to C called
void runtime.unixnanotime1(struct {int64 sec, int32 nsec} *now)
and then express both time.now and runtime.unixnanotime in terms of it.

Fixes #7852.

LGTM=minux.ma, iant
R=minux.ma, rsc, iant
CC=golang-codereviews
https://golang.org/cl/93720045

11 years agoos: cut limited read to 1 GB
Russ Cox [Fri, 2 May 2014 16:12:40 +0000 (12:12 -0400)]
os: cut limited read to 1 GB

If systems actually read that much, using 2GB-1 will
result in misaligned subsequent reads. Use 1GB instead,
which will certainly keep reads aligned and which is
plenty large enough.

Update #7812.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/94070044

11 years agohtml: fix small typo
Robert Hencke [Thu, 1 May 2014 20:29:34 +0000 (16:29 -0400)]
html: fix small typo

LGTM=dsymonds, adg, crawshaw, r, bradfitz, campoy, nigeltao, sameer, iant, robsc, djd, michael.j.fromberger, gmlewis, adonovan, rsc
R=golang-codereviews, dsymonds, adg, crawshaw, r, nigeltao, sameer, iant, robsc, djd, michael.j.fromberger, gmlewis, adonovan, rsc
CC=golang-codereviews
https://golang.org/cl/98880043

11 years agogo/build: add go1.3 release tag
Brad Fitzpatrick [Thu, 1 May 2014 16:16:03 +0000 (12:16 -0400)]
go/build: add go1.3 release tag

Fixes #7918

LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/91980043

11 years agocmd/dist: permit go* tag in main branch when it includes "beta"
Andrew Gerrand [Thu, 1 May 2014 16:13:32 +0000 (12:13 -0400)]
cmd/dist: permit go* tag in main branch when it includes "beta"

This change allows us to give an hg tag such as "go1.3beta1" to
revisions in the main branch without breaking the build.

This is helpful for community members who want to build the beta
from source.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/90190044

11 years agoruntime: correctly type interface data.
Keith Randall [Thu, 1 May 2014 13:37:55 +0000 (09:37 -0400)]
runtime: correctly type interface data.

The backing memory for >1 word interfaces was being scanned
conservatively.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/94000043

11 years agocmd/go: test: clean up all temporary directories
Michael Fraenkel [Wed, 30 Apr 2014 17:03:38 +0000 (13:03 -0400)]
cmd/go: test: clean up all temporary directories

go test may call builder.init() multiple times which will create a new work directory.  The cleanup needs to hoist the current work directory.
Fixes #7904.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/95900044

11 years agoA+C: Michael Fraenkel (individual CLA)
Ian Lance Taylor [Wed, 30 Apr 2014 16:59:33 +0000 (09:59 -0700)]
A+C: Michael Fraenkel (individual CLA)

Generated by addca.

R=gobot
CC=golang-codereviews
https://golang.org/cl/90950044

11 years agotime: MeST is a time zone name
Rui Ueyama [Wed, 30 Apr 2014 15:30:36 +0000 (11:30 -0400)]
time: MeST is a time zone name

Not only ChST but also MeST (America/Metlakatla) is a zone
name containing a lower case letter.

LGTM=robert.hencke, r
R=golang-codereviews, robert.hencke, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/99910043

11 years agonet: enable builtin dns resolver tests on solaris
Mikio Hara [Wed, 30 Apr 2014 14:26:07 +0000 (23:26 +0900)]
net: enable builtin dns resolver tests on solaris

LGTM=aram
R=golang-codereviews, aram
CC=golang-codereviews
https://golang.org/cl/99890045

11 years agolib/time: update time zone info to v.2014b
Robert Hencke [Wed, 30 Apr 2014 01:41:54 +0000 (21:41 -0400)]
lib/time: update time zone info to v.2014b

Fixes #7412.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/92850043

11 years agodoc/go1.3.html: update for FreeBSD/ARM support.
Shenghou Ma [Tue, 29 Apr 2014 19:54:37 +0000 (15:54 -0400)]
doc/go1.3.html: update for FreeBSD/ARM support.
FreeBSD 10 is fully supported.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=dave, golang-codereviews
https://golang.org/cl/99810044

11 years agorun.bash: skip -static cgo test if -static linking isn't possible.
Shenghou Ma [Tue, 29 Apr 2014 18:43:10 +0000 (14:43 -0400)]
run.bash: skip -static cgo test if -static linking isn't possible.
Some system doesn't have libc.a available.

While we're at here, also export GOROOT in run.bash, so that
one doesn't need to set GOROOT to run run.bash.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/99870043

11 years agoall: spelling tweaks, A-G
Robert Hencke [Tue, 29 Apr 2014 16:44:40 +0000 (12:44 -0400)]
all: spelling tweaks, A-G

LGTM=ruiu, bradfitz
R=golang-codereviews, bradfitz, ruiu
CC=golang-codereviews
https://golang.org/cl/91840044

11 years agocmd/cgo: for gccgo add #define to cgo_export.h for expected name
Ian Lance Taylor [Tue, 29 Apr 2014 12:53:38 +0000 (08:53 -0400)]
cmd/cgo: for gccgo add #define to cgo_export.h for expected name

For gccgo we rename exported functions so that the compiler
will make them visible.  This CL adds a #define so that C
functions that #include "cgo_export.h" can use the expected
names of the function.

The test for this is the existing issue6833 test in
misc/cgo/test.  Without this CL it fails when using
-compiler=gccgo.

LGTM=minux.ma, rsc
R=golang-codereviews, gobot, rsc, minux.ma
CC=golang-codereviews
https://golang.org/cl/91830046

11 years agomake.bash: if CC is not set, and gcc doesn't exist, try clang/clang++.
Shenghou Ma [Tue, 29 Apr 2014 04:32:16 +0000 (00:32 -0400)]
make.bash: if CC is not set, and gcc doesn't exist, try clang/clang++.
This should make Go build without setting CC and CXX on newer FreeBSDs.

LGTM=iant
R=golang-codereviews, dave, gobot, iant
CC=golang-codereviews
https://golang.org/cl/89230045

11 years agonet: make WriteTo, WriteToIP and WriteMsgIP fail when IPConn is already connected
Mikio Hara [Tue, 29 Apr 2014 03:37:16 +0000 (12:37 +0900)]
net: make WriteTo, WriteToIP and WriteMsgIP fail when IPConn is already connected

This CL tries to fill the gap between Linux and other Unix-like systems
in the same way UDPConn and UnixConn already did.

Fixes #7887.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/97810043

11 years agolog/syslog: document if network=="" for Dial, it will connect to local syslog server.
Shenghou Ma [Mon, 28 Apr 2014 18:29:45 +0000 (14:29 -0400)]
log/syslog: document if network=="" for Dial, it will connect to local syslog server.
Fixes #7828.

LGTM=robert.hencke, iant, bradfitz
R=golang-codereviews, robert.hencke, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/97780045

11 years agomisc/vim/readme.txt: workaround weird OS X vim bug.
Shenghou Ma [Mon, 28 Apr 2014 18:24:14 +0000 (14:24 -0400)]
misc/vim/readme.txt: workaround weird OS X vim bug.
The vi bundled with OS X has a weird bug in that if you turn off
filetype in .vimrc when it's not turned on, even a clean exit of
vi will return 1 which breaks almost everything.

While we're at it, add hint to change $GOROOT to its actual value
in .vimrc.

Fixes #7865.

LGTM=robert.hencke, dsymonds
R=golang-codereviews, robert.hencke, gobot, dsymonds
CC=golang-codereviews
https://golang.org/cl/96800046

11 years agoruntime: clean up scanning of Gs
Keith Randall [Mon, 28 Apr 2014 16:47:09 +0000 (12:47 -0400)]
runtime: clean up scanning of Gs

Use a real type for Gs instead of scanning them conservatively.
Zero the schedlink pointer when it is dead.

Update #7820

LGTM=rsc
R=rsc, dvyukov
CC=golang-codereviews
https://golang.org/cl/89360043

11 years agoruntime: heapdump - make sure spans are swept before dumping.
Keith Randall [Mon, 28 Apr 2014 16:45:00 +0000 (12:45 -0400)]
runtime: heapdump - make sure spans are swept before dumping.

LGTM=rsc
R=golang-codereviews, adonovan, rsc
CC=golang-codereviews
https://golang.org/cl/90440043

11 years agodoc: fix link to Mercurial download
Robert Hencke [Mon, 28 Apr 2014 13:59:27 +0000 (06:59 -0700)]
doc: fix link to Mercurial download

Oddly, 404s with the trailing slash.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/90790045

11 years agodoc: fix broken link to RTEMS Go wiki page
Robert Hencke [Mon, 28 Apr 2014 13:27:22 +0000 (06:27 -0700)]
doc: fix broken link to RTEMS Go wiki page

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98740046

11 years agosyscall: don't display syscall prototype lines on godoc
Mikio Hara [Mon, 28 Apr 2014 04:38:23 +0000 (13:38 +0900)]
syscall: don't display syscall prototype lines on godoc

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/90810045

11 years agosyscall: add missing SendmsgN for NaCl
Mikio Hara [Mon, 28 Apr 2014 02:34:52 +0000 (11:34 +0900)]
syscall: add missing SendmsgN for NaCl

Update #7645

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98790044

11 years agonet/tcp: fix check for openbsd in test
Robert Hencke [Mon, 28 Apr 2014 00:39:13 +0000 (17:39 -0700)]
net/tcp: fix check for openbsd in test

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/98740045

11 years agodoc: fix an article
Brad Fitzpatrick [Sun, 27 Apr 2014 14:40:48 +0000 (07:40 -0700)]
doc: fix an article

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/91770050

11 years agosyscall: fix handling socket control messages on dragonfly
Mikio Hara [Sun, 27 Apr 2014 13:28:41 +0000 (22:28 +0900)]
syscall: fix handling socket control messages on dragonfly

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/91860043

11 years agomisc/cgo/test/backdoor: add gccgo version of backdoor function
Ian Lance Taylor [Sun, 27 Apr 2014 05:31:32 +0000 (22:31 -0700)]
misc/cgo/test/backdoor: add gccgo version of backdoor function

For the gc compiler the Go function Issue7695 is defined in
runtime.c, but there is no way to do that for gccgo, because
there is no way to get the correct pkgpath.  The test is not
important for gccgo in any case.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/93870044

11 years agocmd/cgo: fix C.CString for strings containing null terminators under gccgo
Peter Collingbourne [Sun, 27 Apr 2014 05:16:38 +0000 (22:16 -0700)]
cmd/cgo: fix C.CString for strings containing null terminators under gccgo

Previously we used strndup(3) to implement C.CString for gccgo. This
is wrong because strndup assumes the string to be null terminated,
and stops at the first null terminator. Instead, use malloc
and memmove to create a copy of the string, as we do in the
gc implementation.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/96790047

11 years agonet/http/httputil: tell people not to use ClientConn and ServerConn
Brad Fitzpatrick [Sun, 27 Apr 2014 05:14:39 +0000 (22:14 -0700)]
net/http/httputil: tell people not to use ClientConn and ServerConn

A very smart developer at Gophercon just asked me to help debug
a problem and I was horrified to learn that he was using httputil's
ClientConn. I forgot ClientConn and ServerConn were even included
in Go 1! They should've been deleted.

Scare people away from using them. The net/http package does
not use them and they're unused, unmaintained and untouched in
4+ years.

LGTM=r
R=r, adg
CC=golang-codereviews
https://golang.org/cl/92790043

11 years agonet: Remove an unmatched unlock of ForkLock
Robert Obryk [Sun, 27 Apr 2014 02:59:00 +0000 (19:59 -0700)]
net: Remove an unmatched unlock of ForkLock

Remove an RUnlock of syscall.ForkLock with no matching RLock.
Holding ForkLock in netFD.dup is unnecessary: dupCloseOnExecOld
locks and unlocks the lock on its own and dupCloseOnExec doesn't
need the ForkLock to be held.

LGTM=iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/99800044

11 years agoencoding/ascii85: handle non-data bytes correctly
Rui Ueyama [Sun, 27 Apr 2014 02:56:06 +0000 (19:56 -0700)]
encoding/ascii85: handle non-data bytes correctly

Previously Read wouldn't return once its internal input buffer
is filled with non-data bytes.
Fixes #7875.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/90820043

11 years agosrc: fix issues found by go vet std
Robert Hencke [Sun, 27 Apr 2014 02:54:48 +0000 (19:54 -0700)]
src: fix issues found by go vet std

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/96850043

11 years agoos: cap reads and writes to 2GB on Darwin and FreeBSD
Brad Fitzpatrick [Sat, 26 Apr 2014 17:34:33 +0000 (10:34 -0700)]
os: cap reads and writes to 2GB on Darwin and FreeBSD

Fixes #7812

LGTM=josharian, iant
R=rsc, iant, adg, ruiu, minux.ma, josharian
CC=golang-codereviews
https://golang.org/cl/89900044

11 years ago encoding/gob: handle interface types in isZero() by returning true for nil...
Jonathan Allie [Sat, 26 Apr 2014 16:25:16 +0000 (10:25 -0600)]
  encoding/gob: handle interface types in isZero() by returning true for nil interfaces.

Fixes #7741.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/96830044

11 years agodoc/debugging_with_gdb.html: add introductory disclaimer
Rob Pike [Sat, 26 Apr 2014 16:18:17 +0000 (10:18 -0600)]
doc/debugging_with_gdb.html: add introductory disclaimer
The instructions in this document are useful but not reliable.
Explain the situation up top.

Fixes #7471.

LGTM=josharian, iant
R=golang-codereviews, josharian, iant
CC=golang-codereviews
https://golang.org/cl/96830045

11 years agodoc/contribute.html: link to wiki for more code review information
Robert Hencke [Sat, 26 Apr 2014 03:09:04 +0000 (20:09 -0700)]
doc/contribute.html: link to wiki for more code review information

(from the discussions on CL 89650044)

LGTM=minux.ma, iant
R=iant, minux.ma
CC=golang-codereviews
https://golang.org/cl/97770043

11 years agonet/http/httputil: don't leak goroutines in DumpRequestOut
Brad Fitzpatrick [Fri, 25 Apr 2014 22:19:32 +0000 (15:19 -0700)]
net/http/httputil: don't leak goroutines in DumpRequestOut

Fixes #7869

LGTM=dsymonds
R=golang-codereviews
CC=adg, dsymonds, golang-codereviews, rsc
https://golang.org/cl/91770048

11 years agonet: make WriteMsg{IP,UDP,Unix} return the correct number of bytes transferred
Mikio Hara [Fri, 25 Apr 2014 21:52:37 +0000 (06:52 +0900)]
net: make WriteMsg{IP,UDP,Unix} return the correct number of bytes transferred

Fixes #7645

LGTM=iant, bradfitz
R=iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/90170046

11 years agobufio: make all read functions UnreadByte-friendly
Robert Griesemer [Fri, 25 Apr 2014 15:46:07 +0000 (09:46 -0600)]
bufio: make all read functions UnreadByte-friendly

Fixes #7844.

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/90620045

11 years agonet/http, strings, bytes: fix http race, revert part of Reader behavior change
Brad Fitzpatrick [Fri, 25 Apr 2014 13:44:51 +0000 (06:44 -0700)]
net/http, strings, bytes: fix http race, revert part of Reader behavior change

I fixed this data race regression in two ways: in net/http itself, and also
partially reverting the change from https://golang.org/cl/77580046 .
Previously a Read from a strings.Reader or bytes.Reader returning 0 bytes
would not be a memory write. After 77580046 it was. This reverts that back
in case others depended on that. Also adds tests.

Fixes #7856

LGTM=ruiu, iant
R=iant, ruiu
CC=golang-codereviews, gri
https://golang.org/cl/94740044

11 years agonet: fix confusing typo in comment
Rui Ueyama [Thu, 24 Apr 2014 19:24:22 +0000 (12:24 -0700)]
net: fix confusing typo in comment

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/93750043

11 years agomath/cmpx: change space to tab in the Pow docs for better formatting
Rob Pike [Wed, 23 Apr 2014 04:12:15 +0000 (21:12 -0700)]
math/cmpx: change space to tab in the Pow docs for better formatting
Godoc makes it look better this way; before, it all ran together into nonsense.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/90400045

11 years agoos/exec: deflake a test on Linux
Brad Fitzpatrick [Wed, 23 Apr 2014 00:13:38 +0000 (17:13 -0700)]
os/exec: deflake a test on Linux

Work around buggy(?) Linux /proc filesystem.

Fixes #7808

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews
https://golang.org/cl/90400044

11 years agostrings: fix off-by-one error in test go1.3beta1
Rui Ueyama [Tue, 22 Apr 2014 00:00:27 +0000 (17:00 -0700)]
strings: fix off-by-one error in test

Previously it would panic because of out-of-bound access
if s1 is longer than s2.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/90110043

11 years agomath/big: fix Int.Exp
Robert Griesemer [Mon, 21 Apr 2014 22:54:51 +0000 (15:54 -0700)]
math/big: fix Int.Exp

Fixes #7814.

LGTM=agl, adonovan
R=agl, adonovan
CC=golang-codereviews
https://golang.org/cl/90080043

11 years agonet: extend TestVariousDeadlines1Proc timeout
Josh Bleecher Snyder [Mon, 21 Apr 2014 20:07:51 +0000 (13:07 -0700)]
net: extend TestVariousDeadlines1Proc timeout

TestVariousDeadlines1Proc was flaky on my system,
failing on about 5% of runs.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/89830045

11 years agoruntime: fix typo in error message
Mark Zavislak [Mon, 21 Apr 2014 15:55:23 +0000 (08:55 -0700)]
runtime: fix typo in error message

LGTM=robert.hencke, iant
R=golang-codereviews, robert.hencke, iant
CC=golang-codereviews
https://golang.org/cl/89760043

11 years agoruntime/race: add test for issue 7561.
Rémy Oudompheng [Mon, 21 Apr 2014 15:21:09 +0000 (17:21 +0200)]
runtime/race: add test for issue 7561.

LGTM=dvyukov
R=rsc, iant, khr, dvyukov
CC=golang-codereviews
https://golang.org/cl/76520045

11 years agocmd/nm: do not fail TestNM if symbol has less then 3 columns in nm output
Alex Brainman [Mon, 21 Apr 2014 11:12:18 +0000 (21:12 +1000)]
cmd/nm: do not fail TestNM if symbol has less then 3 columns in nm output

Fixes #7829

LGTM=dave
R=golang-codereviews, aram, dave
CC=golang-codereviews
https://golang.org/cl/89830043

11 years agocmd/nm: disable TestNM on darwin, linux and solaris
Alex Brainman [Mon, 21 Apr 2014 10:36:35 +0000 (20:36 +1000)]
cmd/nm: disable TestNM on darwin, linux and solaris

Update #7829

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/89810043