««« backport 2307a931664e
net/http: don't allow zero byte in FileServer paths
Should probably be fixed in the syscall package, either
additional or instead of this CL.
Fixes#3842
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6442061
»»»
««« backport 98788e8973f2
cmd/gc: point "no new variables" error at right line number.
Fixes#3856.
R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/6455056
»»»
««« backport d191515c80fb
syscall: apply comment from Mikioh
This comment was suggested in CL 6456045
but never got applied.
R=mikioh, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6447056
»»»
««« backport 0eae95b0307a
syscall: workaround accept() bug on Darwin
Darwin kernels have a bug in accept() where error result from
an internal call is not checked and socket is accepted instead
of ECONNABORTED error. However, such sockets have no sockaddr,
which results in EAFNOSUPPORT error from anyToSockaddr, making
Go http servers running on Mac OS X easily susceptible to
denial of service from simple port scans with nmap.
Fixes#3849.
R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6456045
»»»
««« backport 9bf2225c38eb
misc/vim: fix :Import insertion heuristic.
If a factored import group has a blank line, assume it is dividing
separate groups of imports (e.g. standard library vs. site-specific).
import (
"bytes"
"io"
"mycorp/package"
)
The most common case is inserting new standard library imports,
which are usually (stylistically) the first group, so we should drop
"net" in the above example immediately after "io".
Since this logic is getting non-trivial, add a test.
R=golang-dev, minux.ma, franciscossouza
CC=golang-dev
https://golang.org/cl/6445043
»»»
««« backport 6556a8d85dd6
log/syslog: don't append \n if there is one
pkg log already appends a linefeed to the log message,
so log/syslog doesn't need to append another.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/6441048
»»»
««« backport d127749038e8
os: move epipecheck from file_posix.go and into file_unix.go to fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/6450058
»»»
««« backport bfa4e1f1027f
runtime: ignore signal 33 == SIGSETXID on GNU/Linux
When a cgo program calls setuid, setgid, etc., the GNU/Linux
pthread library sends signal SIGSETXID to each thread to tell
it to update its UID info. If Go is permitted to intercept
the default SIGSETXID signal handler, the program will hang.
This patch tells the runtime package to not try to intercept
SIGSETXID on GNU/Linux. This will be odd if a Go program
wants to try to use that signal, but it means that cgo
programs that call setuid, etc., won't hang.
Fixes#3871.
R=rsc, r, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/6455050
»»»
««« backport 7f6a0510d3c9
go/printer: don't crash if ast.FuncType.Params is nil
The go/ast comment for FuncType.Params says that the field may be nil.
Make sure the printer accepts such a value. The go/parser always sets
the field (to provide parenthesis position information), but a program
creating a Go AST from scatch may not.
Added corresponding test case.
Fixes#3870.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6448060
»»»
««« backport 6751a0e1a6a4
cgo: fix declarations in _cgo_export.c
Declare crosscall2. Declare the functions passed to it as
returning void, rather than relying on implicit return type.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6432060
»»»
««« backport 7a67d277c7e8
testing: allow concurrent use of T and B
Notably, allow concurrent logging and failing.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6453045
»»»
««« backport 5a0aafb7fd8d
net: fix comment
RemoteAddr returns not only UDPAddr but IPAddr.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6401054
»»»
««« backport 0748cd92ed76
text/template: fix bug in map indexing
If the key is not present, return value of the type of the element
not the type of the key. Also fix a test that should have caught this case.
Fixes#3850.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6405078
»»»
««« backport 3357d8d34ab8
encoding/gob: revert 6348067, which broke compatibility
Add commentary to explain better what's going on, but the
code change is a simple one-line reversal to the previous
form.
R=rsc
CC=golang-dev
https://golang.org/cl/6428072
»»»
««« backport 6d5faedd95bc
cmd/gc: reject use of ... with multiple-valued expressions.
Fixes#3334.
R=golang-dev, r
CC=golang-dev, remy
https://golang.org/cl/6350103
»»»
««« backport 254232c99b3e
cmd/gc: avoid an internal error on invalid type switch.
The error was caused by a call to implements() even when
the type switch variable was not an interface.
Fixes#3786.
R=golang-dev, r
CC=golang-dev, remy
https://golang.org/cl/6354102
»»»
««« backport 46ca86e70e96
crypto/rsa: left-pad PKCS#1 v1.5 outputs.
OpenSSL requires that RSA signatures be exactly the same byte-length
as the modulus. Currently it'll reject ~1/256 of our signatures: those
that end up a byte shorter.
Fixes#3796.
R=golang-dev, edsrzf, r
CC=golang-dev
https://golang.org/cl/6352093
»»»
««« backport 8241ffc8686e
crypto/x509: exempt broken Entrust certificate from checks.
Entrust have issued a root certificate that's not marked as valid for
signing certificates.
This results in Go programs failing to validate certificates that
chain up to this root (i.e. gateway.push.apple.com:2195).
Although this is clearly a mistake on Entrust's part, it seems that we
will have to bodge around it.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6346064
»»»
««« backport ce3a981ad1ef
pkg: Removing duplicated words ("of of", etc.), mostly from comments.
Ran 'double.pl' on the pkg tree to identify doubled words.
One change to an error string return in x509; the rest are in comments.
Thanks to Matt Jibson for the idea.
R=golang-dev, bsiegert
CC=golang-dev
https://golang.org/cl/6344089
»»»
««« backport 21130d62eeb0
reflect: reflect.Zero results are neither addressable nor settable
This could be deduced from "The Laws of Reflection" but it seems
worthwhile highlighting it.
R=r
CC=golang-dev
https://golang.org/cl/6350073
»»»
««« backport c89f17a9ff4f
encoding/gob: fix bug in Register
The old code added a star but did not indirect the reflect.Type.
R=bradfitz
CC=golang-dev
https://golang.org/cl/6348067
»»»
««« backport be7e338a8960
doc/debugging_with_gdb: mention how to disable gc optimization
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6353055
»»»
««« backport c533f48701cb
math/big: Remove unnecessary test from nat.go multiplication
The switch at the beginning of the function already ensures n > 1,
so testing for n < 2 is redundant.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6350051
»»»
««« backport b5c4f411a852
cmd/gc: add missing case for OCOM in defaultlit()
Fixes#3765.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6349064
»»»
««« backport 650544a058e9
cmd/go: httpGet function does not use global variable httpClient
No change, just for consistency.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6346048
»»»