]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agoencoding/json: document that embedded interfaces look like non-embedded ones
Russ Cox [Mon, 6 Oct 2014 19:48:17 +0000 (15:48 -0400)]
encoding/json: document that embedded interfaces look like non-embedded ones

Fixes #8386.

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

10 years agoregexp/syntax: regenerate doc.go from re2 syntax
Russ Cox [Mon, 6 Oct 2014 19:32:11 +0000 (15:32 -0400)]
regexp/syntax: regenerate doc.go from re2 syntax

Generated using re2/doc/mksyntaxgo.

Fixes #8505.

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

10 years agocmd/go: fix 'go vet' of package with external tests
Russ Cox [Mon, 6 Oct 2014 18:49:22 +0000 (14:49 -0400)]
cmd/go: fix 'go vet' of package with external tests

For example, fixes 'go vet syscall', which has source
files in package syscall_test.

Fixes #8511.

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

10 years agoruntime: update docs, code for SetFinalizer
Russ Cox [Mon, 6 Oct 2014 18:18:09 +0000 (14:18 -0400)]
runtime: update docs, code for SetFinalizer

At last minute before 1.3 we relaxed SetFinalizer to avoid
crashes when you pass the result of a global alloc to it.
This avoids the crash but makes SetFinalizer a bit too relaxed.

Document that the finalizer of a global allocation may not run.

Tighten the SetFinalizer check to ignore a global allocation but
not ignore everything else.

Fixes #7656.

LGTM=r, iant
R=golang-codereviews, iant, r
CC=dvyukov, golang-codereviews, khr, rlh
https://golang.org/cl/145930043

10 years agocmd/8l: accept R_386_GOT32 in push instruction
Russ Cox [Mon, 6 Oct 2014 18:17:48 +0000 (14:17 -0400)]
cmd/8l: accept R_386_GOT32 in push instruction

Fixes #8382.

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

10 years agoA+C: Jens Frederich (individual CLA)
Brad Fitzpatrick [Mon, 6 Oct 2014 17:41:24 +0000 (10:41 -0700)]
A+C: Jens Frederich (individual CLA)

Generated by a+c.

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

10 years agonet: disable TestDualStackUDPListener in short mode
Russ Cox [Mon, 6 Oct 2014 17:09:14 +0000 (13:09 -0400)]
net: disable TestDualStackUDPListener in short mode

This test is flaky, just like TestDualStackTCPListener.
That one was disabled. Disable this one too.

Update #5001

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

10 years agosyscall: another attempt to keep windows syscall pointers live
Alex Brainman [Sun, 5 Oct 2014 02:15:13 +0000 (13:15 +1100)]
syscall: another attempt to keep windows syscall pointers live

This approach was suggested in
https://golang.org/cl/138250043/#msg15.
Unlike current version of mksyscall_windows.go,
new code could be used in go.sys and other external
repos without help from asm.

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

10 years agodoc/go1.4: document memory consumption reduction
Dmitriy Vyukov [Sat, 4 Oct 2014 08:02:04 +0000 (12:02 +0400)]
doc/go1.4: document memory consumption reduction

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

10 years agodoc/go1.4.txt: fmt: document printing of &map rather than just pointer
Rob Pike [Sat, 4 Oct 2014 03:30:06 +0000 (20:30 -0700)]
doc/go1.4.txt: fmt: document printing of &map rather than just pointer

CC=golang-codereviews
https://golang.org/cl/152160043

10 years agofmt: print &map like &slice and &struct
Rob Pike [Sat, 4 Oct 2014 03:27:08 +0000 (20:27 -0700)]
fmt: print &map like &slice and &struct
It was inconsistent.
Also test these better.
Also document the default format for types.
This wasn't written down.

Fixes #8470.

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

10 years agodoc/go1.4: mention that we are going to need a new version of SWIG
Ian Lance Taylor [Sat, 4 Oct 2014 01:12:05 +0000 (18:12 -0700)]
doc/go1.4: mention that we are going to need a new version of SWIG

Update #8750

CC=golang-codereviews
https://golang.org/cl/153950044

10 years agocrypto/x509: add OpenELEC system root location.
Dave Cheney [Fri, 3 Oct 2014 22:09:39 +0000 (08:09 +1000)]
crypto/x509: add OpenELEC system root location.

Fixes #8349.

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

10 years agomisc/cgo/test: fail issue 7978 with clearer error when GOTRACEBACK != 2
Russ Cox [Fri, 3 Oct 2014 20:42:18 +0000 (16:42 -0400)]
misc/cgo/test: fail issue 7978 with clearer error when GOTRACEBACK != 2

The test doesn't work with GOTRACEBACK != 2.
Diagnose that failure mode.

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

10 years agofmt: part 2 of the great flag rebuild: make %+v work in formatters
Rob Pike [Fri, 3 Oct 2014 20:23:35 +0000 (13:23 -0700)]
fmt: part 2 of the great flag rebuild: make %+v work in formatters
Apply a similar transformation to %+v that we did to %#v, making it
a top-level setting separate from the + flag itself. This fixes the
appearance of flags in Formatters and cleans up the code too,
probably making it a little faster.

Fixes #8835.

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

10 years agoruntime: clear sg.selectdone before saving in SudoG cache
Russ Cox [Fri, 3 Oct 2014 19:33:29 +0000 (15:33 -0400)]
runtime: clear sg.selectdone before saving in SudoG cache

Removes another dangling pointer that might
cause a memory leak in 1.4 or crash the GC in 1.5.

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

10 years agoruntime: clear stale values from G.param and SudoG.elem
Russ Cox [Fri, 3 Oct 2014 17:36:48 +0000 (13:36 -0400)]
runtime: clear stale values from G.param and SudoG.elem

This change was necessary on the dev.garbage branch
to keep the garbage collector from seeing pointers into
invalid heap areas.

On this default (Go 1.4) branch, the change removes
some possibility for memory leaks.

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

10 years agocmd/cc, runtime: disallow structs without tags
Russ Cox [Fri, 3 Oct 2014 16:44:20 +0000 (12:44 -0400)]
cmd/cc, runtime: disallow structs without tags

Structs without tags have no unique name to use in the
Go definitions generated from the C types.
This caused issue 8812, fixed by CL 149260043.
Avoid future problems by requiring struct tags.

Update runtime as needed.
(There is no other C code in the tree.)

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

10 years agoundo CL 138250043 / 4eda5e4001fd
Alex Brainman [Fri, 3 Oct 2014 00:36:54 +0000 (10:36 +1000)]
undo CL 138250043 / 4eda5e4001fd

I will use different approach to solve this problem.
See CL 143160046 for details.

««« original CL description
syscall: keep Windows syscall pointers live too

Like https://golang.org/cl/139360044

LGTM=rsc, alex.brainman
R=alex.brainman, rsc
CC=golang-codereviews
https://golang.org/cl/138250043
»»»

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

10 years agofmt: make the %#v verb a special flag
Rob Pike [Thu, 2 Oct 2014 21:16:58 +0000 (14:16 -0700)]
fmt: make the %#v verb a special flag
The %#v verb is special: it says all values below need to print as %#v.
However, for some situations the # flag has other meanings and this
causes some issues, particularly in how Formatters work. Since %#v
dominates all formatting, translate it into actual state of the formatter
and decouple it from the # flag itself within the calculations (although
it must be restored when methods are doing the work.)
The result is cleaner code and correct handling of # for Formatters.
TODO: Apply the same thinking to the + flag in a followup CL.

Also, the wasString return value in handleMethods is always false,
so eliminate it.

Update #8835

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

10 years agomath/big: math.Exp should return result >= 0 for |m| > 0
Robert Griesemer [Thu, 2 Oct 2014 20:02:25 +0000 (13:02 -0700)]
math/big: math.Exp should return result >= 0 for |m| > 0

The documentation states that Exp(x, y, m)
computes x**y mod |m| for m != nil && m > 0.
In math.big, Mod is the Euclidean modulus,
which is always >= 0.

Fixes #8822.

LGTM=agl, r, rsc
R=agl, r, rsc
CC=golang-codereviews
https://golang.org/cl/145650043

10 years agoencoding/binary: fix error message
Robert Griesemer [Thu, 2 Oct 2014 19:53:51 +0000 (12:53 -0700)]
encoding/binary: fix error message

In the process, simplified internal sizeOf and
dataSize functions. Minor positive impact on
performance. Added test case.

benchmark                         old ns/op     new ns/op     delta
BenchmarkReadSlice1000Int32s      14006         14122         +0.83%
BenchmarkReadStruct               2508          2447          -2.43%
BenchmarkReadInts                 921           928           +0.76%
BenchmarkWriteInts                2086          2081          -0.24%
BenchmarkWriteSlice1000Int32s     13440         13497         +0.42%
BenchmarkPutUvarint32             28.5          26.3          -7.72%
BenchmarkPutUvarint64             81.3          76.7          -5.66%

benchmark                         old MB/s     new MB/s     speedup
BenchmarkReadSlice1000Int32s      285.58       283.24       0.99x
BenchmarkReadStruct               27.90        28.60        1.03x
BenchmarkReadInts                 32.57        32.31        0.99x
BenchmarkWriteInts                14.38        14.41        1.00x
BenchmarkWriteSlice1000Int32s     297.60       296.36       1.00x
BenchmarkPutUvarint32             140.55       151.92       1.08x
BenchmarkPutUvarint64             98.36        104.33       1.06x

Fixes #6818.

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

10 years agosyscall: support UID/GID map files for Linux user namespaces
Mrunal Patel [Thu, 2 Oct 2014 18:37:06 +0000 (11:37 -0700)]
syscall: support UID/GID map files for Linux user namespaces

Fixes #8447.

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

10 years agoA+C: add Mrunal Patel (Red Hat corporate CLA)
Ian Lance Taylor [Thu, 2 Oct 2014 18:36:39 +0000 (11:36 -0700)]
A+C: add Mrunal Patel (Red Hat corporate CLA)

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

10 years agosyscall: fix Setenv for plan 9
Nicolas Owens [Thu, 2 Oct 2014 08:25:56 +0000 (10:25 +0200)]
syscall: fix Setenv for plan 9

envi needs to be updated during Setenv so the key can be correctly deleted later with Unsetenv.

Update #8849.

LGTM=0intro
R=bradfitz, 0intro
CC=golang-codereviews
https://golang.org/cl/149300046

10 years agorun.bat: comment text properly
Alex Brainman [Thu, 2 Oct 2014 06:15:36 +0000 (16:15 +1000)]
run.bat: comment text properly

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

10 years agotime: A Timer must be properly created before use (documentation).
Robert Griesemer [Wed, 1 Oct 2014 23:44:52 +0000 (16:44 -0700)]
time: A Timer must be properly created before use (documentation).

Fixes #8776.

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

10 years agoencoding/json: don't panic on incorrect map argument
Robert Griesemer [Wed, 1 Oct 2014 23:24:17 +0000 (16:24 -0700)]
encoding/json: don't panic on incorrect map argument

Fixes #8305.

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

10 years agoencoding/binary: slightly better documentation
Robert Griesemer [Wed, 1 Oct 2014 23:09:55 +0000 (16:09 -0700)]
encoding/binary: slightly better documentation

Fixes #7306.

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

10 years agodoc/go_faq.html: explain the policy about unused imports a little better
Rob Pike [Wed, 1 Oct 2014 22:25:56 +0000 (15:25 -0700)]
doc/go_faq.html: explain the policy about unused imports a little better
This new text won't stop the whining but it might focus the whining a little more.

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

10 years agofmt: fix internal unknownType function
Rob Pike [Wed, 1 Oct 2014 21:35:12 +0000 (21:35 +0000)]
fmt: fix internal unknownType function
This thing should never be called, but before
151960044 it was being called, incorrectly.
This is now just a precaution but let's pretend it
Fixes #8843
even though that was fixed by 151960044.
The test case was already there and ran, another mystery.

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

10 years agoreflect: fix IsValid vs Kind mismatch after Elem of nil interface
Russ Cox [Wed, 1 Oct 2014 20:51:32 +0000 (16:51 -0400)]
reflect: fix IsValid vs Kind mismatch after Elem of nil interface

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

10 years agotesting: clearer comment
Robert Griesemer [Wed, 1 Oct 2014 20:19:40 +0000 (13:19 -0700)]
testing: clearer comment

Fixes #8797.

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

10 years agonet/rpc: shut down connection if gob has error
Rob Pike [Wed, 1 Oct 2014 20:18:44 +0000 (13:18 -0700)]
net/rpc: shut down connection if gob has error
The nicest solution would be to buffer the message and only write
it if it encodes correctly, but that adds considerable memory and
CPU overhead for a very rare condition. Instead, we just shut
down the connection if this happens.
Fixes #7689.

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

10 years agoos, syscall: add Unsetenv
Brad Fitzpatrick [Wed, 1 Oct 2014 18:17:15 +0000 (11:17 -0700)]
os, syscall: add Unsetenv

Also address a TODO, making Clearenv pass through to cgo.

Based largely on Minux's earlier https://golang.org/cl/82040044

Fixes #6423

LGTM=iant, alex.brainman, r, rsc
R=rsc, iant, r, alex.brainman
CC=golang-codereviews
https://golang.org/cl/148370043

10 years agotag go1.3.3
Andrew Gerrand [Wed, 1 Oct 2014 03:38:00 +0000 (13:38 +1000)]
tag go1.3.3

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

10 years agomisc/nacl/README: fix typo
Mikio Hara [Wed, 1 Oct 2014 00:16:55 +0000 (09:16 +0900)]
misc/nacl/README: fix typo

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

10 years agodoc: document go1.3.3
Andrew Gerrand [Tue, 30 Sep 2014 22:30:51 +0000 (08:30 +1000)]
doc: document go1.3.3

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

10 years agox509: Fixed ASN.1 encoding in CRL Distribution Points extension
Paul van Brouwershaven [Tue, 30 Sep 2014 20:38:48 +0000 (13:38 -0700)]
x509: Fixed ASN.1 encoding in CRL Distribution Points extension

The ASN.1 encoding of the CRL Distribution Points extension showed an invalid false 'IsCompound' which caused a display problem in the Windows certificate viewer.

LGTM=agl
R=agl
CC=golang-codereviews
https://golang.org/cl/143320043

10 years agocmd/cgo: add missing ast.SliceExpr.Max case to AST traversal.
Alan Donovan [Tue, 30 Sep 2014 20:08:04 +0000 (16:08 -0400)]
cmd/cgo: add missing ast.SliceExpr.Max case to AST traversal.

+ static test

NB: there's a preexisting (dynamic) failure of test issue7978.go.

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

10 years agogo/format, cmd/gofmt: added missing comments, minor internal cleanup
Robert Griesemer [Tue, 30 Sep 2014 19:26:38 +0000 (12:26 -0700)]
go/format, cmd/gofmt: added missing comments, minor internal cleanup

This is a minor cleanup following CL 142360043:

The internal parse and format functions in both packages
were almost identical - made them identical by adding an
extra parameter, and documented them as identical.

Eventually we should find a nice way to factor these functions
out, but we cannot do this now while in prep for 1.4.

No functionality change.

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

10 years agonet/http/httputil: ensure DumpRequestOut dumps all of Body
Brad Fitzpatrick [Tue, 30 Sep 2014 19:09:34 +0000 (12:09 -0700)]
net/http/httputil: ensure DumpRequestOut dumps all of Body

Bodies larger than 8KB (the default bufio reader size) weren't
being dumped.  Force a read of the body so they're teed into
the response buffer.

Thanks to Steven Hartland for identifying the problem.

Fixes #8089

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

10 years agoencoding/asn1: fix unmarshaling of implicitly tagged UTF-8 strings.
Adam Langley [Tue, 30 Sep 2014 18:49:15 +0000 (11:49 -0700)]
encoding/asn1: fix unmarshaling of implicitly tagged UTF-8 strings.

Fixes #8541.

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

10 years agospec: clarify variable declaration type rules
Robert Griesemer [Tue, 30 Sep 2014 18:44:29 +0000 (11:44 -0700)]
spec: clarify variable declaration type rules

Not a language change.

Several inaccuracies were fixed:

1) A variable declaration may declare more than just one
variable.

2) Variable initialization follows the rules of assignments,
including n:1 assignments. The existing wording implied a 1:1
or n:n rule and generally was somewhat unspecific.

3) The rules for variable declarations with no types and
untyped initialization expressions had minor holes (issue 8088).

4) Clarified the special cases of assignments of untyped values
(we don't just have untyped constants, but also untyped bools,
e.g. from comparisons). The new wording is more direct.

To that end, introduced the notion of an untyped constant's
"default type" so that the same concept doesn't have to be
repeatedly introduced.

Fixes #8088.

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

10 years agocmd/go: sometimes name tmp test binary test.test.exe on Windows
Russ Cox [Tue, 30 Sep 2014 18:30:40 +0000 (14:30 -0400)]
cmd/go: sometimes name tmp test binary test.test.exe on Windows

Right now it is always pkgname.test.exe, but if pkgname is
patch or install or setup or update, Windows thinks that
running it will install new software, so it pops up a dialog
box asking for more permission.
Renaming the binary avoids the Windows security check.

This only applies to the binary that the Go command writes
to its temporary work directory. If the user runs 'go test -c'
or any of the other ways to generate a test binary, it will
continue to use pkgname.test.exe.

Fixes #8711.

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

10 years agocmd/pprof: add Go implementation
Russ Cox [Tue, 30 Sep 2014 17:41:54 +0000 (13:41 -0400)]
cmd/pprof: add Go implementation

Update #8798

This is a new implementation of pprof,
written in Go instead of in Perl.
It was written primarily by Raul Silvera and
is in use for profiling programs of all languages
inside Google.

The internal structure is a bit package-heavy,
but it matches the copy used inside Google, and
since it is in an internal directory, we can make
changes to it later if we need to.

The only "new" file here is src/cmd/pprof/pprof.go,
which stitches together the Google pprof and the
Go command libraries for object file access.

I am explicitly NOT interested in style or review
comments on the rest of the files
(that is, src/cmd/pprof/internal/...).
Those are intended to stay as close to the Google
copies as possible, like we did with the pprof Perl script.

Still to do:

- Basic tests.
- Real command documentation.
- Hook up disassemblers.

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

10 years agocmd/gc: fix call order in array literal of slice literal of make chan
Russ Cox [Tue, 30 Sep 2014 16:48:47 +0000 (12:48 -0400)]
cmd/gc: fix call order in array literal of slice literal of make chan

Fixes #8761.

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

10 years agocompress/*: note that NewReader may introduce buffering
Russ Cox [Tue, 30 Sep 2014 16:31:18 +0000 (12:31 -0400)]
compress/*: note that NewReader may introduce buffering

Fixes #8309.

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

10 years agocompress/zlib: mention that NewReaderDict can return ErrDictionary
Russ Cox [Tue, 30 Sep 2014 16:30:31 +0000 (12:30 -0400)]
compress/zlib: mention that NewReaderDict can return ErrDictionary

Fixes #7935.

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

10 years agolog/syslog: try /var/run/log, for FreeBSD
Russ Cox [Tue, 30 Sep 2014 16:30:16 +0000 (12:30 -0400)]
log/syslog: try /var/run/log, for FreeBSD

Fixes #8449.

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

10 years agocmd/objdump: move armasm, x86asm into internal packages
Russ Cox [Tue, 30 Sep 2014 16:28:24 +0000 (12:28 -0400)]
cmd/objdump: move armasm, x86asm into internal packages

For Go 1.3 these external packages were collapsed into
large single-file implementations stored in the cmd/objdump
directory.

For Go 1.4 we want pprof to be able to link against them too,
so move them into cmd/internal, where they can be shared.

The new files are copied from the repo in the file path (rsc.io/...).
Those repos were code reviewed during development
(mainly by crawshaw and minux), because we knew the
main repo would use them.

Update #8798

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

10 years agoCONTRIBUTORS: add Raul Silvera (Google CLA)
Russ Cox [Tue, 30 Sep 2014 16:08:22 +0000 (12:08 -0400)]
CONTRIBUTORS: add Raul Silvera (Google CLA)

Raul wrote the pprof code in CL 153750043.

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

10 years agoregexp/syntax: reject large repetitions created by nesting small ones
Russ Cox [Tue, 30 Sep 2014 16:08:09 +0000 (12:08 -0400)]
regexp/syntax: reject large repetitions created by nesting small ones

Fixes #7609.

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

10 years agoruntime: fix scanning of gc work buffer
Keith Randall [Tue, 30 Sep 2014 15:51:02 +0000 (08:51 -0700)]
runtime: fix scanning of gc work buffer

GC types were not being generated for the garbage collector
work buffer.  The markfor object was being collected as a result.
This broke amd64p32 and maybe plan9 builds.  Why it didn't break
every build I'm not sure...

Fixes #8812

LGTM=0intro, rsc
R=golang-codereviews, dave, khr, 0intro, rsc
CC=golang-codereviews
https://golang.org/cl/149260043

10 years agoruntime: fix throwsplit check
Dmitriy Vyukov [Tue, 30 Sep 2014 15:34:33 +0000 (19:34 +0400)]
runtime: fix throwsplit check
Newstack runs on g0, g0->throwsplit is never set.

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

10 years agoruntime: initialize traceback variables earlier
Keith Randall [Tue, 30 Sep 2014 04:21:36 +0000 (21:21 -0700)]
runtime: initialize traceback variables earlier

Our traceback code needs to know the PC of several special
functions, including goexit, mcall, etc.  Make sure that
these PCs are initialized before any traceback occurs.

Fixes #8766

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

10 years agonet/http: make Transport.CloseIdleConnections also close pending dials
Brad Fitzpatrick [Tue, 30 Sep 2014 01:16:15 +0000 (18:16 -0700)]
net/http: make Transport.CloseIdleConnections also close pending dials

See comment 4 of https://code.google.com/p/go/issues/detail?id=8483#c4:

"So if a user creates a http.Client, issues a bunch of
requests and then wants to shutdown it and all opened connections;
what is she intended to do? The report suggests that just waiting for
all pending requests and calling CloseIdleConnections won't do, as
there can be new racing connections. Obviously she can't do what
you've done in the test, as it uses the unexported function.  If this
happens periodically, it can lead to serious resource leaks (the
transport is also preserved alive).  Am I missing something?"

This CL tracks the user's intention to close all idle
connections (CloseIdleConnections sets it true; and making a
new request sets it false). If a pending dial finishes and
nobody wants it, before it's retained for a future caller, the
"wantIdle" bool is checked and it's closed if the user has
called CloseIdleConnections without a later call to make a new
request.

Fixes #8483

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

10 years agogo/format, cmd/gofmt: fix issues with partial Go code with indent
Dmitri Shuralyov [Tue, 30 Sep 2014 00:04:48 +0000 (17:04 -0700)]
go/format, cmd/gofmt: fix issues with partial Go code with indent

Fixes #5551.
Fixes #4449.

Adds tests for both issues.

Note that the two issues occur only when formatting partial Go code
with indent.

The best way to understand the change is as follows: I took the code
of cmd/gofmt and go/format, combined it into one unified code that
does not suffer from either 4449 nor 5551, and then applied that code
to both cmd/gofmt and go/format.

As a result, there is now much more identical code between the two
packages, making future code deduplication easier (it was not possible
to do that now without adding public APIs, which I was advised not to
do at this time).

More specifically, I took the parse() of cmd/gofmt which correctly
preserves comments (issue 5551) and modified it to fix issue where
it would sometimes modify literal values (issue 4449).

I ended up removing the matchSpace() function because it no longer
needed to do some of its work (insert indent), and a part of its work
had to be done in advance (determining the indentation of first code
line), because that calculation is required for cfg.Fprint() to run.

adjustIndent is used to adjust the indent of cfg.Fprint() to compensate
for the body of wrapper func being indented by one level. This allows
to get rid of the bytes.Replace text manipulation of inner content,
which was problematic and sometimes altered raw string literals (issue
4449). This means that sometimes the value of cfg.Indent is negative,
but that works as expected.

So now the algorithm for formatting partial Go code is:

1. Determine and prepend leading space of original source.
2. Determine and prepend indentation of first code line.
3. Format and write partial Go code (with all of its leading &
   trailing space trimmed).
4. Determine and append trailing space of original source.

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

10 years agoliblink: generate MRC replacement in liblink, not tls_arm
Dave Cheney [Tue, 30 Sep 2014 00:03:10 +0000 (10:03 +1000)]
liblink: generate MRC replacement in liblink, not tls_arm

Fixes #8690.

This CL moves the save of LR around BL runtime.read_tls_fallback to liblink as it is not needed when MRC is not replaced.

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

10 years agox509: add root certs for android.
Tom Linford [Mon, 29 Sep 2014 23:51:49 +0000 (09:51 +1000)]
x509: add root certs for android.

On android, root certificates appear to be stored in the folder
/system/etc/security/cacerts, which has many certs in several
different files. This change adds a new array of directories in
which certs can be found.

To test this, I simply tried making a request with the http
library to an HTTPS URL on an android emulator and manually
verified that it worked.

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

10 years agoA+C: Tom Linford (individual CLA)
Brad Fitzpatrick [Mon, 29 Sep 2014 22:57:03 +0000 (15:57 -0700)]
A+C: Tom Linford (individual CLA)

Generated by a+c.

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

10 years agoruntime: delete unused variables.
Keith Randall [Mon, 29 Sep 2014 21:05:33 +0000 (14:05 -0700)]
runtime: delete unused variables.

We're not comparing with code addresses any more.  Instead,
we use nil algorithm functions to mark uncomparable types.

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

10 years agonet/http: enable Transfer-Encoding: identity without Content-Length for HTTP 1.1.
James Tucker [Mon, 29 Sep 2014 20:53:42 +0000 (13:53 -0700)]
net/http: enable Transfer-Encoding: identity without Content-Length for HTTP 1.1.

Use case is SSE recommended configuration: http://www.w3.org/TR/eventsource/#notes
Removes a TODO.

LGTM=bradfitz
R=golang-codereviews, bradfitz, tommi.virtanen
CC=golang-codereviews
https://golang.org/cl/100000044

10 years agonet/http: clarify Request.FormValue docs
Brad Fitzpatrick [Mon, 29 Sep 2014 20:42:33 +0000 (13:42 -0700)]
net/http: clarify Request.FormValue docs

Fixes #8067

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

10 years agocmd/yacc: fix handling of tokens that don't start with letters
Ian Lance Taylor [Mon, 29 Sep 2014 20:32:14 +0000 (13:32 -0700)]
cmd/yacc: fix handling of tokens that don't start with letters

CL 149110043 changed yacc to no longer keep a leading space
for quoted tokens.  That is OK by itself but unfortunately
yacc was relying on that leading space to notice which tokens
it should not output as const declarations.

Add a few such tokens to expr.y, although it won't make any
immediate difference as we seem to have no tests for yacc.

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

10 years agoundo CL 141840043 / 65e21380cb2a
Brad Fitzpatrick [Mon, 29 Sep 2014 20:28:08 +0000 (13:28 -0700)]
undo CL 141840043 / 65e21380cb2a

Unnecessary; covered by https://golang.org/cl/141690043

Verified by jonathan@titanous.com on golang-dev.

««« original CL description
cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes #8684.

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

»»»

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

10 years agospec: specify variable initialization order explicitly
Robert Griesemer [Mon, 29 Sep 2014 19:44:50 +0000 (12:44 -0700)]
spec: specify variable initialization order explicitly

The existing spec rules on package initialization were
contradictory: They specified that 1) dependent variables
are initialized in dependency order, and 2) independent
variables are initialized in declaration order. This 2nd
rule cannot be satisfied in general. For instance, for

var (
        c = b + 2
        a = 0
        b = 1
)

because of its dependency on b, c must be initialized after b,
leading to the partial order b, c. Because a is independent of
b but is declared before b, we end up with the order: a, b, c.
But a is also independent of c and is declared after c, so the
order b, c, a should also be valid in contradiction to a, b, c.

The new rules are given in form of an algorithm which outlines
initialization order explicitly.

gccgo and go/types already follow these rules.

Fixes #8485.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, gordon.klaus, adonovan
CC=golang-codereviews
https://golang.org/cl/142880043

10 years agocrypto/x509: accept CRLs without an expiry.
Adam Langley [Mon, 29 Sep 2014 19:26:51 +0000 (12:26 -0700)]
crypto/x509: accept CRLs without an expiry.

RFC5280 says that the nextUpdate field is optional.

Fixes #8085.

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

10 years agonet: fix misleading package comment example
Brad Fitzpatrick [Mon, 29 Sep 2014 19:24:06 +0000 (12:24 -0700)]
net: fix misleading package comment example

Fixes #8607

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

10 years agogo/build: add go1.4 tag.
Adam Langley [Mon, 29 Sep 2014 19:23:43 +0000 (12:23 -0700)]
go/build: add go1.4 tag.

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

10 years agoC: add Andres Erbsen (Google CLA)
Adam Langley [Mon, 29 Sep 2014 19:15:25 +0000 (12:15 -0700)]
C: add Andres Erbsen (Google CLA)

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

10 years agocmd/ld: close outfile before cleanup
Jonathan Rudenberg [Mon, 29 Sep 2014 19:13:22 +0000 (12:13 -0700)]
cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes #8684.

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

10 years agoruntime: fix cgo_topofstack to save clobbered registers
Keith Randall [Mon, 29 Sep 2014 06:52:08 +0000 (23:52 -0700)]
runtime: fix cgo_topofstack to save clobbered registers

Fixes #8816

At least, I hope it does.

TBR=rsc
CC=golang-codereviews
https://golang.org/cl/153730043

10 years agocmd/ld: don't automatically mark symbols created by -X as reachable
Ian Lance Taylor [Sun, 28 Sep 2014 15:27:05 +0000 (08:27 -0700)]
cmd/ld: don't automatically mark symbols created by -X as reachable

This fixes the bug in which the linker reports "missing Go
type information" when a -X option refers to a symbol that is
not used.

Fixes #8821.

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

10 years agodoc/faq: update for 1.4
Rob Pike [Sat, 27 Sep 2014 18:56:54 +0000 (11:56 -0700)]
doc/faq: update for 1.4

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

10 years agomath: avoid assumption of denormalized math mode in Sincos
Russ Cox [Fri, 26 Sep 2014 21:13:24 +0000 (17:13 -0400)]
math: avoid assumption of denormalized math mode in Sincos

The extra-clever code in Sincos is trying to do

        if v&2 == 0 {
                mask = 0xffffffffffffffff
        } else {
                mask = 0
        }

It does this by turning v&2 into a float64 X0 and then using

        MOVSD $0.0, X3
        CMPSD X0, X3, 0

That CMPSD is defined to behave like:

        if X0 == X3 {
                X3 = 0xffffffffffffffff
        } else {
                X3 = 0
        }

which gives the desired mask in X3. The goal in using the
CMPSD was to avoid a conditional branch.

This code fails when called from a PortAudio callback.
In particular, the failure behavior is exactly as if the
CMPSD always chose the 'true' execution.

Notice that the comparison X0 == X3 is comparing as
floating point values the 64-bit pattern v&2 and the actual
floating point value zero. The only possible values for v&2
are 0x0000000000000000 (floating point zero)
and 0x0000000000000002 (floating point 1e-323, a denormal).
If they are both comparing equal to zero, I conclude that
in a PortAudio callback (whatever that means), the processor
is running in "denormals are zero" mode.

I confirmed this by placing the processor into that mode
and running the test case in the bug; it produces the
incorrect output reported in the bug.

In general, if a Go program changes the floating point math
modes to something other than what Go expects, the math
library is not going to work exactly as intended, so we might
be justified in not fixing this at all.

However, it seems reasonable that the client code might
have expected "denormals are zero" mode to only affect
actual processing of denormals. This code has produced
what is in effect a gratuitous denormal by being extra clever.
There is nothing about the computation being requested
that fundamentally requires a denormal.

It is also easy to do this computation in integer math instead:

        mask = ((v&2)>>1)-1

Do that.

For the record, the other math tests that fail if you put the
processor in "denormals are zero" mode are the tests for
Frexp, Ilogb, Ldexp, Logb, Log2, and FloatMinMax, but all
fail processing denormal inputs. Sincos was the only function
for which that mode causes incorrect behavior on non-denormal inputs.

The existing tests check that the new assembly is correct.
There is no test for behavior in "denormals are zero" mode,
because I don't want to add assembly to change that.

Fixes #8623.

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

10 years agodoc/go1.4: go test builds + links all test files (CL 150980043)
Russ Cox [Fri, 26 Sep 2014 21:09:40 +0000 (17:09 -0400)]
doc/go1.4: go test builds + links all test files (CL 150980043)

CC=golang-codereviews
https://golang.org/cl/144660043

10 years agocmd/go: always build _test.go files and link into test
Russ Cox [Fri, 26 Sep 2014 21:09:11 +0000 (17:09 -0400)]
cmd/go: always build _test.go files and link into test

go test's handling of _test.go files when the entire
package's set of files has no Test functions has varied
over the past few releases. There are a few interesting
cases (all contain no Test functions):
        (1) x_test.go has syntax errors
        (2) x_test.go has type errors
        (3) x_test.go has runtime errors (say, a func init that panics)

In Go 1.1, tests with (1) or (2) failed; (3) passed.
In Go 1.2, tests with (1) or (2) failed; (3) passed.
In Go 1.3, tests with (1) failed; (2) or (3) passed.
After this CL, tests with (1), (2), or (3) all fail.

This is clearly a corner case, but it seems to me that
the behavior of the test should not change if you
add or remove a line like

        func TestAlwaysPasses(t *testing.T) {}

That implies that the _test.go files must always
be built and always be imported into the test binary.
Doing so means that (1), (2), and (3) must all fail.

Fixes #8337.

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

10 years agocmd/yacc: fix parsing of character tokens
Russ Cox [Fri, 26 Sep 2014 21:03:31 +0000 (17:03 -0400)]
cmd/yacc: fix parsing of character tokens

From issue 7967 I learned:

1) yacc accepts either 'x' or "x" to mean token value 0x78
2) yacc also accepts 'xyz' and "XYZ" to mean token value 0x78

Use strconv.Unquote to simplify the handling of quoted
strings and check that each has only one rune.

Although this does clean things up, it makes 'x' and "x"
treated as different internally (now they are stored as
`'x'` and `"x"`; before they were both ` x`). Grammars that
use both interchangeably will now die with an error
similar to the one from issue 7967:

        yacc bug -- cannot have 2 different Ts with same value
                "+" and '+'

The echoing of the quotes should make clear what is going on.

The other semantic change caused by using strconv.Unquote
is that '\"' and "\'" are no longer valid. Like in Go, they must be
spelled without the backslash: '"' and "'".

On the other hand, now yacc and Go agree about what character
and string literals mean.

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

10 years agoflag: allow CommandLine's Usage function to be set
Rob Pike [Fri, 26 Sep 2014 19:33:05 +0000 (12:33 -0700)]
flag: allow CommandLine's Usage function to be set

Fixes #7779.

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

10 years agocmd/go: fix -a
Russ Cox [Fri, 26 Sep 2014 19:15:48 +0000 (15:15 -0400)]
cmd/go: fix -a

The one line that you can't test easily was broken.
This manifested as a failure of a pre-existing test
in test.bash but I didn't notice it (there are a few other
long-standing failures that need to be fixed).

TBR=r
CC=golang-codereviews
https://golang.org/cl/146340044

10 years agocmd/go: make build -a skip standard packages in Go releases
Russ Cox [Fri, 26 Sep 2014 18:41:26 +0000 (14:41 -0400)]
cmd/go: make build -a skip standard packages in Go releases

Today, 'go build -a my/pkg' and 'go install -a my/pkg'
recompile not just my/pkg and all its dependencies that
you wrote but also the standard library packages.
Recompiling the standard library is problematic on
some systems because the installed copy is not writable.

The -a behavior means that you can't use 'go install -a all'
or 'go install -a my/...' to rebuild everything after a Go
release - the rebuild stops early when it cannot overwrite
the installed standard library.

During development work, however, you do want install -a
to rebuild everything, because anything might have changed.

Resolve the conflict by making the behavior of -a depend
on whether we are using a released copy of Go or a devel copy.
In the release copies, -a no longer applies to the standard library.
In the devel copies, it still does.

This is the latest in a long line of refinements to the
"do I build this or not" logic. It is surely not the last.

Fixes #8290.

LGTM=r
R=golang-codereviews, r, tracey.brendan
CC=adg, golang-codereviews, iant
https://golang.org/cl/151730045

10 years agodoc/go1.4: add some cmd/go changes
Russ Cox [Fri, 26 Sep 2014 18:37:38 +0000 (14:37 -0400)]
doc/go1.4: add some cmd/go changes

CC=golang-codereviews
https://golang.org/cl/143650043

10 years agocmd/go: handle paths like \x.go on windows
Alex Brainman [Fri, 26 Sep 2014 18:36:49 +0000 (14:36 -0400)]
cmd/go: handle paths like \x.go on windows

Fixes #8130.

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

10 years agoliblink: fix cmd/ld -X flag
Russ Cox [Fri, 26 Sep 2014 17:50:53 +0000 (13:50 -0400)]
liblink: fix cmd/ld -X flag

This fixes the test/linkx.go test, which does not run by default.
(Issue 4139 is about fixing that.)

Fixes #8806.

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

10 years agocmd/go: document that testdata directories are ignored
Russ Cox [Fri, 26 Sep 2014 17:50:39 +0000 (13:50 -0400)]
cmd/go: document that testdata directories are ignored

Also rebuild doc.go; was stale, so contains extra changes.

Fixes #8677.

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

10 years agocmd/go: add test -o flag to control where test binary is written
Russ Cox [Fri, 26 Sep 2014 17:50:02 +0000 (13:50 -0400)]
cmd/go: add test -o flag to control where test binary is written

While we are here, remove undocumented, meaningless test -file flag.

Fixes #7724.

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

10 years agocmd/go: display program name when reporting crash
Russ Cox [Fri, 26 Sep 2014 17:48:30 +0000 (13:48 -0400)]
cmd/go: display program name when reporting crash

Fix by atom (from CL 89190044), comment and test by me.

Fixes #6823.

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=0xe2.0x9a.0x9b, adg, golang-codereviews, iant, r
https://golang.org/cl/148180043

10 years agocmd/go: make malformed import path message more precise
Russ Cox [Fri, 26 Sep 2014 17:47:51 +0000 (13:47 -0400)]
cmd/go: make malformed import path message more precise

If you say 'go get -v' you get extra information when import
paths are not of the expected form.

If you say 'go get -v src/rsc.io/pdf' the message says that
src/rsc.io/pdf does not contain a hostname, which is incorrect.
The problem is that it does not begin with a hostname.

Fixes #7432.

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

10 years agocmd/go: re-resolve and check vcs roots during go get -u
Russ Cox [Fri, 26 Sep 2014 16:10:13 +0000 (12:10 -0400)]
cmd/go: re-resolve and check vcs roots during go get -u

If you do 'go get -u rsc.io/pdf' and then rsc.io/pdf's redirect
changes to point somewhere else, after this CL a later
'go get -u rsc.io/pdf' will tell you that.

Fixes #8548.

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

10 years agocmd/go: fix 'go get vanity/repo/...' in clean GOPATH
Russ Cox [Fri, 26 Sep 2014 16:09:27 +0000 (12:09 -0400)]
cmd/go: fix 'go get vanity/repo/...' in clean GOPATH

The pattern was only working if the checkout had
already been done, but the code was trying to make
it work even the first time. Test and fix.

Fixes #8335.

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

10 years agocrypto/tls: ensure that we don't resume when tickets are disabled.
Adam Langley [Fri, 26 Sep 2014 01:02:09 +0000 (11:02 +1000)]
crypto/tls: ensure that we don't resume when tickets are disabled.

LGTM=r
R=r, adg, rsc
https://golang.org/cl/148080043

10 years agodoc: document Go 1.3.2
Andrew Gerrand [Fri, 26 Sep 2014 01:00:49 +0000 (11:00 +1000)]
doc: document Go 1.3.2

LGTM=r
R=r, rsc, iant, agl
https://golang.org/cl/142650045

10 years agotag go1.3.2
Andrew Gerrand [Fri, 26 Sep 2014 00:53:09 +0000 (10:53 +1000)]
tag go1.3.2

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

10 years ago.hgignore: delete some dregs
Rob Pike [Fri, 26 Sep 2014 00:30:12 +0000 (17:30 -0700)]
.hgignore: delete some dregs
I'd rather delete the file but I doubt that will be popular.

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

10 years agoencoding/gob: fix 386 build
Rob Pike [Fri, 26 Sep 2014 00:16:27 +0000 (17:16 -0700)]
encoding/gob: fix 386 build

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

10 years agoencoding/gob: error rather than panic when decoding enormous slices
Rob Pike [Thu, 25 Sep 2014 22:18:25 +0000 (15:18 -0700)]
encoding/gob: error rather than panic when decoding enormous slices
Fixes #8084.

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

10 years agodoc/gopher: add biplane.jpg
Rob Pike [Thu, 25 Sep 2014 21:10:56 +0000 (14:10 -0700)]
doc/gopher: add biplane.jpg

LGTM=0intro
R=golang-codereviews, 0intro
CC=golang-codereviews
https://golang.org/cl/150960043

10 years agocmd/go: install dependencies for 'go build -i' on a command
Russ Cox [Thu, 25 Sep 2014 19:57:52 +0000 (15:57 -0400)]
cmd/go: install dependencies for 'go build -i' on a command

Fixes #8242.

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

10 years agospec: clarify scope and re-use of iteration variables
Robert Griesemer [Thu, 25 Sep 2014 19:52:05 +0000 (12:52 -0700)]
spec: clarify scope and re-use of iteration variables

Fixes #7834.

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