- 08 Dec, 2015 2 commits
-
-
Russ Cox authored
Fixes #13520. Change-Id: Ia70cc44be3912167b369d7f74d3436331975c300 Reviewed-on: https://go-review.googlesource.com/17561Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
The orders of the curves in crypto/elliptic are all very close to a power of two. None the less, there is a tiny bias in the private key selection. This change makes the distribution uniform by resampling in the case that a private key is >= to the order of the curve. (It also switches from using BitSize to Params().N.BitLen() because, although they're the same value here, the latter is technically the correct thing to do.) The private key sampling and nonce sampling in crypto/ecdsa don't have this issue. Fixes #11082. Change-Id: Ie2aad563209a529fa1cab522abaf5fd505c7269a Reviewed-on: https://go-review.googlesource.com/17460Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 07 Dec, 2015 14 commits
-
-
Chris Broadfoot authored
Fixes #13514 Change-Id: I3903d3926ed4f5d54cfb77209d93c950b832b933 Reviewed-on: https://go-review.googlesource.com/17511Reviewed-by: Francesc Campoy Flores <campoy@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
- Only accept valid if statement syntax in go/parser. - Check AST again in go/types since it may have been modified and the AST doesn't preclude other statements in the else branch of an if statement. - Removed a test from gofmt which verified that old-style if statements permitting any statement in the else branch were correctly reformatted. It's been years since we switched to the current syntax; no need to support this anymore. - Added a comment to go/printer. Fixes #13475. Change-Id: Id2c8fbcc68b719cd511027d0412a37266cceed6b Reviewed-on: https://go-review.googlesource.com/17408Reviewed-by: Russ Cox <rsc@golang.org>
-
Aleksandr Demakin authored
Use import paths of packages to build a shared lib name. Use arguments for meta-packages 'std', 'cmd', and 'all'. Fixes #12236 Change-Id: If274d63301686ef34e198287eb012f9062541ea0 Reviewed-on: https://go-review.googlesource.com/13921Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
The documentation was inconsistent. It said zero values were not sent, but that zero-valued elements of arrays and arrays were sent. But which rule applies if the array is all zero elements, and is therefore itself a zero value? The answer is: the array is transmitted. In principle the other choice could be made, but there would be considerable expense and complexity required to implement this behavior now, not to mention worries about changes of behavior. Therefore we just document the situation: Arrays, slices, and maps are always encoded. It would perhaps be nice to have sorted this out earlier, but it was a missed opportunity. Fixes #13378 Change-Id: I8fae345edfa707fcfa7a3e0160d87ff1ac5cc5a2 Reviewed-on: https://go-review.googlesource.com/17394Reviewed-by: Russ Cox <rsc@golang.org>
-
Didier Spezia authored
Following an empty import, a declaration involving a ? symbol generates an internal compiler error when the name of the symbol (in newname function). package a import"" var? go.go:2: import path is empty go.go:3: internal compiler error: newname nil Make sure dclname is not called when the symbol is nil. The error message is now: go.go:2: import path is empty go.go:3: invalid declaration go.go:4: syntax error: unexpected EOF This CL was initially meant to be applied to the old parser, and has been updated to apply to the new parser. Fixes #11610 Change-Id: I75e07622fb3af1d104e3a38c89d9e128e3b94522 Reviewed-on: https://go-review.googlesource.com/15268Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
Fixes #13471. Change-Id: I232ad1729343d020254e313cfff182695ad6fc54 Reviewed-on: https://go-review.googlesource.com/17401Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
If reports like #13062 are really concurrent misuse of maps, we can detect that, at least some of the time, with a cheap check. There is an extra pair of memory writes for writing to a map, but to the same cache line as h.count, which is often being modified anyway, and there is an extra memory read for reading from a map, but to the same cache line as h.count, which is always being read anyway. So the check should be basically invisible and may help reduce the number of "mysterious runtime crash due to map misuse" reports. Change-Id: I0e71b0d92eaa3b7bef48bf41b0f5ab790092487e Reviewed-on: https://go-review.googlesource.com/17501Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Didier Spezia authored
The following code: func n() {(interface{int})} generates: 3: interface contains embedded non-interface int 3: type %!v(PANIC=runtime error: invalid memory address or nil pointer dereference) is not an expression It is because the corresponding symbol (Sym field in Type object) is nil, resulting in a panic in typefmt. Just skip the symbol if it is nil, so that the error message becomes: 3: interface contains embedded non-interface int 3: type interface { int } is not an expression Fixes #11614 Change-Id: I219ae7eb01edca264fad1d4a1bd261d026294b00 Reviewed-on: https://go-review.googlesource.com/14015Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
-
Matthew Dempsky authored
algtype already controls the behavior of the normal map access code paths, so it makes sense to base the decision on which optimized paths are applicable on it too. Enables use of optimized paths for key types like [8]byte and struct{s string}. Fixes #13271. Change-Id: I48c52d97abaa7259ad5aba9641ea996a967cd359 Reviewed-on: https://go-review.googlesource.com/17464 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Daniel Theophanes authored
Prior behavior would show empty string when unset. In go1.5 this would result in "off". In go1.6 this will result in "on". This change will make empty or "0" off and "1" on for go1.5 and go1.6. Vendor tools can then rely on this value. Discussion: https://groups.google.com/forum/#!topic/golang-dev/oZzcXrlRrkA Change-Id: I7e145a32e813dfde02dc262a9186c7af28db7b92 Reviewed-on: https://go-review.googlesource.com/17487Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Change-Id: Ifa9f1ed6a3b8d3f7536f2d315259940335b0ee49 Reviewed-on: https://go-review.googlesource.com/17438Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I411aeaf0cf75eb8b1c9005b622f664e9f25e4a68 Reviewed-on: https://go-review.googlesource.com/17400Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #7991. Fixes #12719. Change-Id: I5650fa35ec5d49addeda6cc6e7fa93cfbe1cdfc0 Reviewed-on: https://go-review.googlesource.com/17385Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
andrey mirtchovski authored
This change modifies comments to use the more gramatically correct "more than" instead of "more then". Change-Id: Ie3bddcf25eb6b243a21da934f2f3c76a750c083a Reviewed-on: https://go-review.googlesource.com/17488Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 06 Dec, 2015 2 commits
-
-
Alex Brainman authored
Change-Id: I321eba716319bf88695ac49580837b6254f1279e Reviewed-on: https://go-review.googlesource.com/17474Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Alex Brainman authored
This is CL 11882 brought back to life. Fixes #11551 Change-Id: I29810183957745442d1e9937f56a66fc9c6cc82a Reviewed-on: https://go-review.googlesource.com/17470Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Dec, 2015 19 commits
-
-
Russ Cox authored
The build tags are necessary to keep "go build" in that directory building only stdio.go, but we have to arrange for test/run.go to treat them as satisfied. Fixes #12625. Change-Id: Iec0cb2fdc2c9b24a4e0530be25e940aa0cc9552e Reviewed-on: https://go-review.googlesource.com/17454 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
(sig is unsigned, so sig-1 >= 0 is always true.) Fixes #11281. Change-Id: I4b9d784da6e3cc80816f2d2f7228d5d8a237e2d5 Reviewed-on: https://go-review.googlesource.com/17457Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #11609. Change-Id: I3cf64164fde28ebf739706728b84d8ef5b6dc90e Reviewed-on: https://go-review.googlesource.com/17456Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #11290. Change-Id: I312f0731077b78a4bed47062eb7fd1ab52bc3dd1 Reviewed-on: https://go-review.googlesource.com/17453Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
Fixes #12970. Change-Id: Id0026e8274e071d65d47df63d65a93110abbec5d Reviewed-on: https://go-review.googlesource.com/15998Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Yuval Pavel Zholkover authored
This reverts commit f25f6eab. Sorry, this was not meant to go in without the ztypes_freebsd_arm.go and the copyFromV9 function. Change-Id: I4ac2a8a23809ec1b1b9e42992cd0f3c349848f06 Reviewed-on: https://go-review.googlesource.com/17472 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
This was a mistake made when bringing cmd/vet into the main repo. Fixes #13416. Change-Id: I03b512ab944577c56085aea06df8ff5e1acc16d7 Reviewed-on: https://go-review.googlesource.com/17455Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Mikio Hara authored
This change makes existing Lookup API test cases conform to the new return value form that all the Lookup APIs except LookupTXT must return a single or multiple absolute domain names. Updates #12189. Fixes #12193. Change-Id: I03ca09be5bff80e818fbcdc26039daa33d5440a8 Reviewed-on: https://go-review.googlesource.com/17411 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Fixes #13480. Change-Id: Icbf4f83e965e84f7020f56c3f346193f8b91e7bf Reviewed-on: https://go-review.googlesource.com/17461Reviewed-by: Russ Cox <rsc@golang.org>
-
Yuval Pavel Zholkover authored
Switch IfMsghdr and IfaMsghdr to their 'l' variants, make the IfData layout to be based on FreeBSD-11.0 (freebsdVersion >= 1100011). Using freebsdVersion, detect the appropriate layout at runtime and decode routing socket messages into the new IfData layout. Fixes #11641 Change-Id: Ic7ec550f00c0d15f46a36f560d835e4f138f61e1 Reviewed-on: https://go-review.googlesource.com/14757Reviewed-by: Russ Cox <rsc@golang.org>
-
Didier Spezia authored
Try to remove the most visible artefacts resulting from the C to Go translation. It includes: - refactoring the find function to eliminate goto and variable declarations - removing useless variables still having a _ = xxx - decreasing the number of upfront variable declarations No semantic changes. Change-Id: I84d981c48b2d9e22e6b9db5f2a703c80c60249ba Reviewed-on: https://go-review.googlesource.com/15681Reviewed-by: Russ Cox <rsc@golang.org>
-
Mohit Agarwal authored
Set the status code in case of error. Fixes #11510 Change-Id: If461c30a1f6d2275539f33a2eabd7b19bbfa411d Reviewed-on: https://go-review.googlesource.com/16718Reviewed-by: Russ Cox <rsc@golang.org>
-
Konstantin Shaposhnikov authored
Prior to this change "go tool vet -all -shadow" ran only -shadow check. Also fix godoc package path in the usage text. Fixes #13020 Change-Id: I87c60d6b06a02106ae8bff56adb79df032cc4646 Reviewed-on: https://go-review.googlesource.com/16325Reviewed-by: Russ Cox <rsc@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expression. Caught with gofmt -d -s, fixed with gofmt -w -s Change-Id: I19723900d0649019bf79b9330d68525a68ed69c4 Reviewed-on: https://go-review.googlesource.com/13835Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #12200. Change-Id: I89f2a7326bb9182024c44bf815a06fa48639649d Reviewed-on: https://go-review.googlesource.com/17384Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
There is a report that fd 10 is already in use when run on some OS X machines. I don't see how, and I can't reproduce the problem on my own OS X machine, but it's easy enough to fix. Fixes #12161. Change-Id: I73511bdd91258ecda181d60d2829add746d1198b Reviewed-on: https://go-review.googlesource.com/17451Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
When run with "ulimit -s unlimited", the misc/cgo/test test binary finds a stack size of 0x3000 returned by getcontext, causing the runtime to try to stay within those bounds and then fault when called back in the test after 64 kB has been used by C. I suspect that Solaris is doing something clever like reporting the current stack size and growing the stack as faults happen. On all the other systems, getcontext reports the maximum stack size. And when the ulimit is not unlimited, even Solaris reports the maximum stack size. Work around this by assuming that any stack on Solaris must be at least 1 MB. Fixes #12210. Change-Id: I0a6ed0afb8a8f50aa1b2486f32b4ae470ab47dbf Reviewed-on: https://go-review.googlesource.com/17452Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Yann Kerhervé authored
Change-Id: I3870150fc8e713f6164371299c029b31f18f250a Reviewed-on: https://go-review.googlesource.com/17426Reviewed-by: Minux Ma <minux@golang.org>
-
Emmanuel Odeke authored
Change-Id: Idfbe91abc11b2b3b735cd8d11fb1938f9e5c0473 Reviewed-on: https://go-review.googlesource.com/17437Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 04 Dec, 2015 3 commits
-
-
Emmanuel Odeke authored
Change-Id: Icad6cc130252ac177946b23c12f36d6ba3275bf0 Reviewed-on: https://go-review.googlesource.com/17436 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: I69e62199140e5cf203696af17d4816f3a5f13bd1 Reviewed-on: https://go-review.googlesource.com/17434 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: I4cf4596a305510cd25df34ecebd11a19266415f1 Reviewed-on: https://go-review.googlesource.com/17435 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-