RFC 2616, section 7.2.1 - empty type SHOULD be treated as
application/octet-stream.
Fixes#6616.
R=golang-codereviews, gobot, bradfitz, josharian
CC=golang-codereviews
https://golang.org/cl/31810043
Expand the type's doc comment to make its purpose clear
and discourage misuse.
R=golang-codereviews, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/44680043
And merge the blackhole.go file back into ioutil,
where it once was. It was only in a separate file
because it used to have race-vs-!race versions.
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/44060044
The practice of storing reference connections for testing has worked
reasonably well, but the large blocks of literal data in the .go files
is ugly and updating the tests is a real problem because their number
has grown.
This CL changes the way that reference tests work. It's now possible to
automatically update the tests and the test data is now stored in
testdata/. This should make it easier to implement changes that affect
all connections, like implementing the renegotiation extension.
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/42060044
Per RFC 4291, 'The use of "::" indicates one or more groups of 16 bits of zeros.'
Fixes#6628
R=golang-dev, rsc, minux.ma, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/15990043
Needed for precise gc and copying stacks.
reflect.Value now takes 4 words instead of 3.
Still to do:
- un-iword-ify channel ops.
- un-iword-ify method receivers.
R=golang-dev, iant, rsc, khr
CC=golang-dev
https://golang.org/cl/43040043
Notably, to show allocs. Currently: 11766 B/op, 21 allocs/op,
at least one alloc of which is in the benchmark loop itself.
R=golang-dev, jnewlin
CC=golang-dev
https://golang.org/cl/40370057
The runtime tests are executed 4 times in all.bash
and there is currently a 5-second delay each time.
R=golang-dev, minux.ma, khr, bradfitz
CC=golang-dev
https://golang.org/cl/42450043
The code is all about tags, and the cmd/go documentation
said to look in the go/build documentation for information
about tags, but the documentation said nothing about tags,
only build constraints. Make things clearer.
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/44100043
Since SHA-256 is now the default hash function, x509 should import it
otherwise some programs may fail because it hasn't been linked in.
R=golang-dev, dave, minux.ma
CC=golang-dev
https://golang.org/cl/44010047
On the plus side, we don't need to change the bits when mallocing
pointerless objects. On the other hand, we need to mark objects in the
free lists during GC. But the free lists are small at GC time, so it
should be a net win.
benchmark old ns/op new ns/op delta
BenchmarkMalloc8 40 33 -17.65%
BenchmarkMalloc16 45 38 -15.72%
BenchmarkMallocTypeInfo8 58 59 +0.85%
BenchmarkMallocTypeInfo16 63 64 +1.10%
R=golang-dev, rsc, dvyukov
CC=cshapiro, golang-dev
https://golang.org/cl/41040043
Benchmark is within the noise. I had to run this a dozen times
each before & after (on wall power, without a browser running)
before I could get halfway consistent numbers, and even then
they jumped all over the place, with the new one sometimes
being better. But these are the best of a dozen each.
Slowdown is expected anyway, since I imagine channels are
optimized more.
benchmark old ns/op new ns/op delta
BenchmarkCodeEncoder 26556987 27291072 +2.76%
BenchmarkEncoderEncode 1069 1071 +0.19%
benchmark old MB/s new MB/s speedup
BenchmarkCodeEncoder 73.07 71.10 0.97x
benchmark old allocs new allocs delta
BenchmarkEncoderEncode 2 2 0.00%
benchmark old bytes new bytes delta
BenchmarkEncoderEncode 221 221 0.00%
Update #4720
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/37720047
sequences.
Use the same criteria for when to modify the tag type when
parsing a string in a sequence as when parsing a bare string
field.
Fixes#6726.
R=golang-dev, bradfitz, gobot, agl
CC=golang-dev
https://golang.org/cl/22460043
Float32 and Float64 are now both created by taking the ratio
of two integers which are chosen to fit entirely into the
precision of the desired float type. The previous code
could cast a Float64 with more than 23 bits of ".99999"
into a Float32 of 1.0, which is not in [0,1).
Float32 went from 15 to 21 ns/op (but is now correct).
Fixes#6721.
R=golang-dev, iant, rsc
CC=golang-dev
https://golang.org/cl/22730043
Adds the Pool type and docs, and use it in fmt.
This is a temporary implementation, until Dmitry
makes it fast.
Uses the API proposal from Russ in http://goo.gl/cCKeb2 but
adds an optional New field, as used in fmt and elsewhere.
Almost all callers want that.
Update #4720
R=golang-dev, rsc, cshapiro, iant, r, dvyukov, khr
CC=golang-dev
https://golang.org/cl/41860043
Previously the hash used when signing an X.509 certificate was fixed
and, for RSA, it was fixed to SHA1. Since Microsoft have announced the
deprecation of SHA1 in X.509 certificates, this change switches the
default to SHA256.
It also allows the hash function to be controlled by the caller by
setting the SignatureAlgorithm field of the template.
[1] http://blogs.technet.com/b/pki/archive/2013/11/12/sha1-deprecation-policy.aspxFixes#5302.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/40720047
The set of certs fetched via exec'ing `security` is not quite identical
to the certs fetched via the cgo call. The cgo fetch includes
any trusted root certs that the user may have added; exec does not.
The exec fetch includes an Apple-specific root cert; the cgo fetch
does not. Other than that, they appear to be the same.
Unfortunately, os/exec depends on crypto/x509, via net/http. Break the
circular dependency by moving the exec tests to their own package.
This will not work in iOS; we'll cross that bridge when we get to it.
R=golang-dev, minux.ma, agl
CC=golang-dev
https://golang.org/cl/22020045
Don't make copies of keys while decoding, and don't use the
expensive strings.EqualFold when it's not necessary. Instead,
note in the existing field cache what algorithm to use to
check fold equality... most keys are just ASCII letters.
benchmark old ns/op new ns/op delta
BenchmarkCodeDecoder 137074314 103974418 -24.15%
benchmark old MB/s new MB/s speedup
BenchmarkCodeDecoder 14.16 18.66 1.32x
Update #6496
R=golang-dev, rsc, adg, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/13894045
Because TestDNSThreadLimit consumes tons of file descriptors and
makes other tests flaky when CGO_ENABLE=0 or being with netgo tag.
Fixes#6580.
R=golang-dev, bradfitz, adg, minux.ma
CC=golang-dev
https://golang.org/cl/14639044
Hash tables currently store an evacuated bit in the low bit
of the overflow pointer. That's probably not sustainable in the
long term as GC wants correctly typed & aligned pointers. It is
also a pain to move any of this code to Go in the current state.
This change moves the evacuated bit into the tophash entries.
Performance change is negligable.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14412043
gccgo has problems using reflect.Call with functions that take and
return structs with no members. Prior to fixing that problem there, I
thought it sensible to add some tests of this situation.
Update #6761
First contribution to Go, apologies in advance if I'm doing it wrong.
R=golang-dev, dave, minux.ma, iant, khr, bradfitz
CC=golang-dev
https://golang.org/cl/26570046