- 18 Oct, 2016 15 commits
-
-
Russ Cox authored
Fixes #14139. Change-Id: I6d2181720c38582b3d2160e94c7593a6cb4fc60f Reviewed-on: https://go-review.googlesource.com/31321Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
cmd.StdinPipe returns an io.WriteCloser. It's reasonable to expect the caller not to call Write and Close simultaneously, but there is an implicit Close in cmd.Wait that's not obvious. We already synchronize the implicit Close in cmd.Wait against any explicit Close from the caller. Also synchronize that implicit Close against any explicit Write from the caller. Fixes #9307. Change-Id: I8561e9369d6e5ac88dfbca1175549f6dfa04b8ac Reviewed-on: https://go-review.googlesource.com/31148Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
In the zero Time, the (not user visible) nil *Location indicates UTC. In the result of t.UTC() and other ways to create times in specific zones, UTC is indicated by a non-nil *Location, specifically &utcLoc. This creates a representation ambiguity exposed by comparison with == or reflect.DeepEqual or the like. Change time.Time representation to use only nil, never &utcLoc, to represent UTC. This eliminates the ambiguity. Fixes #15716. Change-Id: I7dcc2c20ce6b073e1daae323d3e49d17d1d52802 Reviewed-on: https://go-review.googlesource.com/31144Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
This change documents that the InterfaceAddrs function is less usable on multi-homed IP nodes because of the lack of network interface identification information. Also updates documentation on exposed network interface API. Fixes #14518. Change-Id: I5e86606f8019ab475eb5d385bd797b052cba395d Reviewed-on: https://go-review.googlesource.com/31371Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Theophanes authored
Creates a ColumnType structure that can be extended in to future. Allow drivers to implement what makes sense for the database. Fixes #16652 Change-Id: Ieb1fd64eac1460107b1d3474eba5201fa300a4ec Reviewed-on: https://go-review.googlesource.com/29961 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Martin Möhrmann authored
Check for and call the special printing and format methods such as String at printing depth 0 when printing the concrete value of a reflect.Value. Fixes: #16015 Change-Id: I23bd2927255b60924e5558321e98dd4a95e11c4c Reviewed-on: https://go-review.googlesource.com/30753Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
This CL changes how the http1 Server reads from the client. The goal of this change is to make the Request.Context given to Server Handlers become done when the TCP connection dies (has seen any read or write error). I didn't finish that for Go 1.7 when Context was added to http package. We can't notice the peer disconnect unless we're blocked in a Read call, though, and previously we were only doing read calls as needed, when reading the body or the next request. One exception to that was the old pre-context CloseNotifier mechanism. The implementation of CloseNotifier has always been tricky. The past few releases have contained the complexity and moved the reading-from-TCP-conn logic into the "connReader" type. This CL extends connReader to make sure that it's always blocked in a Read call, at least once the request body has been fully consumed. In the process, this deletes all the old CloseNotify code and unifies it with the context cancelation code. The two notification mechanisms are nearly identical, except the CloseNotify path always notifies on the arrival of pipelined HTTP/1 requests. We might want to change that in a subsequent commit. I left a TODO for that. For now there's no change in behavior except that the context now cancels as it was supposed to. As a bonus that fell out for free, a Handler can now use CloseNotifier and Hijack together in the same request now. Fixes #15224 (make http1 Server always in a Read, like http2) Fixes #15927 (cancel context when underlying connection closes) Updates #9763 (CloseNotifier + Hijack) Change-Id: I972cf6ecbab7f1230efe8cc971e89f8e6e56196b Reviewed-on: https://go-review.googlesource.com/31173 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Adam Langley authored
This change enables the ChaCha20-Poly1305 cipher suites by default. This changes the default ClientHello and thus requires updating all the tests. Change-Id: I6683a2647caaff4a11f9e932babb6f07912cad94 Reviewed-on: https://go-review.googlesource.com/30958 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
GetConfigForClient allows the tls.Config to be updated on a per-client basis. Fixes #16066. Fixes #15707. Fixes #15699. Change-Id: I2c675a443d557f969441226729f98502b38901ea Reviewed-on: https://go-review.googlesource.com/30790 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #13737. Change-Id: Ib655dbf06f44709f687f8a2410c80f31e4075f13 Reviewed-on: https://go-review.googlesource.com/31322 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #16460. Change-Id: Ie9d5f725d2d7e8210ab6f7604a5a05fc49f707de Reviewed-on: https://go-review.googlesource.com/31331 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
It's the same as %#x not %x. Just a documentation change; tests already cover it. Fixes #17322 Change-Id: Ia9db229f781f9042ac5c0bb824e3d7a26fb74ec5 Reviewed-on: https://go-review.googlesource.com/31254Reviewed-by: Russ Cox <rsc@golang.org>
-
Alberto Donizetti authored
In addition to the DecimalConversion benchmark, that exercises the String method of the internal decimal type on a range of small shifts, add a few benchmarks for the big.Float String method. They can be used to obtain more realistic data on the real-world performance of big.Float printing. Change-Id: I7ada324e7603cb1ce7492ccaf3382db0096223ba Reviewed-on: https://go-review.googlesource.com/31275Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #17030. Change-Id: Ic7f237ac7553ae0176929056e64b01667ed59066 Reviewed-on: https://go-review.googlesource.com/31351 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Symonds authored
This will cause godoc to correctly render these docs, since go/doc.ToHTML requires no punctuation for headings. Change-Id: Ic95245147d3585f2ccc59d4424fcab17d2a5617b Reviewed-on: https://go-review.googlesource.com/31319Reviewed-by: Rob Pike <r@golang.org>
-
- 17 Oct, 2016 25 commits
-
-
Hiroshi Ioka authored
Fixes #17461 Change-Id: I9954f6ae46c7e15560d7460841be8f2bc37233a9 Reviewed-on: https://go-review.googlesource.com/31121Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
The comments about pcln functions are obsolete since those functions now live in cmd/internal/obj. The copyright header is redundant with the existing one at the top of the file. Change-Id: I568fd3d259253a0d8eb3b0a157d008df1b5de106 Reviewed-on: https://go-review.googlesource.com/31315Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Cherry Zhang authored
all.bash passes with -debugtramp=2 (except the unavoidable disassembly test as we change instructions). And successfully build k8s.io/kubernetes/cmd/hyperkube in both internal linking and external linking mode. Fixes #17028. Change-Id: Ic8fac6a394488155c5eba9215662db1c1086e24b Reviewed-on: https://go-review.googlesource.com/31143Reviewed-by: David Chase <drchase@google.com>
-
Adam Langley authored
Although an AEAD, in general, can be used concurrently in both the seal and open directions, TLS is easier. Since the transport keys are different for different directions in TLS, an AEAD will only ever be used in one direction. Thus we don't need separate buffers for seal and open because they can never happen concurrently. Also, fix the nonce size to twelve bytes since the fixed-prefix construction for AEADs is superseded and will never be used for anything else now. Change-Id: Ibbf6c6b1da0e639f4ee0e3604410945dc7dcbb46 Reviewed-on: https://go-review.googlesource.com/30959 Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
This reverts commit c6185aa6. That commit seems to be causing flaky failures on the builders. See discussion on the original thread: https://golang.org/cl/25159. Change-Id: I26e72d962d4efdcee28a0bc61a53f246b046df77 Reviewed-on: https://go-review.googlesource.com/31316 Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Adam Langley authored
This change adds support for the ChaCha20-Poly1305 AEAD to crypto/tls, as specified in https://tools.ietf.org/html/rfc7905. Fixes #15499. Change-Id: Iaa689be90e03f208c40b574eca399e56f3c7ecf1 Reviewed-on: https://go-review.googlesource.com/30957 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
This change updates the vendored chacha20poly1305 package to match revision 14f9af67c679edd414f72f13d67c917447113df2 of x/crypto. Change-Id: I05a4ba86578b0f0cdb1ed7dd50fee3b38bb48cf5 Reviewed-on: https://go-review.googlesource.com/31312 Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Chris Broadfoot authored
Change-Id: I34b3650ee9512879ff7528336813a7850c46ea90 Reviewed-on: https://go-review.googlesource.com/31311Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
This reverts commit 395d36a6. Appears to be responsible for builder failures. Change-Id: Ic6c6307f662767e529060b88704a9f074785d99e Reviewed-on: https://go-review.googlesource.com/31310 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Russ Cox authored
This is needed for some of the more complex primality tests (to filter out exact squares), and while the code is simple the boundary conditions are not obvious, so it seems worth having in the library. Change-Id: Ica994a6b6c1e412a6f6d9c3cf823f9b653c6bcbd Reviewed-on: https://go-review.googlesource.com/30706 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Lynn Boger authored
Correcting a line in asm_ppc64x.s in the cmpbodyLE function that originally was R14 but accidentally changed to R4. Fixes #17488 Change-Id: Id4ca6fb2e0cd81251557a0627e17b5e734c39e01 Reviewed-on: https://go-review.googlesource.com/31266Reviewed-by: Michael Munday <munday@ca.ibm.com> Run-TryBot: Michael Munday <munday@ca.ibm.com>
-
Michael Munday authored
Adds the new canMergeLoad function which can be used by rules to decide whether a load can be merged into an operation. The function ensures that the merge will not reorder the load relative to memory operations (for example, stores) in such a way that the block can no longer be scheduled. This new function enables transformations such as: MOVD 0(R1), R2 ADD R2, R3 to: ADD 0(R1), R3 The two-operand form of the following instructions can now read a single memory operand: - ADD - ADDC - ADDW - MULLD - MULLW - SUB - SUBC - SUBE - SUBW - AND - ANDW - OR - ORW - XOR - XORW Improves SHA3 performance by 6-8%. Updates #15054. Change-Id: Ibcb9122126cd1a26f2c01c0dfdbb42fe5e7b5b94 Reviewed-on: https://go-review.googlesource.com/29272 Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
Inspired by Alberto Donizetti's observations in https://go-review.googlesource.com/#/c/30099/. name old time/op new time/op delta DecimalConversion-8 138µs ± 1% 136µs ± 2% -1.85% (p=0.000 n=10+10) 10 runs each, measured on a Mac Mini, 2.3 GHz Intel Core i7. Performance improvements varied between -1.25% to -4.4%; -1.85% is about in the middle of the observed improvement. The generated code is slightly shorter in the inner loops of the conversion code. Change-Id: I10fb3b2843da527691c39ad5e5e5bd37ed63e2fa Reviewed-on: https://go-review.googlesource.com/31250Reviewed-by: Alan Donovan <adonovan@google.com>
-
Austin Clements authored
GC assists retry if preempted or if they fail to park. However, on the retry path they currently use stale statistics. In particular, the retry can use "debtBytes", but debtBytes isn't updated when the debt changes (since other than retries it is only used once). Also, though less of a problem, the if the assist ratio has changed while the assist was blocked, the retry will still use the old assist ratio. Fix all of this by simply making the retry jump back to where we compute these statistics, rather than just after. Change-Id: I2ed8b4f0fc9f008ff060aa926f4334b662ac7d3f Reviewed-on: https://go-review.googlesource.com/30701Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
This puts all of the assist queue-related code together and makes it easier to modify how the assist queue works. Change-Id: Id54e06702bdd5a5dd3fef2ce2c14cd7ca215303c Reviewed-on: https://go-review.googlesource.com/30700Reviewed-by: Rick Hudson <rlh@golang.org>
-
Keith Randall authored
It's pretty simple. For: e = (interface{})(i) Do: tmp = i.itab if tmp != nil { tmp = tmp.typ_ // load type from itab } e = eface{tmp, i.data} It is smaller and faster than calling the runtime. Change-Id: I0ad27f62f4ec0b6cd53bc8530e4da0eae3e67a6c Reviewed-on: https://go-review.googlesource.com/31260 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Austin Clements authored
getArgInfo for reflect.makeFuncStub and reflect.methodValueCall is necessarily special. These have dynamically determined argument maps that are stored in their context (that is, their *funcval). These functions are written to store this context at 0(SP) when called, and getArgInfo retrieves it from there. This technique works if getArgInfo is passed an active call frame for one of these functions. However, getArgInfo is also used in tracebackdefers, where the "call" is not a true call with an active stack frame, but a deferred call. In this situation, getArgInfo currently crashes because tracebackdefers passes a frame with sp set to 0. However, the entire approach used by getArgInfo is flawed in this situation because the wrapper has not actually executed, and hence hasn't saved this metadata to any stack frame. In the defer case, we know the *funcval from the _defer itself, so we can fix this by teaching getArgInfo to use the *funcval context directly when its available, and otherwise get it from the active call frame. While we're here, this commit simplifies getArgInfo a bit by making it play more nicely with the type system. Rather than decoding the *reflect.methodValue that is the wrapper's context as a *[2]uintptr, just write out a copy of the reflect.methodValue type in the runtime. Fixes #16331. Fixes #17471. Change-Id: I81db4d985179b4a81c68c490cceeccbfc675456a Reviewed-on: https://go-review.googlesource.com/31138 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Austin Clements authored
If morestack runs on the g0 or gsignal stack, it currently performs some abort operation that typically produces a signal (e.g., it does an INT $3 on x86). This is useful if you're running in a debugger, but if you're not, the runtime tries to trap this signal, which is likely to send the program into a deeper spiral of collapse and lead to very confusing diagnostic output. Help out people trying to debug without a debugger by making morestack print an informative message before blowing up. Change-Id: I2814c64509b137bfe20a00091d8551d18c2c4749 Reviewed-on: https://go-review.googlesource.com/31133 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Per discussion on #12808, it's a bit odd that if you do CGO_ENABLED=0 ./make.bash then you get a toolchain that still tries to use cgo. So make the CGO_ENABLED setting propagate into the resulting toolchain as the default setting for that environment variable, like we do with other variables like CC and GOROOT. No reasonable way to test automatically, but I did test by hand that after the above command, 'go env' shows CGO_ENABLED=0; before it showed CGO_ENABLED=1. Fixes #12808. Change-Id: I26a2fa6cc00e73bde8af7469270b27293392ed71 Reviewed-on: https://go-review.googlesource.com/31141 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Lynn Boger authored
This improves the performance for byte.Compare by rewriting the cmpbody function in runtime/asm_ppc64x.s. The previous code had a simple loop which loaded a pair of bytes and compared them, which is inefficient for long buffers. The updated function checks for 8 or 32 byte chunks and then loads and compares double words where possible. Because the byte.Compare result indicates greater or less than, the doubleword loads must take endianness into account, using a byte reversed load in the little endian case. Fixes #17433 benchmark old ns/op new ns/op delta BenchmarkBytesCompare/8-16 13.6 7.16 -47.35% BenchmarkBytesCompare/16-16 25.7 7.83 -69.53% BenchmarkBytesCompare/32-16 38.1 7.78 -79.58% BenchmarkBytesCompare/64-16 63.0 10.6 -83.17% BenchmarkBytesCompare/128-16 112 13.0 -88.39% BenchmarkBytesCompare/256-16 211 28.1 -86.68% BenchmarkBytesCompare/512-16 410 38.6 -90.59% BenchmarkBytesCompare/1024-16 807 60.2 -92.54% BenchmarkBytesCompare/2048-16 1601 103 -93.57% Change-Id: I121acc74fcd27c430797647b8d682eb0607c63eb Reviewed-on: https://go-review.googlesource.com/30949Reviewed-by: David Chase <drchase@google.com>
-
Quentin Smith authored
To match the language spec, strconv.Unquote needs to strip carriage returns from the raw string. Also fixes TestUnquote to not be a noop. Fixes #15997 Change-Id: I2456f50f2ad3830f37e545f4f6774ced9fe609d7 Reviewed-on: https://go-review.googlesource.com/31210Reviewed-by: Robert Griesemer <gri@golang.org>
-
Michael Munday authored
The assembly in math/big may contain instructions that the bootstrap compiler does not support. Disable it using the math_big_pure_go build tag. Fixes #17484. Change-Id: I766cab6a888721ab4ed76ebdbfc87ad4e919ec41 Reviewed-on: https://go-review.googlesource.com/31142 Run-TryBot: Michael Munday <munday@ca.ibm.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
The relevant benchmark (on an Intel i7-4510U machine): name old time/op new time/op delta FormatFloat/Slowpath64-4 68.6µs ± 0% 44.1µs ± 2% -35.71% (p=0.000 n=13+15) Change-Id: I67eb0e81ce74ed57752d0280059f91419f09e93b Reviewed-on: https://go-review.googlesource.com/30099Reviewed-by: Robert Griesemer <gri@golang.org>
-
Adam Langley authored
This change imports the chacha20poly1305 and poly1305 packages from x/crypto at 5f4e837b98443e9e7a65072235205993af565d85. These packages will be used to support the ChaCha20-Poly1305 AEAD in crypto/tls. Change-Id: I1a38d671ef9aeff3bc41e3924655883d465a5617 Reviewed-on: https://go-review.googlesource.com/30956Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Sometimes .git is a plain file; maybe others will follow. This CL matches CL 21430, made in x/tools/go/vcs. The change in the Swift test case makes the test case pass by changing the test to match current behavior, which I assume is better than the reverse. (The test only runs locally and without -short, so the builders are not seeing this particular failure.) For #10322. Change-Id: Iccd08819a01c5609a2880b9d8a99af936e20faff Reviewed-on: https://go-review.googlesource.com/30948 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-