- 14 Jan, 2015 10 commits
-
-
Russ Cox authored
Normally, a panic/throw only shows the thread stack for the current thread and all paused goroutines. Goroutines running on other threads, or other threads running on their system stacks, are opaque. Change that when GODEBUG=crash, by passing a SIGQUIT around to all the threads when GODEBUG=crash. If this works out reasonably well, we might make the SIGQUIT relay part of the standard panic/throw death, perhaps eliding idle m's. Change-Id: If7dd354f7f3a6e326d17c254afcf4f7681af2f8b Reviewed-on: https://go-review.googlesource.com/2811Reviewed-by: Rick Hudson <rlh@golang.org>
-
David Crawshaw authored
Caught by go vet: asm_linux_arm.s:110: [arm] seek: wrong argument size 32; expected $...-28 Change-Id: I62ec5327a25bff9ef501c42cc1e28ea7ec78510f Reviewed-on: https://go-review.googlesource.com/2810Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitry Vyukov authored
There is a small possibility that runtime deadlocks when netpoll is just activated. Consider the following scenario: GOMAXPROCS=1 epfd=-1 (netpoll is not activated yet) A thread is in findrunnable, sets sched.lastpoll=0, calls netpoll(true), which returns nil. Now the thread is descheduled for some time. Then sysmon retakes a P from syscall and calls handoffp. The "If this is the last running P and nobody is polling network" check in handoffp fails, since the first thread set sched.lastpoll=0. So handoffp decides that there is already a thread that polls network and so it calls pidleput. Now the first thread is scheduled again, finds no work and calls stopm. There is no thread that polls network and so checkdead reports deadlock. To fix this, don't set sched.lastpoll=0 when netpoll is not activated. The deadlock can happen if cgo is disabled (-tag=netgo) and only on program startup (when netpoll is just activated). The test is from issue 5216 that lead to addition of the "If this is the last running P and nobody is polling network" check in handoffp. Update issue 9576. Change-Id: I9405f627a4d37bd6b99d5670d4328744aeebfc7a Reviewed-on: https://go-review.googlesource.com/2750Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
The old name was too ambiguous (is it a verb? is it a predicate? is it a constant?) and too close to debug.gccheckmark. Hopefully the new name conveys that this variable indicates that we are currently doing mark checking. Change-Id: I031cd48b0906cdc7774f5395281d3aeeb8ef3ec9 Reviewed-on: https://go-review.googlesource.com/2656Reviewed-by: Rick Hudson <rlh@golang.org>
-
Russ Cox authored
1) Move non-preemption check even earlier in newstack. This avoids a few priority inversion problems. 2) Always use atomic operations to update bitmap for 1-word objects. This avoids lost mark bits during concurrent GC. 3) Stop using work.nproc == 1 as a signal for being single-threaded. The concurrent GC runs with work.nproc == 1 but other procs are running mutator code. The use of work.nproc == 1 in getfull *is* safe, but remove it anyway, since it is saving only a single atomic operation per GC round. Fixes #9225. Change-Id: I24134f100ad592ea8cb59efb6a54f5a1311093dc Reviewed-on: https://go-review.googlesource.com/2745Reviewed-by: Rick Hudson <rlh@golang.org>
-
Russ Cox authored
Before: ... imports golang.org/x/net/context: /Users/rsc/g/src/golang.org/x/net is from https://code.google.com/p/go.net, should be from https://go.googlesource.com/net After: ... imports golang.org/x/net/context: golang.org/x/net is a custom import path for https://go.googlesource.com/net, but /Users/rsc/g/src/golang.org/x/net is checked out from https://code.google.com/p/go.net Change-Id: I93c35b85f955c7de684f71fbd4baecc717405318 Reviewed-on: https://go-review.googlesource.com/2808Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
David Crawshaw authored
Generated from a script using go vet then read by a human. Change-Id: Ie5f7ab3a1075a9c8defbf5f827a8658e3eb55cab Reviewed-on: https://go-review.googlesource.com/2746Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Nigel Tao authored
https://go-review.googlesource.com/#/c/1876/ introduced a new TestClipWithNilMP test, along with a code change that fixed a panic, but the existing TestClip test already contained almost enough machinery to cover that bug. There is a small code change in this CL, but it is a no-op: (*x).y is equivalent to x.y for a pointer-typed x, but the latter is cleaner. Change-Id: I79cf6952a4999bc4b91f0a8ec500acb108106e56 Reviewed-on: https://go-review.googlesource.com/2304Reviewed-by: Dave Cheney <dave@cheney.net>
-
Dave Cheney authored
Make auxv parsing in linux/arm less of a special case. * rename setup_auxv to sysargs * exclude linux/arm from vdso_none.go * move runtime.checkarm after runtime.sysargs so arm specific values are properly initialised Change-Id: I1ca7f5844ad5a162337ff061a83933fc9a2b5ff6 Reviewed-on: https://go-review.googlesource.com/2681Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
Fix SmartOS build that was broken in 68292290. SmartOS pretends to be Ubuntu/Debian with respect to its SSL certificate location. Change-Id: I5405c6472c8a1e812e472e7301bf6084c17549d6 Reviewed-on: https://go-review.googlesource.com/2704Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 13 Jan, 2015 7 commits
-
-
Alex Brainman authored
Change-Id: I4f84a89553f77382a8064f49db0f5eb575b64313 Reviewed-on: https://go-review.googlesource.com/2714Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Per https://golang.org/s/style#named-result-parameters Change-Id: If69d3e6d3dbef385a0f41e743fa49c25475ca40c Reviewed-on: https://go-review.googlesource.com/2761Reviewed-by: Adam Langley <agl@golang.org>
-
Martin Möhrmann authored
For some cases we can ensure the correct order of elements in two instead of three comparisons. It is unnecessary to compare m0 and m1 again if m2 and m1 are not swapped. benchmark old ns/op new ns/op delta BenchmarkSortString1K 302721 299590 -1.03% BenchmarkSortInt1K 124055 123215 -0.68% BenchmarkSortInt64K 12291522 12203402 -0.72% BenchmarkSort1e2 58027 57111 -1.58% BenchmarkSort1e4 12426805 12341761 -0.68% BenchmarkSort1e6 1966250030 1960557883 -0.29% Change-Id: I2b17ff8dee310ec9ab92a6f569a95932538768a9 Reviewed-on: https://go-review.googlesource.com/2614Reviewed-by: Robert Griesemer <gri@golang.org>
-
Ian Lance Taylor authored
Change-Id: I06881fc447a5fae0067557c317f69a0427bed337 Reviewed-on: https://go-review.googlesource.com/2760Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
Change-Id: Ib1a2adbcdbd7d96f9b4177abc3c9cf0ab09c1df4 Reviewed-on: https://go-review.googlesource.com/2716Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Andrew Gerrand authored
In the previous sandbox implementation we read all sandboxed output from standard output, and so all fake time writes were made to standard output. Now we have a more sophisticated sandbox server (see golang.org/x/playground/sandbox) that is capable of recording both standard output and standard error, so allow fake time writes to go to either file descriptor. Change-Id: I79737deb06fd8e0f28910f21f41bd3dc1726781e Reviewed-on: https://go-review.googlesource.com/2713Reviewed-by: Minux Ma <minux@golang.org>
-
Brad Fitzpatrick authored
Skip the allocation testing (which was only used as a signal for whether the interface was implemented by ResponseWriter), and just test for it directly. Fixes #9575 Change-Id: Ie230f1d21b104537d5647e9c900a81509d692469 Reviewed-on: https://go-review.googlesource.com/2720Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 12 Jan, 2015 10 commits
-
-
Rob Pike authored
Change-Id: I0e726a2c0fa1231011b183c3e917414d876555d8 Reviewed-on: https://go-review.googlesource.com/2700Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
Change-Id: I5a54a041cfe9ff2d9514f2d6596b53ec7fc91845 Reviewed-on: https://go-review.googlesource.com/2689Reviewed-by: Rob Pike <r@golang.org>
-
Paul van Brouwershaven authored
crypto/x509: Correction of incrorrect default version number in TBSCertificateList and Certificate.CreateCRL RFC5280 states: "This optional field describes the version of the encoded CRL. When extensions are used, as required by this profile, this field MUST be present and MUST specify version 2 (the integer value is 1)." This CL has been discussed at: http://golang.org/cl/172560043 Change-Id: I8a72d7593d5ca6714abe9abd6a37437c3b69ab0f Reviewed-on: https://go-review.googlesource.com/2259Reviewed-by: Adam Langley <agl@golang.org>
-
David Leon Gil authored
And add names for the curve implemented in crypto/elliptic. This permits a safer alternative to switching on BitSize for code that implements curve-dependent cryptosystems. (E.g., ECDSA on P-xxx curves with the matched SHA-2 instances.) Change-Id: I653c8f47506648028a99a96ebdff8389b2a95fc1 Reviewed-on: https://go-review.googlesource.com/2133Reviewed-by: Adam Langley <agl@golang.org>
-
Paul van Brouwershaven authored
According to RFC4055 a NULL parameter MUST be present in the signature algorithm. This patch adds the NULL value to the Signature Algorithm parameters in the signingParamsForPrivateKey function for RSA based keys. Section 2.1 states: "There are two possible encodings for the AlgorithmIdentifier parameters field associated with these object identifiers. The two alternatives arise from the loss of the OPTIONAL associated with the algorithm identifier parameters when the 1988 syntax for AlgorithmIdentifier was translated into the 1997 syntax. Later the OPTIONAL was recovered via a defect report, but by then many people thought that algorithm parameters were mandatory. Because of this history some implementations encode parameters as a NULL element while others omit them entirely. The correct encoding is to omit the parameters field; however, when RSASSA-PSS and RSAES-OAEP were defined, it was done using the NULL parameters rather than absent parameters. All implementations MUST accept both NULL and absent parameters as legal and equivalent encodings. To be clear, the following algorithm identifiers are used when a NULL parameter MUST be present: sha1Identifier AlgorithmIdentifier ::= { id-sha1, NULL } sha224Identifier AlgorithmIdentifier ::= { id-sha224, NULL } sha256Identifier AlgorithmIdentifier ::= { id-sha256, NULL } sha384Identifier AlgorithmIdentifier ::= { id-sha384, NULL } sha512Identifier AlgorithmIdentifier ::= { id-sha512, NULL }" This CL has been discussed at: http://golang.org/cl/177610043 Change-Id: Ic782161938b287f34f64ef5eb1826f0d936f2f71 Reviewed-on: https://go-review.googlesource.com/2256Reviewed-by: Adam Langley <agl@golang.org>
-
Shenghou Ma authored
While we're here, rename TestIssue7234 to Test7234 for consistency with other tests. Fixes #9557. Change-Id: I22b0a212b31e7b4f199f6a70deb73374beb80f84 Reviewed-on: https://go-review.googlesource.com/2654Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
Please see golang.org/cl/2588 for reasons behind the name change. We also need NO_LOCAL_POINTERS for assembly function with non-zero local frame size. Change-Id: Iac60aa7e76f4c2ece3726e28878fd539bfebf7a4 Reviewed-on: https://go-review.googlesource.com/2589Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
Previously, gccheckmark could only be enabled or disabled by calling runtime.GCcheckmarkenable/GCcheckmarkdisable. This was a necessary hack because GODEBUG was broken. Now that GODEBUG works again, move control over gccheckmark to a GODEBUG variable and remove these runtime functions. Currently, gccheckmark is enabled by default (and will probably remain so for much of the 1.5 development cycle). Change-Id: I2bc6f30c21b795264edf7dbb6bd7354b050673ab Reviewed-on: https://go-review.googlesource.com/2603Reviewed-by: Rick Hudson <rlh@golang.org>
-
Rob Pike authored
It was just an oversight that this one method of Logger was not made available for the standard (std) Logger. Fixes #9183 Change-Id: I2f251becdb0bae459212d09ea0e5e88774d16dea Reviewed-on: https://go-review.googlesource.com/2686Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Shenghou Ma authored
Fixes #9432 Change-Id: I08c92481afa7c7fac890aa780efc1cb2fabad528 Reviewed-on: https://go-review.googlesource.com/2115Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 11 Jan, 2015 2 commits
-
-
Daniel Morsing authored
Renaming the function broke the race detector since it looked for the name, didn't find it anymore and didn't insert the necessary instrumentation. Change-Id: I11fed6e807cc35be5724d26af12ceff33ebf4f7b Reviewed-on: https://go-review.googlesource.com/2661Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Dave Cheney authored
Change-Id: Ibe3ba6426cc6e683ff3712faf6119922d0f88b5a Reviewed-on: https://go-review.googlesource.com/2680Reviewed-by: Minux Ma <minux@golang.org>
-
- 10 Jan, 2015 1 commit
-
-
David du Colombier authored
Update #9554 Change-Id: I7de2a7d585d56b84ab975565042ed997e6124e08 Reviewed-on: https://go-review.googlesource.com/2613Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 09 Jan, 2015 8 commits
-
-
Shenghou Ma authored
Also fix one unaligned stack size for nacl that is caught by this change. Fixes #9539. Change-Id: Ib696a573d3f1f9bac7724f3a719aab65a11e04d3 Reviewed-on: https://go-review.googlesource.com/2600Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
CL 2520 omitted to set the type for an OCONVNOP node. Typechecking obviously cannot do it for us. 5g inserts float64 <--> [u]int64 conversions at walk time. The missing type caused it to crash. Change-Id: Idce381f219bfef2e3a3be38d3ba3c258b71310ae Reviewed-on: https://go-review.googlesource.com/2640Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Recognize loops of the form for i := range a { a[i] = zero } in which the evaluation of a is free from side effects. Replace these loops with calls to memclr. This occurs in the stdlib in 18 places. The motivating example is clearing a byte slice: benchmark old ns/op new ns/op delta BenchmarkGoMemclr5 3.31 3.26 -1.51% BenchmarkGoMemclr16 13.7 3.28 -76.06% BenchmarkGoMemclr64 50.8 4.14 -91.85% BenchmarkGoMemclr256 157 6.02 -96.17% Update #5373. Change-Id: I99d3e6f5f268e8c6499b7e661df46403e5eb83e4 Reviewed-on: https://go-review.googlesource.com/2520Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
Change-Id: Icecfe9223d8457de067391fffa9f0fcee4292be7 Reviewed-on: https://go-review.googlesource.com/2620Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Peter Waller authored
If an inbound connection is closed, cancel the outbound http request. This is particularly useful if the outbound request may consume resources unnecessarily until it is cancelled. Fixes #8406 Change-Id: I738c4489186ce342f7e21d0ea3f529722c5b443a Signed-off-by: Peter Waller <p@pwaller.net> Reviewed-on: https://go-review.googlesource.com/2320Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Fixes #9541. Change-Id: I5d659ad50d7c3d1c92ed9feb86cda4c1a6e62054 Reviewed-on: https://go-review.googlesource.com/2584Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Martin Möhrmann authored
Reduce buffer to maximally needed size for conversion of 64bit integers. Reduce number of used integer divisions. benchmark old ns/op new ns/op delta BenchmarkItoa 144 119 -17.36% BenchmarkPrintln 783 752 -3.96% Change-Id: I6d57a7feebf90f303be5952767107302eccf4631 Reviewed-on: https://go-review.googlesource.com/2215Reviewed-by: Rob Pike <r@golang.org>
-
Keith Randall authored
Random is bad, it can block and prevent binaries from starting. Use urandom instead. We'd rather have bad random bits than no random bits. Change-Id: I360e1cb90ace5518a1b51708822a1dae27071ebd Reviewed-on: https://go-review.googlesource.com/2582Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Minux Ma <minux@golang.org>
-
- 08 Jan, 2015 2 commits
-
-
Shenghou Ma authored
This is a replay of CL 189760043 that is in release-branch.go1.4, but not in master branch somehow. Change-Id: I11eb40a24273e7be397e092ef040e54efb8ffe86 Reviewed-on: https://go-review.googlesource.com/2541Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Keith Randall authored
In 32-bit worlds, 8-byte objects are only aligned to 4-byte boundaries. Change-Id: I91469a9a67b1ee31dd508a4e105c39c815ecde58 Reviewed-on: https://go-review.googlesource.com/2581Reviewed-by: Keith Randall <khr@golang.org>
-