]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
12 years ago[release-branch.r57] docs/GoCourseDay1.pdf: fix error in operator table. release.r57.2
Russ Cox [Thu, 16 Jun 2011 06:04:56 +0000 (02:04 -0400)]
[release-branch.r57] docs/GoCourseDay1.pdf: fix error in operator table.

««« CL 4637041 / df607ef238c9
docs/GoCourseDay1.pdf: fix error in operator table.
Communications op was listed as a binary; it isn't any more.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4637041
»»»

R=r
CC=golang-dev
https://golang.org/cl/4634042

12 years ago[release-branch.r57] docs: Update notes for 3-day Go course.
Russ Cox [Thu, 16 Jun 2011 05:57:02 +0000 (01:57 -0400)]
[release-branch.r57] docs: Update notes for 3-day Go course.

««« CL 4605041 / 71776ebc7416
docs: Update notes for 3-day Go course.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4605041
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4635041

12 years ago[release-branch.r57] doc: document r57.2
Russ Cox [Thu, 16 Jun 2011 05:50:35 +0000 (01:50 -0400)]
[release-branch.r57] doc: document r57.2

««« CL 4627042 / 9fadba82ab03
doc: document r57.2

R=adg, r
CC=golang-dev
https://golang.org/cl/4627042
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4633041

12 years ago[release-branch.r57] 6g, 8g: fix goto fix
Russ Cox [Thu, 16 Jun 2011 05:35:30 +0000 (01:35 -0400)]
[release-branch.r57] 6g, 8g: fix goto fix

««« CL 4632041 / cbc2b570b2ca
6g, 8g: fix goto fix

R=ken2
CC=golang-dev
https://golang.org/cl/4632041
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4631042

12 years ago[release-branch.r57] gc: work around goto bug
Russ Cox [Thu, 16 Jun 2011 05:04:43 +0000 (01:04 -0400)]
[release-branch.r57] gc: work around goto bug

««« CL 4629042 / ec3b60d1fe6e
gc: work around goto bug

R=ken2
CC=golang-dev
https://golang.org/cl/4629042
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4631041

13 years agoreflect: make allocation test less fragile.
Rob Pike [Sun, 8 May 2011 15:32:18 +0000 (08:32 -0700)]
reflect: make allocation test less fragile.
When GOMAXPROCS>1, the testing framework runs in parallel with the
test itself and may do a small number of allocations, so allow the
"noAllocs" condition to admit just a few.

Fixes #1782.

R=rsc
CC=golang-dev
https://golang.org/cl/4533041

13 years ago[release-branch.r57] doc: document r57.1 release.r57.1
Russ Cox [Wed, 4 May 2011 04:17:17 +0000 (00:17 -0400)]
[release-branch.r57] doc: document r57.1

««« CL 4471041 / 8339a04966bb
doc: document r57.1

R=adg
CC=golang-dev
https://golang.org/cl/4471041
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4468042

13 years ago[release-branch.r57] http: fix FormFile nil pointer dereference on missing multipart...
Russ Cox [Wed, 4 May 2011 03:53:31 +0000 (23:53 -0400)]
[release-branch.r57] http: fix FormFile nil pointer dereference on missing  multipart form

««« CL 4463042 / 6294ca33c042
http: fix FormFile nil pointer dereference on missing  multipart form

R=rsc
CC=golang-dev
https://golang.org/cl/4463042
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4467042

13 years ago[release-branch.r57] doc: release.r57 release.r57
Russ Cox [Tue, 3 May 2011 18:07:31 +0000 (14:07 -0400)]
[release-branch.r57] doc: release.r57

««« CL 4457049 / d222384d1bad
doc: release.r57

R=golang-dev, r, adg, r2
CC=golang-dev
https://golang.org/cl/4457049
»»»

R=golang-dev
TBR=r
CC=golang-dev
https://golang.org/cl/4431087

13 years ago[release-branch.r57] Make.cmd: create TARGDIR if necessary
Russ Cox [Tue, 3 May 2011 16:53:51 +0000 (12:53 -0400)]
[release-branch.r57] Make.cmd: create TARGDIR if necessary

««« CL 4437089 / b2670a39da7c
Make.cmd: create TARGDIR if necessary

Fixes #1771.

R=adg, rsc1
CC=golang-dev
https://golang.org/cl/4437089
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4454054

13 years ago[release-branch.r57] reflect: allow unexported key in Value.MapIndex
Russ Cox [Tue, 3 May 2011 15:08:57 +0000 (11:08 -0400)]
[release-branch.r57] reflect: allow unexported key in Value.MapIndex

««« CL 4444087 / 9abf81a9df90
reflect: allow unexported key in Value.MapIndex

Fixes #1748.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4444087
»»»

R=r, r2
CC=golang-dev
https://golang.org/cl/4433099

13 years ago[release-branch.r57] jpeg: speed up RGBA encoding ~%50
Russ Cox [Tue, 3 May 2011 05:50:43 +0000 (01:50 -0400)]
[release-branch.r57] jpeg: speed up RGBA encoding ~%50

««« CL 4433088 / 099dd59d3976
jpeg: speed up RGBA encoding ~%50

Avoids image.At(), color.RGBA(), opposing 8 bit shifts,
and min function calls in a loop.  Not as pretty as before,
but the pure version is still there to revert back to
later if/when the compiler gets better.

before (best of 5)
jpeg.BenchmarkEncodeRGBOpaque   50   64781360 ns/op   18.97 MB/s

after (best of 5)
jpeg.BenchmarkEncodeRGBOpaque   50   42044300 ns/op   29.23 MB/s

(benchmarked on an HP z600; 16 core Xeon E5520 @ 2.27Ghz)

R=r, r2, nigeltao
CC=golang-dev
https://golang.org/cl/4433088
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4431086

13 years ago[release-branch.r57] doc/install: specify clone -u instead of -r
Russ Cox [Tue, 3 May 2011 05:46:11 +0000 (01:46 -0400)]
[release-branch.r57] doc/install: specify clone -u instead of -r

««« CL 4435081 / 48c0b02c6e7f
doc/install: specify clone -u instead of -r

R=rsc
CC=golang-dev
https://golang.org/cl/4435081
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4436080

13 years ago[release-branch.r57] image: fix build
Russ Cox [Tue, 3 May 2011 05:45:33 +0000 (01:45 -0400)]
[release-branch.r57] image: fix build

««« CL 4438090 / 29f6e2e230a3
image: fix build
accidentally deleted one method
TBR=rsc

R=rsc
CC=golang-dev
https://golang.org/cl/4438090
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4445084

13 years ago[release-branch.r57] image: add type-specific Set methods and use them when decoding...
Russ Cox [Tue, 3 May 2011 05:45:01 +0000 (01:45 -0400)]
[release-branch.r57] image: add type-specific Set methods and use them when decoding PNG.

««« CL 4428080 / 2098f7682f2d
image: add type-specific Set methods and use them when decoding PNG.
This speeds up PNG decode about 20% by avoiding per-pixel interface conversions.

R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/4428080
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4426078

13 years ago[release-branch.r57] http/pprof: fix POST reading bug
Russ Cox [Tue, 3 May 2011 05:43:30 +0000 (01:43 -0400)]
[release-branch.r57] http/pprof: fix POST reading bug

««« CL 4430075 / ca45c67d28cf
http/pprof: fix POST reading bug

R=bradfitz
CC=golang-dev
https://golang.org/cl/4430075
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4454053

13 years ago[release-branch.r57] 5a, 6a, 8a, cc: remove old environment variables
Russ Cox [Tue, 3 May 2011 05:42:19 +0000 (01:42 -0400)]
[release-branch.r57] 5a, 6a, 8a, cc: remove old environment variables

««« CL 4445079 / f8cc81f985e5
5a, 6a, 8a, cc: remove old environment variables

Uses of $INCLUDE and $NPROC are left over from Plan 9.
Remove them to avoid causing confusion.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4445079
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4438096

13 years ago[release-branch.r57] runtime, sync/atomic: fix arm cas
Russ Cox [Tue, 3 May 2011 05:41:28 +0000 (01:41 -0400)]
[release-branch.r57] runtime, sync/atomic: fix arm cas

««« CL 4436072 / e280d98747be
runtime, sync/atomic: fix arm cas

Works around bug in kernel implementation on old ARM5 kernels.
Bug was fixed on 26 Nov 2007 (between 2.6.23 and 2.6.24) but
old kernels persist.

Fixes #1750.

R=dfc, golang-dev
CC=golang-dev
https://golang.org/cl/4436072
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4452064

13 years ago[release-branch.r57] png: speed up opaque RGBA encoding
Russ Cox [Tue, 3 May 2011 05:40:19 +0000 (01:40 -0400)]
[release-branch.r57] png: speed up opaque RGBA encoding

««« CL 4432077 / 66eb68cbd5c2
png: speed up opaque RGBA encoding

With Linux/8g on a 2006 Mac Mini (1.66 GHz Intel Core Duo,
2KB L1, 2MB L2, 2G main memory), GOMAXPROCS unset:

start:
png.BenchmarkEncodePaletted       50   44772820 ns/op
png.BenchmarkEncodeRGBOpaque       10  208395900 ns/op
png.BenchmarkEncodeRGBA        5  331088000 ns/op

remove interface method calls:
png.BenchmarkEncodePaletted       50   44722880 ns/op
png.BenchmarkEncodeRGBOpaque       10  139042600 ns/op
png.BenchmarkEncodeRGBA        5  334033600 ns/op

flate inline min/max():
png.BenchmarkEncodePaletted       50   40631180 ns/op
png.BenchmarkEncodeRGBOpaque       10  124894900 ns/op
png.BenchmarkEncodeRGBA        5  312099000 ns/op

after adler change:
png.BenchmarkEncodePaletted       50   40181760 ns/op
png.BenchmarkEncodeRGBOpaque       20  121781950 ns/op
png.BenchmarkEncodeRGBA        5  313890800 ns/op

In comparison to 121 ms on this 2006 machine, on my
Core2 Duo 2.66 GHz laptop, the final BenchmarkEncodeRGBOpaque
runs in 27 ms. (these are all for 640x480 images)

R=nigeltao, rsc, r
CC=golang-dev
https://golang.org/cl/4432077
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4430076

13 years ago[release-branch.r57] http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose
Russ Cox [Tue, 3 May 2011 05:39:17 +0000 (01:39 -0400)]
[release-branch.r57] http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose

««« CL 4432085 / 370c77323b75
http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose

R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/4432085
»»»

TBR=adg
CC=golang-dev
https://golang.org/cl/4425086

13 years ago[release-branch.r57] mime/multipart: fix regression from previous ReadSlice change
Russ Cox [Tue, 3 May 2011 05:15:56 +0000 (01:15 -0400)]
[release-branch.r57] mime/multipart: fix regression from previous ReadSlice change

««« CL 4432083 / 698b5ea9c782
mime/multipart: fix regression from previous ReadSlice change

The previous change to make multipart use ReadSlice out of
paranoia broke multipart to not deal with large lines in
the bodies.

We should only be paranoid about long lines in the header
sections.

Fixes http://code.google.com/p/camlistore/issues/detail?id=4

R=adg
CC=golang-dev
https://golang.org/cl/4432083
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4452062

13 years ago[release-branch.r57] http: new error for reading a body after it's been closed
Russ Cox [Tue, 3 May 2011 05:15:41 +0000 (01:15 -0400)]
[release-branch.r57] http: new error for reading a body after it's been closed

««« CL 4433094 / e30213b07276
http: new error for reading a body after it's been closed

R=adg
CC=golang-dev
https://golang.org/cl/4433094
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4433098

13 years ago[release-branch.r57] image: png & jpeg encoding benchmarks
Russ Cox [Tue, 3 May 2011 05:15:26 +0000 (01:15 -0400)]
[release-branch.r57] image: png & jpeg encoding benchmarks

««« CL 4445074 / 304d7d2b1d6c
image: png & jpeg encoding benchmarks

No code changes in this CL.

R=r
CC=golang-dev
https://golang.org/cl/4445074
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4453056

13 years ago[release-branch.r57] xml: fix reflect error
Russ Cox [Tue, 3 May 2011 05:15:12 +0000 (01:15 -0400)]
[release-branch.r57] xml: fix reflect error

««« CL 4431075 / acee6ec98e9a
xml: fix reflect error

Fixes #1749.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4431075
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4457048

13 years agocreate release-branch.r57
Russ Cox [Tue, 3 May 2011 05:07:23 +0000 (01:07 -0400)]
create release-branch.r57

13 years agoweekly.2011-04-27 weekly.2011-04-27
Andrew Gerrand [Thu, 28 Apr 2011 06:32:51 +0000 (16:32 +1000)]
weekly.2011-04-27

R=rsc
CC=golang-dev
https://golang.org/cl/4437077

13 years agohttp: add MultipartForm, FormFile, and ParseMultipartForm to Request
Andrew Gerrand [Thu, 28 Apr 2011 05:21:54 +0000 (15:21 +1000)]
http: add MultipartForm, FormFile, and ParseMultipartForm to Request

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4431068

13 years agoadler32: speed up ~40% by avoiding bounds checks
Brad Fitzpatrick [Thu, 28 Apr 2011 04:36:11 +0000 (21:36 -0700)]
adler32: speed up ~40% by avoiding bounds checks

before & after:
adler32.BenchmarkGolden   100000      14747 ns/op
adler32.BenchmarkGolden   200000       8761 ns/op

Found by profiling PNG encoding.

R=rsc, bradfitzwork, eds
CC=golang-dev
https://golang.org/cl/4441073

13 years agoruntime: fix typo in gc bug fix
Russ Cox [Thu, 28 Apr 2011 04:20:37 +0000 (00:20 -0400)]
runtime: fix typo in gc bug fix

This time for sure.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4437078

13 years agogc: correctly handle fields of pointer type to recursive forward references
Lorenzo Stoakes [Thu, 28 Apr 2011 04:13:49 +0000 (00:13 -0400)]
gc: correctly handle fields of pointer type to recursive forward references

Previously, whether declaring a type which copied the structure of a type it was referenced in via a pointer field would work depended on whether you declared it before or after the type it copied, e.g. type T2 T1; type T1 struct { F *T2 } would work, however type T1 struct { F *T2 }; type T2 T1 wouldn't.

Fixes #667.

R=rsc
CC=golang-dev
https://golang.org/cl/4313064

13 years agoruntime: stack split + garbage collection bug
Russ Cox [Thu, 28 Apr 2011 03:21:12 +0000 (23:21 -0400)]
runtime: stack split + garbage collection bug

The g->sched.sp saved stack pointer and the
g->stackbase and g->stackguard stack bounds
can change even while "the world is stopped",
because a goroutine has to call functions (and
therefore might split its stack) when exiting a
system call to check whether the world is stopped
(and if so, wait until the world continues).

That means the garbage collector cannot access
those values safely (without a race) for goroutines
executing system calls.  Instead, save a consistent
triple in g->gcsp, g->gcstack, g->gcguard during
entersyscall and have the garbage collector refer
to those.

The old code was occasionally seeing (because of
the race) an sp and stk that did not correspond to
each other, so that stk - sp was not the number of
stack bytes following sp.  In that case, if sp < stk
then the call scanblock(sp, stk - sp) scanned too
many bytes (anything between the two pointers,
which pointed into different allocation blocks).
If sp > stk then stk - sp wrapped around.
On 32-bit, stk - sp is a uintptr (uint32) converted
to int64 in the call to scanblock, so a large (~4G)
but positive number.  Scanblock would try to scan
that many bytes and eventually fault accessing
unmapped memory.  On 64-bit, stk - sp is a uintptr (uint64)
promoted to int64 in the call to scanblock, so a negative
number.  Scanblock would not scan anything, possibly
causing in-use blocks to be freed.

In short, 32-bit platforms would have seen either
ineffective garbage collection or crashes during garbage
collection, while 64-bit platforms would have seen
either ineffective or incorrect garbage collection.
You can see the invalid arguments to scanblock in the
stack traces in issue 1620.

Fixes #1620.
Fixes #1746.

R=iant, r
CC=golang-dev
https://golang.org/cl/4437075

13 years agocgo: handle versioned ELF symbols
Russ Cox [Thu, 28 Apr 2011 03:21:03 +0000 (23:21 -0400)]
cgo: handle versioned ELF symbols

Fixes #1397.

R=iant
CC=golang-dev
https://golang.org/cl/4444064

13 years agoruntime: allow use of >512 MB on 32-bit platforms
Russ Cox [Thu, 28 Apr 2011 03:20:53 +0000 (23:20 -0400)]
runtime: allow use of >512 MB on 32-bit platforms

runtime: memory allocated by OS not in usable range
runtime: out of memory: cannot allocate 1114112-byte block (2138832896 in use)
throw: out of memory

runtime.throw+0x40 /Users/rsc/g/go/src/pkg/runtime/runtime.c:102
        runtime.throw(0x1fffd, 0x101)
runtime.mallocgc+0x2af /Users/rsc/g/go/src/pkg/runtime/malloc.c:60
        runtime.mallocgc(0x100004, 0x0, 0x1, 0x1, 0xc093, ...)
runtime.mal+0x40 /Users/rsc/g/go/src/pkg/runtime/malloc.c:289
        runtime.mal(0x100004, 0x20bc4)
runtime.new+0x26 /Users/rsc/g/go/src/pkg/runtime/malloc.c:296
        runtime.new(0x100004, 0x8fe84000, 0x20bc4)
main.main+0x29 /Users/rsc/x.go:11
        main.main()
runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/386/asm.s:93
        runtime.mainstart()
runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:178
        runtime.goexit()
----- goroutine created by -----
_rt0_386+0xbf /Users/rsc/g/go/src/pkg/runtime/386/asm.s:80

R=iant, r
CC=golang-dev
https://golang.org/cl/4444073

13 years agomime/multipart: add ReadForm and associated types
Andrew Gerrand [Thu, 28 Apr 2011 03:14:35 +0000 (13:14 +1000)]
mime/multipart: add ReadForm and associated types

R=brad_danga_com, rsc, dfc, r, dchest, bradfitz
CC=golang-dev
https://golang.org/cl/4439075

13 years agotar: use ioutil.Discard
Brad Fitzpatrick [Wed, 27 Apr 2011 22:57:22 +0000 (15:57 -0700)]
tar: use ioutil.Discard

This one didn't come up in previous greps.

R=adg
CC=golang-dev
https://golang.org/cl/4430071

13 years agoioutil: add Discard, update tree.
Brad Fitzpatrick [Wed, 27 Apr 2011 22:47:04 +0000 (15:47 -0700)]
ioutil: add Discard, update tree.

This also removes an unnecessary allocation in
http/transfer.go

R=r, rsc1, r2, adg
CC=golang-dev
https://golang.org/cl/4426066

13 years agohttp: put a limit on POST size
Brad Fitzpatrick [Wed, 27 Apr 2011 22:36:39 +0000 (15:36 -0700)]
http: put a limit on POST size

R=rsc
CC=golang-dev
https://golang.org/cl/4432076

13 years agohttp: keep gzip reader inside eofsignaler
Brad Fitzpatrick [Wed, 27 Apr 2011 21:23:25 +0000 (14:23 -0700)]
http: keep gzip reader inside eofsignaler

Fixes #1725

R=rsc
CC=golang-dev
https://golang.org/cl/4442086

13 years agoreflect: Fix Copy of arrays
Gustavo Niemeyer [Wed, 27 Apr 2011 21:22:53 +0000 (18:22 -0300)]
reflect: Fix Copy of arrays

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4438077

13 years agocgi: improve Location response handling
Brad Fitzpatrick [Wed, 27 Apr 2011 21:07:13 +0000 (14:07 -0700)]
cgi: improve Location response handling

Add local URI path support, which isn't as fringe
as I originally thought. (it's supported by Apache)

Send an implicit 302 status on redirects (not 200).

Fixes #1597

R=rsc, r
CC=golang-dev
https://golang.org/cl/4442089

13 years agoruntime: fix mkversion to output valid path separators
Peter Mundy [Wed, 27 Apr 2011 19:47:12 +0000 (15:47 -0400)]
runtime: fix mkversion to output valid path separators

In a GOROOT path a backslash is a path separator
not an escape character. For example, `C:\go`.
Fixes gotest error:
version.go:3: unknown escape sequence: g

R=rsc
CC=golang-dev
https://golang.org/cl/4437076

13 years agohttp/fcgi: New package
Evan Shaw [Wed, 27 Apr 2011 19:34:34 +0000 (12:34 -0700)]
http/fcgi: New package

R=golang-dev, bradfitzgo, bradfitzwork, nigeltao, rog
CC=golang-dev
https://golang.org/cl/4271078

13 years agotutorial: replace the forever loops with finite counts in sieve programs.
Rob Pike [Wed, 27 Apr 2011 16:59:27 +0000 (09:59 -0700)]
tutorial: replace the forever loops with finite counts in sieve programs.
Fixes #1742.
I hope.

Also this picks up an update to go_tutorial.html that should already have happened.

R=brainman, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4452050

13 years agogopack: preserve safe flag when not adding unsafe objects to archive
Russ Cox [Wed, 27 Apr 2011 13:20:53 +0000 (09:20 -0400)]
gopack: preserve safe flag when not adding unsafe objects to archive

R=dsymonds
CC=golang-dev
https://golang.org/cl/4436060

13 years agodoc: mention make version in install.html
Russ Cox [Wed, 27 Apr 2011 01:39:22 +0000 (21:39 -0400)]
doc: mention make version in install.html

Fixes #1531.

R=adg
CC=golang-dev
https://golang.org/cl/4442088

13 years agogoinstall: support GOPATH; building and installing outside the Go tree
Andrew Gerrand [Wed, 27 Apr 2011 01:00:34 +0000 (11:00 +1000)]
goinstall: support GOPATH; building and installing outside the Go tree

For example, with GOPATH set like so
        GOPATH=/home/adg/gocode
And after creating some subdirectories
        mkdir /home/adg/gocode/{bin,pkg,src}

I can use goinstall to install the github.com/nf/goto web server,
which depends on the github.com/nf/stat package, with
        goinstall github.com/nf/goto

This downloads and installs all dependencies (that aren't already
installed) like so
        /home/adg/gocode/bin/goto
        /home/adg/gocode/pkg/darwin_amd64/github.com/nf/stat.a
        /home/adg/gocode/src/github.com/nf/goto/...
        /home/adg/gocode/src/github.com/nf/stat/...

R=rsc, niemeyer
CC=golang-dev
https://golang.org/cl/4438043

13 years agobuilder: build multiple targets in parallel
Andrew Gerrand [Wed, 27 Apr 2011 00:12:10 +0000 (10:12 +1000)]
builder: build multiple targets in parallel

R=rsc, dfc
CC=golang-dev
https://golang.org/cl/4452047

13 years agorpc: run benchmarks over HTTP as well as direct network connections.
Rob Pike [Tue, 26 Apr 2011 23:16:51 +0000 (16:16 -0700)]
rpc: run benchmarks over HTTP as well as direct network connections.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4442085

13 years agorpc: allow the argument (first arg of method) to be a value rather than a pointer.
Rob Pike [Tue, 26 Apr 2011 22:07:25 +0000 (15:07 -0700)]
rpc: allow the argument (first arg of method) to be a value rather than a pointer.
Can make the API nicer in some cases.

R=rsc, rog, r2
CC=golang-dev
https://golang.org/cl/4428064

13 years agohttp: new tests + panic hunting issue 1725
Brad Fitzpatrick [Tue, 26 Apr 2011 19:32:59 +0000 (12:32 -0700)]
http: new tests + panic hunting issue 1725

No bugs found yet, though.

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4436058

13 years agocrypto/x509: memorize chain building.
Adam Langley [Tue, 26 Apr 2011 14:26:22 +0000 (10:26 -0400)]
crypto/x509: memorize chain building.

I ran the new verification code against a large number of certificates
with a huge (>1000) number of intermediates.

I had previously convinced myself that a cycle in the certificate
graph implied a cycle in the hash graph (and thus, a contradiction).
This is bogus because the signatures don't cover each other.

Secondly, I managed to drive the verification into a time explosion
with a fully connected graph of certificates. The code would try to
walk the factorial number of paths.

This change switches the CertPool to dealing with indexes of
certificates rather than pointers: this makes equality easy. (I didn't
want to compare pointers because a reasonable gc could move objects
around over time.)

Secondly, verification now memorizes the chains from a given
certificate. This is dynamic programming for the lazy, but there's a
solid reason behind it: dynamic programming would ignore the Issuer
hints that we can exploit by walking up the chain rather than down.

R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4439070

13 years agosyscall: Mlock, Munlock, Mlockall, Munlockall on Linux.
Albert Strasheim [Tue, 26 Apr 2011 13:41:19 +0000 (06:41 -0700)]
syscall: Mlock, Munlock, Mlockall, Munlockall on Linux.

R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4433070

13 years agoruntime: more graceful out-of-memory crash
Russ Cox [Tue, 26 Apr 2011 12:25:40 +0000 (08:25 -0400)]
runtime: more graceful out-of-memory crash

Used to fault trying to access l->list->next
when l->list == nil after MCentral_AllocList.
Now prints

runtime: out of memory: no room in arena for 65536-byte allocation (536870912 in use)
throw: out of memory

followed by stack trace.

Fixes #1650.

R=r, dfc
CC=golang-dev
https://golang.org/cl/4446062

13 years agoos: fix race in ReadAt/WriteAt on Windows
Alex Brainman [Tue, 26 Apr 2011 08:09:46 +0000 (18:09 +1000)]
os: fix race in ReadAt/WriteAt on Windows

R=bradfitzgo, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4441051

13 years ago8l: do not emit empty dwarf pe sections
Alex Brainman [Tue, 26 Apr 2011 07:12:16 +0000 (17:12 +1000)]
8l: do not emit empty dwarf pe sections

This change will allow to generate valid executable,
even if rsc disables dwarf generation, as it happend
at revision 9a64273f9d68.

R=rsc
CC=golang-dev, lvd, vcc
https://golang.org/cl/4425066

13 years agohttp: make Client redirect policy configurable
Brad Fitzpatrick [Tue, 26 Apr 2011 05:41:50 +0000 (22:41 -0700)]
http: make Client redirect policy configurable

Work on issue 155

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4435071

13 years agogc: fix order of operations for f() < g().
Russ Cox [Tue, 26 Apr 2011 04:57:03 +0000 (00:57 -0400)]
gc: fix order of operations for f() < g().

Also, 6g was passing uninitialized
Node &n2 to regalloc, causing non-deterministic
register collisions (but only when both left and
right hand side of comparison had function calls).

Fixes #1728.

R=ken2
CC=golang-dev
https://golang.org/cl/4425070

13 years agoall-qemu.bash: remove DISABLE_NET_TESTS
Russ Cox [Tue, 26 Apr 2011 04:16:12 +0000 (00:16 -0400)]
all-qemu.bash: remove DISABLE_NET_TESTS

It's no longer used.

R=adg
CC=golang-dev
https://golang.org/cl/4426061

13 years agodashboard: build most recent revision first
Russ Cox [Tue, 26 Apr 2011 03:48:06 +0000 (23:48 -0400)]
dashboard: build most recent revision first

Will fill dashboard down the screen instead of up
when builders get stuck and resume.  Already live.

Also delete dead benchmark code.
I think it is safe to say that if/when we bring
benchmarks back, we will use a different
data model.

Fixes #1228.

R=adg
CC=golang-dev
https://golang.org/cl/4449059

13 years agowebsocket: include *http.Request in websocket.Conn
Andrew Gerrand [Tue, 26 Apr 2011 00:47:49 +0000 (10:47 +1000)]
websocket: include *http.Request in websocket.Conn

This permits the websocket handler to inspect http headers and such.

Fixes #1726.

R=ukai, bradfitz, bradfitzgo
CC=golang-dev
https://golang.org/cl/4439069

13 years agoruntime: fix arm build
Dave Cheney [Mon, 25 Apr 2011 22:33:57 +0000 (15:33 -0700)]
runtime: fix arm build

R=rsc, r
CC=golang-dev
https://golang.org/cl/4438069

13 years agogc: explain why invalid receiver types are invalid
Russ Cox [Mon, 25 Apr 2011 21:16:44 +0000 (17:16 -0400)]
gc: explain why invalid receiver types are invalid

Fixes #1680.

R=ken2
CC=golang-dev
https://golang.org/cl/4446061

13 years agoruntime: turn "too many EPIPE" into real SIGPIPE
Russ Cox [Mon, 25 Apr 2011 20:58:00 +0000 (16:58 -0400)]
runtime: turn "too many EPIPE" into real SIGPIPE

Tested on Linux and OS X, amd64 and 386.

R=r, iant
CC=golang-dev
https://golang.org/cl/4452046

13 years agotime: Support Irix 6 location for zoneinfo files.
Ian Lance Taylor [Mon, 25 Apr 2011 19:37:00 +0000 (12:37 -0700)]
time: Support Irix 6 location for zoneinfo files.

R=rsc
CC=golang-dev
https://golang.org/cl/4440066

13 years agold: fix 6l -d on Mac, diagnose invalid use of -d
Russ Cox [Mon, 25 Apr 2011 17:57:52 +0000 (13:57 -0400)]
ld: fix 6l -d on Mac, diagnose invalid use of -d

R=r
CC=golang-dev
https://golang.org/cl/4430064

13 years agofix tree for reflect rename
Russ Cox [Mon, 25 Apr 2011 17:39:36 +0000 (13:39 -0400)]
fix tree for reflect rename

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4435067

13 years agoreflect: rename Typeof, NewValue -> TypeOf, ValueOf
Russ Cox [Mon, 25 Apr 2011 17:39:16 +0000 (13:39 -0400)]
reflect: rename Typeof, NewValue -> TypeOf, ValueOf

R=r, bradfitzgo
CC=golang-dev
https://golang.org/cl/4433066

13 years agogofix: add support for reflect rename
Russ Cox [Mon, 25 Apr 2011 17:39:00 +0000 (13:39 -0400)]
gofix: add support for reflect rename

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4450053

13 years ago8g,8l: fix "set but not used" gcc error
Fazlul Shahriar [Mon, 25 Apr 2011 16:14:30 +0000 (12:14 -0400)]
8g,8l: fix "set but not used" gcc error

$ gcc --version
gcc (GCC) 4.6.0 20110415 (prerelease)

R=golang-dev, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4442080

13 years agoruntime: correct out of memory error
Russ Cox [Mon, 25 Apr 2011 16:13:54 +0000 (12:13 -0400)]
runtime: correct out of memory error

Fixes #1511.

R=golang-dev, iant2
CC=golang-dev
https://golang.org/cl/4433065

13 years agocodereview: various fixes
Russ Cox [Mon, 25 Apr 2011 16:12:53 +0000 (12:12 -0400)]
codereview: various fixes

Set mailed bit correctly for self-clpatch.
Use repo.rollback correctly.
Allow leading spaces in some C code.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4438064

13 years agogc: fix import width bug
Russ Cox [Mon, 25 Apr 2011 16:08:48 +0000 (12:08 -0400)]
gc: fix import width bug

Fixes #1705.

R=ken2
CC=golang-dev
https://golang.org/cl/4443060

13 years agogc: allow complex types to be receiver types
Robert Hencke [Mon, 25 Apr 2011 16:02:54 +0000 (12:02 -0400)]
gc: allow complex types to be receiver types

Fixes #1716.

R=golang-dev, rsc1, rsc
CC=golang-dev
https://golang.org/cl/4439068

13 years agocrypto/tls: use time(), not Time().
Adam Langley [Mon, 25 Apr 2011 14:27:36 +0000 (10:27 -0400)]
crypto/tls: use time(), not Time().

The unexported version returns a sensible default when the user hasn't
set a value. The exported version crashes in that case.

R=bradfitzgo, rsc1
CC=golang-dev
https://golang.org/cl/4435070

13 years agojpeg: decode to a YCbCr image instead of an RGBA image.
Nigel Tao [Sun, 24 Apr 2011 09:25:49 +0000 (19:25 +1000)]
jpeg: decode to a YCbCr image instead of an RGBA image.

R=r
CC=golang-dev
https://golang.org/cl/4436053

13 years agorc/env.bash: fix for Go tool-chain build on windows under msys.
Joe Poirier [Sat, 23 Apr 2011 18:34:08 +0000 (11:34 -0700)]
rc/env.bash: fix for Go tool-chain build on windows under msys.

The path conversion is done automatically if msys' builtin
shell commands are used.

R=rsc1, peterGo, brainman, Mr_Dark, r
CC=golang-dev
https://golang.org/cl/4452042

13 years agofmt: tweak the doc for %U.
Rob Pike [Sat, 23 Apr 2011 18:25:27 +0000 (11:25 -0700)]
fmt: tweak the doc for %U.
Fixes #1727.

R=rsc
CC=golang-dev
https://golang.org/cl/4437069

13 years agogc: fix conversion of user-defined string type to []byte
Russ Cox [Sat, 23 Apr 2011 14:55:32 +0000 (10:55 -0400)]
gc: fix conversion of user-defined string type to []byte

Fixes #1709.

R=ken2
CC=golang-dev
https://golang.org/cl/4438068

13 years agogc: fix return variable named _
Russ Cox [Sat, 23 Apr 2011 14:54:19 +0000 (10:54 -0400)]
gc: fix return variable named _

Fixes #1712.

R=ken2
CC=golang-dev
https://golang.org/cl/4445055

13 years agogc: fix line number at EOF
Russ Cox [Sat, 23 Apr 2011 14:54:05 +0000 (10:54 -0400)]
gc: fix line number at EOF

Fixes #1474.

R=ken2
CC=golang-dev
https://golang.org/cl/4432061

13 years agold: fix Plan 9 symbol table
Anthony Martin [Sat, 23 Apr 2011 14:53:49 +0000 (10:53 -0400)]
ld: fix Plan 9 symbol table

Static symbols were not being marked as such.

I also made the 'z' symbols use the first byte of
the name instead of an explicit NUL so that if
the symbol table format is ever changed, the only
place that would need updating is addhist().

R=rsc
CC=golang-dev
https://golang.org/cl/4366047

13 years agoruntime: disable long test (fix arm build)
Russ Cox [Sat, 23 Apr 2011 14:03:51 +0000 (10:03 -0400)]
runtime: disable long test (fix arm build)

TBR=r
CC=golang-dev
https://golang.org/cl/4449051

13 years agofmt: decrease recursion depth
Ian Lance Taylor [Fri, 22 Apr 2011 23:59:21 +0000 (16:59 -0700)]
fmt: decrease recursion depth

This permits the test to run when using gccgo on system
without split-stack support.  See
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg01420.html
http://gcc.gnu.org/PR48553

R=r
CC=golang-dev
https://golang.org/cl/4440062

13 years agogo spec: for map types, mention indexing operations
Robert Griesemer [Fri, 22 Apr 2011 23:26:51 +0000 (16:26 -0700)]
go spec: for map types, mention indexing operations
         (like we do for arrays and slices).

Suggested by mathieu.lonjaret@gmail.com .

R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/4442074

13 years agocontainer/heap: fix circular dependency in test
David Symonds [Fri, 22 Apr 2011 20:29:05 +0000 (16:29 -0400)]
container/heap: fix circular dependency in test

Having the test be in the container/heap package yields a cycle
  container/heap (for the test)
  -> testing
  -> time
  -> container/heap (for timerHeap)

Occasionally the linker would get mixed up, resulting in a test panic
in a very weird place.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/4395042

13 years agohttp: in ServerConn and ClientConn, rename Close to Hijack, add Close
Petar Maymounkov [Fri, 22 Apr 2011 19:56:27 +0000 (15:56 -0400)]
http: in ServerConn and ClientConn, rename Close to Hijack, add Close

R=rsc
CC=golang-dev
https://golang.org/cl/4372046

13 years agocrypto/rsa: add file that I forgot to add last time.
Adam Langley [Fri, 22 Apr 2011 19:46:49 +0000 (15:46 -0400)]
crypto/rsa: add file that I forgot to add last time.

R=rsc
CC=golang-dev
https://golang.org/cl/4452041

13 years agocrypto/rsa: support > 3 primes.
Adam Langley [Fri, 22 Apr 2011 19:33:41 +0000 (15:33 -0400)]
crypto/rsa: support > 3 primes.

With full multi-prime support we can support version 1 PKCS#1 private
keys. This means exporting all the members of rsa.PrivateKey, thus
making the API a little messy. However there has already been another
request to export this so it seems to be something that's needed.

Over time, rsa.GenerateMultiPrimeKey will replace rsa.GenerateKey, but
I need to work on the prime balance first because we're no longer
generating primes which are a multiples of 8 bits.

Fixes #987.

R=rsc
CC=golang-dev
https://golang.org/cl/4378046

13 years agoruntime: stop deadlock test properly (fix arm5 build)
Russ Cox [Fri, 22 Apr 2011 19:22:11 +0000 (15:22 -0400)]
runtime: stop deadlock test properly (fix arm5 build)

TBR=r
CC=golang-dev
https://golang.org/cl/4446058

13 years agosyscall: fix Ftruncate under linux/arm5
Dave Cheney [Fri, 22 Apr 2011 18:44:18 +0000 (14:44 -0400)]
syscall: fix Ftruncate under linux/arm5

Fixes #1714.

R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4441056

13 years agohttp/cgi: pass some default environment variables
Brad Fitzpatrick [Fri, 22 Apr 2011 18:02:33 +0000 (11:02 -0700)]
http/cgi: pass some default environment variables

This isn't really part of RFC 3875 but matches
the behavior of Apache, et al.

R=iant, iant2
CC=golang-dev
https://golang.org/cl/4435065

13 years agoos/user: new package to look up users
Brad Fitzpatrick [Fri, 22 Apr 2011 16:30:30 +0000 (09:30 -0700)]
os/user: new package to look up users

Only for Unix presently. Other operating systems
are stubbed out, as well as arm (lacks cgo).

R=rsc, r, bradfitzwork
CC=golang-dev
https://golang.org/cl/4440057

13 years agohttp: fix FileServer's default text content type
Brad Fitzpatrick [Fri, 22 Apr 2011 16:09:37 +0000 (09:09 -0700)]
http: fix FileServer's default text content type

Fixes #1729

R=rsc, adg
CC=golang-dev
https://golang.org/cl/4443057

13 years agohttp/cgi: copy some PATH environment variables to child
Ian Lance Taylor [Fri, 22 Apr 2011 15:53:52 +0000 (08:53 -0700)]
http/cgi: copy some PATH environment variables to child

R=bradfitz, bradfitzwork, iant2, bradfitzgo
CC=golang-dev
https://golang.org/cl/4444058

13 years agoos: Open with O_APPEND|O_CREATE to append to the end of file on Windows
Alex Brainman [Fri, 22 Apr 2011 05:31:25 +0000 (15:31 +1000)]
os: Open with O_APPEND|O_CREATE to append to the end of file on Windows

Credit for the fix goes to Hector, test by PeterGo.

Fixes #1655.

R=golang-dev, rsc1, peterGo
CC=golang-dev, hector
https://golang.org/cl/4436051

13 years agohttp: clarify docs on Request HTTP version
Brad Fitzpatrick [Fri, 22 Apr 2011 02:57:19 +0000 (19:57 -0700)]
http: clarify docs on Request HTTP version

Fixes #910

R=adg, rsc1
CC=golang-dev
https://golang.org/cl/4439062

13 years agohttp: close underlying gzip Reader too
Brad Fitzpatrick [Thu, 21 Apr 2011 23:01:29 +0000 (16:01 -0700)]
http: close underlying gzip Reader too

Fixes #1724

R=rsc
CC=golang-dev
https://golang.org/cl/4443056

13 years agoxml: Parser hook for non-UTF-8 charset converters
Brad Fitzpatrick [Thu, 21 Apr 2011 21:37:26 +0000 (14:37 -0700)]
xml: Parser hook for non-UTF-8 charset converters

Adds an optional hook to Parser to let charset
converters step in when a processing directive
with a non-UTF-8 encoding is specified.

(Open to alternative proposals too...)

R=rsc
CC=golang-dev
https://golang.org/cl/4437061

13 years ago8l/prof.c: #if 0 is not accepted by the Plan 9 native toolchain.
Lucio De Re [Thu, 21 Apr 2011 21:03:58 +0000 (17:03 -0400)]
8l/prof.c: #if 0 is not accepted by the Plan 9 native toolchain.

The solution may be a bit of a sledgehammer, but it looks like
a temporary situation anyway.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4400042

13 years agocgo: avoid "incompatible pointer type" warning
Albert Strasheim [Thu, 21 Apr 2011 21:02:52 +0000 (17:02 -0400)]
cgo: avoid "incompatible pointer type" warning

R=rsc
CC=golang-dev
https://golang.org/cl/4409041