]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoarm: remove old qemu dependency from gotest
Kai Backman [Tue, 3 Aug 2010 20:03:40 +0000 (13:03 -0700)]
arm: remove old qemu dependency from gotest

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

14 years agotest/run: diff old new
Russ Cox [Tue, 3 Aug 2010 20:01:28 +0000 (13:01 -0700)]
test/run: diff old new

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

14 years agocrypto/x509: unwrap Subject Key Identifier
Adam Langley [Tue, 3 Aug 2010 16:26:48 +0000 (12:26 -0400)]
crypto/x509: unwrap Subject Key Identifier

RFC 5280, 4.2.1.2 says:
  SubjectKeyIdentifier ::= KeyIdentifier
  KeyIdentifier ::= OCTET STRING

Previously, we were failing to unwrap the second level of OCTET STRING
encoding.

Fixes #993.

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

14 years agogc: empty select
Russ Cox [Tue, 3 Aug 2010 08:07:57 +0000 (01:07 -0700)]
gc: empty select

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

14 years agogc: bug301
Russ Cox [Tue, 3 Aug 2010 08:07:40 +0000 (01:07 -0700)]
gc: bug301

Fixes #990.

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

14 years agogc: bug299, bug300
Russ Cox [Tue, 3 Aug 2010 07:53:32 +0000 (00:53 -0700)]
gc: bug299, bug300

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

14 years agoA+C: Tarmigan Casebolt
Russ Cox [Tue, 3 Aug 2010 07:36:44 +0000 (00:36 -0700)]
A+C: Tarmigan Casebolt

R=adg
CC=golang-dev, tarm
https://golang.org/cl/1923041

14 years agogc: index bounds tests and fixes
Russ Cox [Tue, 3 Aug 2010 07:26:02 +0000 (00:26 -0700)]
gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

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

14 years agostrings: fix Split("", "", -1)
Scott Lawrence [Tue, 3 Aug 2010 03:35:14 +0000 (13:35 +1000)]
strings: fix Split("", "", -1)
Fixes #980.

Made it return an empty array, rather than crash.
Added relevant test cases to strings.

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

14 years agoAdd Scott Lawrence to C&A
Rob Pike [Tue, 3 Aug 2010 03:27:50 +0000 (13:27 +1000)]
Add Scott Lawrence to C&A

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

14 years agosyscall: make sure go error numbers do not clash with windows system errors
Alex Brainman [Tue, 3 Aug 2010 02:04:41 +0000 (12:04 +1000)]
syscall: make sure go error numbers do not clash with windows system errors

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

14 years agobuilder: update script so it doesn't create tar-bombs
Andrew Gerrand [Tue, 3 Aug 2010 01:06:18 +0000 (11:06 +1000)]
builder: update script so it doesn't create tar-bombs

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

14 years agoimage: introduce Gray and Gray16 types, and remove the named colors
Nigel Tao [Tue, 3 Aug 2010 00:57:53 +0000 (10:57 +1000)]
image: introduce Gray and Gray16 types, and remove the named colors
except for Black and White.

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

14 years agoio: consolidate multi_reader and multi_writer into a single file, multi.go
Rob Pike [Mon, 2 Aug 2010 22:04:33 +0000 (08:04 +1000)]
io: consolidate multi_reader and multi_writer into a single file, multi.go

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

14 years agoimage/png: use image-specific methods for checking opacity.
Nigel Tao [Sun, 1 Aug 2010 23:52:15 +0000 (09:52 +1000)]
image/png: use image-specific methods for checking opacity.

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

14 years agowebsocket: fix bug involving spaces in header keys
Bill Neubauer [Fri, 30 Jul 2010 19:27:03 +0000 (12:27 -0700)]
websocket: fix bug involving spaces in header keys

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

14 years agoCONTRIBUTORS: add wcn@google.com alias to match with code review
Russ Cox [Fri, 30 Jul 2010 19:26:50 +0000 (12:26 -0700)]
CONTRIBUTORS: add wcn@google.com alias to match with code review

R=wcn
CC=golang-dev
https://golang.org/cl/1902043

14 years agoruntime: do not fall through in SIGBUS/SIGSEGV
Russ Cox [Fri, 30 Jul 2010 18:32:55 +0000 (11:32 -0700)]
runtime: do not fall through in SIGBUS/SIGSEGV

Faults beyond the first page are not expected
and should fail loudly.  They are not subject to recover.

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

14 years agoarm: disable another flaky test.
Kai Backman [Fri, 30 Jul 2010 09:33:40 +0000 (12:33 +0300)]
arm: disable another flaky test.

these tests work fine on n1 and gumstix. it's unclear
why they keep failing on the godashboard build.

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

14 years agofix build
Kai Backman [Fri, 30 Jul 2010 07:53:26 +0000 (10:53 +0300)]
fix build

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

14 years agoarm: bugfixes (stack clobbering, indices)
Kai Backman [Fri, 30 Jul 2010 07:37:51 +0000 (10:37 +0300)]
arm: bugfixes (stack clobbering, indices)

also changed zerodivide to output "BUG"

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

14 years agoarm: add gdb support to android launcher script
Kai Backman [Fri, 30 Jul 2010 07:35:07 +0000 (10:35 +0300)]
arm: add gdb support to android launcher script

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

14 years agotag release.2010-07-29
Andrew Gerrand [Fri, 30 Jul 2010 05:18:55 +0000 (15:18 +1000)]
tag release.2010-07-29

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

14 years agorelease.2010-07-29 weekly.2010-07-29
Andrew Gerrand [Fri, 30 Jul 2010 04:48:30 +0000 (14:48 +1000)]
release.2010-07-29

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

14 years agomisc/builder: support for uploading tarballs to googlecode
Andrew Gerrand [Fri, 30 Jul 2010 04:00:59 +0000 (14:00 +1000)]
misc/builder: support for uploading tarballs to googlecode

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

14 years agocov and prof: implement windows version (just function stubs and build mods)
Joe Poirier [Fri, 30 Jul 2010 01:47:11 +0000 (11:47 +1000)]
cov and prof: implement windows version (just function stubs and build mods)

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

14 years agobug300: literal types must not be parenthesized
Robert Griesemer [Fri, 30 Jul 2010 01:14:49 +0000 (18:14 -0700)]
bug300: literal types must not be parenthesized

( This CL is dependent on acceptance of
https://golang.org/cl/1913041/show )

R=go-dev
CC=golang-dev
https://golang.org/cl/1860045

14 years agogo_spec: don't allow parens around the literal type of composite literals
Robert Griesemer [Fri, 30 Jul 2010 01:13:41 +0000 (18:13 -0700)]
go_spec: don't allow parens around the literal type of composite literals

Background: The current spec is imprecise with respect to the parsing ambiguity
for composite literals: It says that the ambiguity arises when the TypeName form
of the LiteralType is used. The following code:

    if (B) {} ...

is not using the TypeName form (but the parenthesized TypeName form) and thus
could be interpreted as:

    if ((B){}) ...

instead of

    if B {} ...

Both compilers and gofmt choose the latter interpretation. One could fix the
spec by making the clause regarding the parsing ambiguity more precise ("...using
the _possibly parenthesized_ TypeName form of the LiteralType..."). The alternative
(chosen here) is to simply disallow parenthesized literal types. Except for a single
test case (test/parentype.go) there appears to be no Go code under $GOROOT containing
parenthesized literal types. Furthermore, parentheses are never needed around a
literal type for correct parsing.

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

14 years agodoc: update front page and go_learning.html
Andrew Gerrand [Fri, 30 Jul 2010 00:36:13 +0000 (10:36 +1000)]
doc: update front page and go_learning.html

This is a stop-gap change to give more current information visibility
before a more thorough reorganization.

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

14 years agomime: add AddExtensionType
Yuusei Kuwana [Thu, 29 Jul 2010 21:12:04 +0000 (14:12 -0700)]
mime: add AddExtensionType

For example:
mime.AddExtensionType(".m3u8", "application/x-mpegURL")
mime.AddExtensionType(".ts", "video/MP2T")

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

14 years agoA+C: Yuusei Kuwana (individual CLA)
Russ Cox [Thu, 29 Jul 2010 20:49:01 +0000 (13:49 -0700)]
A+C: Yuusei Kuwana (individual CLA)

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

14 years agoscanner: better comment
Robert Griesemer [Thu, 29 Jul 2010 20:02:27 +0000 (13:02 -0700)]
scanner: better comment

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

14 years agobug299: parenthesized receiver types/anonymous fields are illegal
Robert Griesemer [Thu, 29 Jul 2010 17:54:03 +0000 (10:54 -0700)]
bug299: parenthesized receiver types/anonymous fields are illegal

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

14 years agofmt.Print: fix bug in placement of spaces introduced when ...T went in.
Rob Pike [Thu, 29 Jul 2010 17:50:09 +0000 (10:50 -0700)]
fmt.Print: fix bug in placement of spaces introduced when ...T went in.
Fixes #976.

R=rsc, chris tighe, r
CC=golang-dev
https://golang.org/cl/1697057

14 years agoruntime: fix bug introduced in revision 4a01b8d28570
Alex Brainman [Thu, 29 Jul 2010 06:54:01 +0000 (16:54 +1000)]
runtime: fix bug introduced in revision 4a01b8d28570

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

14 years agonet: implement windows version of LookupHost/Port/SRV
Wei Guangjing [Thu, 29 Jul 2010 04:58:28 +0000 (14:58 +1000)]
net: implement windows version of LookupHost/Port/SRV

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

14 years agotest/sigchld.go: use syscall.Kill instead of a combination
Vinu Rajashekhar [Thu, 29 Jul 2010 01:26:29 +0000 (18:26 -0700)]
test/sigchld.go: use syscall.Kill instead of a combination
of syscall.Syscall and syscall.SYS_KILL.

In RTEMS, there is no syscall.Syscall support, but it does
support POSIX signals. So, if this testcase is changed to use
syscall.Kill, then it would run fine on RTEMS, when using gccgo.

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

14 years agogc: fix SIGBUS
Russ Cox [Thu, 29 Jul 2010 01:21:50 +0000 (18:21 -0700)]
gc: fix SIGBUS

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

14 years agohttp: add https client support
Fazlul Shahriar [Thu, 29 Jul 2010 01:13:56 +0000 (18:13 -0700)]
http: add https client support

Fixes #851.

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

14 years agofmt: move comment into doc.go.
Rob Pike [Wed, 28 Jul 2010 20:11:22 +0000 (13:11 -0700)]
fmt: move comment into doc.go.
Fix the documentation of newline handling in *f routines
to match the implementation.

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

14 years agoio: MultiReader and MultiWriter
Brad Fitzpatrick [Wed, 28 Jul 2010 18:30:00 +0000 (11:30 -0700)]
io: MultiReader and MultiWriter

Little helpers I've found useful.

R=adg, rsc, r, gri
CC=golang-dev
https://golang.org/cl/1764043

14 years agoarm: fix build (dodgy floats)
Kai Backman [Wed, 28 Jul 2010 13:33:52 +0000 (16:33 +0300)]
arm: fix build (dodgy floats)

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

14 years agoarm: minor bugfixes.
Kai Backman [Wed, 28 Jul 2010 12:58:35 +0000 (15:58 +0300)]
arm: minor bugfixes.

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

14 years ago5g: fix build
Russ Cox [Tue, 27 Jul 2010 20:43:58 +0000 (13:43 -0700)]
5g: fix build

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

14 years agobufio: fix optimisation test
Andrew Gerrand [Tue, 27 Jul 2010 07:22:45 +0000 (17:22 +1000)]
bufio: fix optimisation test

Fixes #949.

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

14 years agonet: add nil checks to several String methods to avoid panics
Andrew Gerrand [Tue, 27 Jul 2010 07:22:22 +0000 (17:22 +1000)]
net: add nil checks to several String methods to avoid panics

Fixes #945.

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

14 years agobytes, strings: mention the n < 0 case in Split/SplitAfter doc comment
Andrew Gerrand [Tue, 27 Jul 2010 05:06:08 +0000 (15:06 +1000)]
bytes, strings: mention the n < 0 case in Split/SplitAfter doc comment

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

14 years agospec: add recover to predeclared identifiers list
Andrew Gerrand [Tue, 27 Jul 2010 05:03:30 +0000 (15:03 +1000)]
spec: add recover to predeclared identifiers list

R=gri
CC=golang-dev
https://golang.org/cl/1894043

14 years agodashboard: more aggressive caching for project/package pages
Andrew Gerrand [Tue, 27 Jul 2010 05:02:44 +0000 (15:02 +1000)]
dashboard: more aggressive caching for project/package pages

Plus automatic package<->project association script.
(This is just a helper script for now. I intend to fully automate
the associations further down the track.)

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

14 years agogc: include signal.h (fix build)
Russ Cox [Tue, 27 Jul 2010 01:41:36 +0000 (18:41 -0700)]
gc: include signal.h (fix build)

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

14 years agogodoc: accept '.', '!', and '?' as end of first sentence of package documentation
Robert Griesemer [Tue, 27 Jul 2010 00:34:40 +0000 (17:34 -0700)]
godoc: accept '.', '!', and '?' as end of first sentence of package documentation

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

14 years agogc: more crash avoidance
Russ Cox [Tue, 27 Jul 2010 00:34:17 +0000 (17:34 -0700)]
gc: more crash avoidance

Fixes #961.
Fixes #962.

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

14 years ago6l: more invalid input files
Russ Cox [Tue, 27 Jul 2010 00:34:02 +0000 (17:34 -0700)]
6l: more invalid input files

Fixes #963.
Fixes #964.

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

14 years agocodereview: avoid crash if no config
Russ Cox [Tue, 27 Jul 2010 00:33:50 +0000 (17:33 -0700)]
codereview: avoid crash if no config

Fixes #959.

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

14 years agogc: graceful exit on seg fault
Russ Cox [Mon, 26 Jul 2010 23:52:51 +0000 (16:52 -0700)]
gc: graceful exit on seg fault

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

14 years agofmt.Scanf: handle trailing spaces.
Rob Pike [Mon, 26 Jul 2010 23:38:35 +0000 (16:38 -0700)]
fmt.Scanf: handle trailing spaces.
Fixes #954.

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

14 years agoruntime: fix goc2c for rename to goc2c and *.goc
Peter Mundy [Mon, 26 Jul 2010 23:21:27 +0000 (16:21 -0700)]
runtime: fix goc2c for rename to goc2c and *.goc

Release 2010-04-27. runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo.

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

14 years agonet: TCPConn.SetNoDelay, back by popular demand
Russ Cox [Mon, 26 Jul 2010 23:19:39 +0000 (16:19 -0700)]
net: TCPConn.SetNoDelay, back by popular demand

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

14 years agogodoc: display synopses for all packages that have some kind of documentation.
Robert Griesemer [Mon, 26 Jul 2010 22:27:42 +0000 (15:27 -0700)]
godoc: display synopses for all packages that have some kind of documentation.

Fixes #953.

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

14 years agogc: fix smaller-than-pointer-sized receivers in interfaces
Russ Cox [Mon, 26 Jul 2010 22:25:10 +0000 (15:25 -0700)]
gc: fix smaller-than-pointer-sized receivers in interfaces

Fixes #812.

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

14 years agogc: import dot shadowing bug
Russ Cox [Mon, 26 Jul 2010 21:21:39 +0000 (14:21 -0700)]
gc: import dot shadowing bug

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

14 years agosyscall: add windows version of Pipe()
Wei Guangjing [Mon, 26 Jul 2010 05:55:01 +0000 (15:55 +1000)]
syscall: add windows version of Pipe()

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

14 years agoprof: fix typo in usage string
Andrew Gerrand [Mon, 26 Jul 2010 04:46:53 +0000 (14:46 +1000)]
prof: fix typo in usage string

Fixes #948.

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

14 years agoA+C: Wei Guangjing
Andrew Gerrand [Mon, 26 Jul 2010 03:44:32 +0000 (13:44 +1000)]
A+C: Wei Guangjing

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1899041

14 years agonet: fix crashing Read/Write when passed empty slice on windows
Alex Brainman [Mon, 26 Jul 2010 02:50:03 +0000 (12:50 +1000)]
net: fix crashing Read/Write when passed empty slice on windows

Fixes #921.

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

14 years agosyscall: improve windows errno handling
Alex Brainman [Mon, 26 Jul 2010 00:24:48 +0000 (10:24 +1000)]
syscall: improve windows errno handling

R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045

14 years agofix windows Make.cmd:
Alex Brainman [Sun, 25 Jul 2010 23:55:25 +0000 (09:55 +1000)]
fix windows Make.cmd:
- TARG had extra space at the end;
- it should be set before "all" target.

R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1846042

14 years agosyscall: add ForkExec, Syscall12 on Windows
Daniel Theophanes [Sun, 25 Jul 2010 23:43:35 +0000 (09:43 +1000)]
syscall: add ForkExec, Syscall12 on Windows

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

14 years agoruntime/extern.go: clear a small error in a comment.
Vinu Rajashekhar [Sun, 25 Jul 2010 02:10:21 +0000 (19:10 -0700)]
runtime/extern.go: clear a small error in a comment.

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

14 years agobytes: port IndexFunc and LastIndexFunc from strings package
Fazlul Shahriar [Fri, 23 Jul 2010 19:34:35 +0000 (12:34 -0700)]
bytes: port IndexFunc and LastIndexFunc from strings package

This CL basically applies the same changes as

http://code.google.com/p/go/source/detail?r=5e0a29014e8e

but for bytes package.

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

14 years agomisc/vim: updated syntax file to recognize constants of the form 1e9
Petar Maymounkov [Fri, 23 Jul 2010 01:33:17 +0000 (11:33 +1000)]
misc/vim: updated syntax file to recognize constants of the form 1e9

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

14 years agolibmach: correct handling of .5 files with D_REGREG addresses
Russ Cox [Thu, 22 Jul 2010 16:00:34 +0000 (09:00 -0700)]
libmach: correct handling of .5 files with D_REGREG addresses
undo workaround in gc

Fixes #943.

R=kaib
CC=golang-dev
https://golang.org/cl/1889041

14 years agofix build
Russ Cox [Thu, 22 Jul 2010 15:55:56 +0000 (08:55 -0700)]
fix build

bug introduced in https://golang.org/cl/1886043

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

14 years agotest: fail is for bad exit status only
Russ Cox [Thu, 22 Jul 2010 15:54:32 +0000 (08:54 -0700)]
test: fail is for bad exit status only

R=kaib
CC=golang-dev
https://golang.org/cl/1847043

14 years agobuild: clean.bash to check that GOOS and GOARCH are set
Andrew Gerrand [Thu, 22 Jul 2010 00:15:36 +0000 (10:15 +1000)]
build: clean.bash to check that GOOS and GOARCH are set

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

14 years agogotest: fix the glob pattern in the top-of-file comment
Micah Stetson [Thu, 22 Jul 2010 00:07:26 +0000 (10:07 +1000)]
gotest: fix the glob pattern in the top-of-file comment

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

14 years agold: various bug fixes
Russ Cox [Wed, 21 Jul 2010 20:44:49 +0000 (13:44 -0700)]
ld: various bug fixes

Fixes #937.
Fixes #938.
Fixes #939.
Fixes #940.

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

14 years agostrings.Bytes: fix typo in comment
Andrey Mirtchovski [Wed, 21 Jul 2010 19:01:15 +0000 (12:01 -0700)]
strings.Bytes: fix typo in comment

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

14 years agoio: Avoid another race condition in pipes.
Ian Lance Taylor [Wed, 21 Jul 2010 17:57:46 +0000 (10:57 -0700)]
io: Avoid another race condition in pipes.

Goroutine 1:
  Call Read on read half of pipe, entering pipeHalf.rw.
  Check ioclosed field, which is false.
  Send data to p.c1
  Wait for response on p.c2.

Goroutine 2:
  Call Close on read half of pipe, entering pipeHalf.close.
  Set closed field.
  Send error to p.cclose.
  Set ioclosed field.
  Send 1 to p.done.
  Return and exit goroutine.

Goroutine 3:
  This is the goroutine running pipe.run, and for some reason
  it has started late.
  Read error from p.rclose; set rerr and continue.
  Read 1 from p.done; increment ndone and continue.
  Read data from r1 (sent by goroutine 1); set r1 = nil and continue

Now goroutine 1 is waiting for a response, and goroutine 3 is
waiting for something else to happen.

This patch fixes the race by having the runner check whether
the read half is closed when it is asked for read data, and
similarly for the corresponding race on the write half.

This patch also fixes the similar race in which ndone gets
bumped up to 2 while there is a reader or writer waiting.

There is still another race to fix.  It is possible for the
read half and the write half to both be closed, and for the
runner goroutine to exit, all before the runner goroutine sees
the request from a reader.  E.g., in the above, have goroutine
2 also close the write half, and have goroutine 3 see both
done messages before it sees the request from goroutine 1.

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

14 years agosyscall: On Windows, Errstr FormatMessage has no values to insert.
Peter Mundy [Wed, 21 Jul 2010 16:40:08 +0000 (09:40 -0700)]
syscall: On Windows, Errstr FormatMessage has no values to insert.

For the Windows version of syscall Errstr, set the
FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage
Flags argument when there are no values to insert.

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

14 years agocrypto/tls: add client-side SNI support and PeerCertificates.
Adam Langley [Wed, 21 Jul 2010 15:36:01 +0000 (11:36 -0400)]
crypto/tls: add client-side SNI support and PeerCertificates.

SNI (Server Name Indication) is a way for a TLS client to
indicate to the server which name it knows the server by. This
allows the server to have several names and return the correct
certificate for each (virtual hosting).

PeerCertificates returns the list of certificates presented by
server.

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

14 years ago crypto/ocsp: add package to parse OCSP responses.
Adam Langley [Wed, 21 Jul 2010 14:07:22 +0000 (10:07 -0400)]
crypto/ocsp: add package to parse OCSP responses.

        OCSP is the preferred X.509 revocation mechanism. X.509 certificates
        can contain a URL from which can be fetched a signed response saying
        "this certificate is valid until $x" (where $x is usually 7 days in the
        future). These are called OCSP responses and they can also be included
        in the TLS handshake itself ("OCSP stapling")

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

14 years agoarm: fic build3, disable flaky 64 bit test
Kai Backman [Wed, 21 Jul 2010 12:59:11 +0000 (15:59 +0300)]
arm: fic build3, disable flaky 64 bit test

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

14 years agoarm: fix build2, tweak test/nul1.go arm exclusion
Kai Backman [Wed, 21 Jul 2010 11:51:03 +0000 (14:51 +0300)]
arm: fix build2, tweak test/nul1.go arm exclusion

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

14 years agoarm: fix build by disabling list copying optimization for 5g.
Kai Backman [Wed, 21 Jul 2010 11:14:21 +0000 (14:14 +0300)]
arm: fix build by disabling list copying optimization for 5g.

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

14 years agoos: change comment on O_APPEND to be more accurate
Andrew Gerrand [Wed, 21 Jul 2010 07:11:28 +0000 (17:11 +1000)]
os: change comment on O_APPEND to be more accurate

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

14 years agonet(windows): properly handle EOF in (*netFD).Read().
Alex Brainman [Wed, 21 Jul 2010 06:51:07 +0000 (23:51 -0700)]
net(windows): properly handle EOF in (*netFD).Read().

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

14 years agogc: various bug fixes
Russ Cox [Wed, 21 Jul 2010 06:45:33 +0000 (23:45 -0700)]
gc: various bug fixes

Fixes #935.
Fixes #936.
Fixes #941.

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

14 years agobytes: add Title
Rob Pike [Wed, 21 Jul 2010 02:53:59 +0000 (19:53 -0700)]
bytes: add Title

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

14 years agogobs: fix bug in singleton arrays
Rob Pike [Wed, 21 Jul 2010 02:53:28 +0000 (19:53 -0700)]
gobs: fix bug in singleton arrays
Fixes #934.

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

14 years agogofmt: fix some linebreak issues
Robert Griesemer [Tue, 20 Jul 2010 16:29:31 +0000 (09:29 -0700)]
gofmt: fix some linebreak issues

- don't lose empty lines after labels
- canonicalize number of line breaks
- gofmt src misc, fixes a couple of irregular breaks

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

14 years agofix build
Kai Backman [Tue, 20 Jul 2010 13:20:35 +0000 (16:20 +0300)]
fix build

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

14 years agomore soft float support. passes several basic tests
Kai Backman [Tue, 20 Jul 2010 12:53:16 +0000 (15:53 +0300)]
more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

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

14 years agogccgo_install.html: Description of the port to RTEMS added.
Vinu Rajashekhar [Tue, 20 Jul 2010 07:06:20 +0000 (00:06 -0700)]
gccgo_install.html: Description of the port to RTEMS added.

R=iant, r
CC=gofrontend-dev, golang-dev, joel.sherrill
https://golang.org/cl/1846047

14 years agostrings: add Title
Rob Pike [Tue, 20 Jul 2010 07:03:59 +0000 (00:03 -0700)]
strings: add Title
strings.ToTitle converts all characters to title case, which for consistency with the
other To* functions it should continue to do.  This CL adds string.Title, which
does a proper title-casing of the string.
A similar function for package bytes will follow once this is settled.
Fixes #933.

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

14 years agochange floating literal normalization
Ken Thompson [Mon, 19 Jul 2010 23:10:46 +0000 (16:10 -0700)]
change floating literal normalization
from word-oriented to bit-oriented.
this will increase fp literal precision
by up to a full word.

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

14 years agotabwriter: fix a comment to fix godoc output
Robert Griesemer [Mon, 19 Jul 2010 18:33:11 +0000 (11:33 -0700)]
tabwriter: fix a comment to fix godoc output

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

14 years ago asn1: Enumerated, Flag and GeneralizedTime support.
Adam Langley [Mon, 19 Jul 2010 15:11:40 +0000 (11:11 -0400)]
asn1: Enumerated, Flag and GeneralizedTime support.

        Add support for ASN.1 ENUMERATED types.

        Add a magic type, asn1.Flag, for the cases where the presence of an
        empty explicit tag is semantically meaningful.

        Add support for GeneralizedTime.

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

14 years agotime: fix parsing of minutes in time zones.
Adam Langley [Mon, 19 Jul 2010 15:08:04 +0000 (11:08 -0400)]
time: fix parsing of minutes in time zones.

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

14 years agominor error checking to android launcher
Kai Backman [Mon, 19 Jul 2010 08:43:33 +0000 (11:43 +0300)]
minor error checking to android launcher

R=dho
CC=golang-dev
https://golang.org/cl/1777041