1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:11:22 -06:00
Commit Graph

24074 Commits

Author SHA1 Message Date
Rob Pike
df9423f4dc doc: add a few more details about arm and ppc64 to asm.html
Update #10096

Arm64 and Ppc64 are still pretty sketchy.

Change-Id: Iaf821b0f17bad8c71d338d45de75d4a345cac2dd
Reviewed-on: https://go-review.googlesource.com/12160
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 02:37:09 +00:00
Robert Griesemer
e7a10a9614 go/types: fix internal inInteger operand predicate
When testing if a value is an integer, if the value is a constant,
don't ignore the type if it has one.

Fixes #11594.

Change-Id: I2ff387e4f9e8ab7cae35c4838350e0a1fce2e625
Reviewed-on: https://go-review.googlesource.com/12045
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-15 02:25:47 +00:00
Didier Spezia
8b6527b70e encoding/xml: improve marshaller sanity checks of directives
When building a directive, the current sanity check prevents
a '>' to be used, which makes a DOCTYPE directive with an
internal subset be rejected. It is accepted by the parser
though, so what can be parsed cannot be encoded.

Improved the corresponding sanity check to mirror the behavior
of the parser (in the way it handles angle brackets, quotes,
and comments).

Fixes #10158

Change-Id: Ieffea9f870f2694548e12897f8f47babc0ea4414
Reviewed-on: https://go-review.googlesource.com/11630
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 01:56:14 +00:00
Jonathan Rudenberg
aed74b9ddf doc/go1.5.html: fix and expand crypto/tls changes
- Fix incomplete description of minimum protocol version.
- Add mention of the new ConnectionState.OCSPResponse field.
- Clarify session ticket key rotation description.

Change-Id: I6b62d30a4d0e0f84fd2c0e70e8f66ec14e6a5a90
Reviewed-on: https://go-review.googlesource.com/12197
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 01:52:08 +00:00
Brad Fitzpatrick
6c848c6e88 A+C: more updates before release
Includes subrepos and some special cases.

Updates #10639

Change-Id: I3c9ad4f6ec689903f88ccf5599d93a338e3eec4d
Reviewed-on: https://go-review.googlesource.com/12211
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 01:38:53 +00:00
Larz Conwell
1a4e1770f6 encoding/json: Only allow string option for valid types
The "string" option only applies for strings, floats, integers, and
booleans as per the documentation. So when decoding ignore the "string"
option if the value is not of one of the types mentioned. This matches
the Marshal step which also ignores the "string" option for invalid
types.

Fixes #9812

Change-Id: I0fb2b43d0668bc0e2985886d989abbf2252070e2
Reviewed-on: https://go-review.googlesource.com/10183
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-15 01:35:56 +00:00
Brad Fitzpatrick
e66d04ea59 A+C: update for release
This is an automated update for the main branch of the main repo.
Some special cases and other repos will follow.

Updates #10639

Change-Id: I4b149c037e9292b7e323a9f4c009092ce6b70ce5
Reviewed-on: https://go-review.googlesource.com/12159
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 00:59:00 +00:00
Jonathan Rudenberg
f4b4c881cb doc/go1.5.html: fix typo
This is the first mention of the fmt package in the changes list.

Change-Id: I5d378d8707e6735e0e590527db4196b517fefd72
Reviewed-on: https://go-review.googlesource.com/12198
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-15 00:52:31 +00:00
Jonathan Rudenberg
9e88f79d32 doc/go1.5.html: fix typo
Change-Id: I8bbdf6c769e089fca8458166dffff5aea0f74675
Reviewed-on: https://go-review.googlesource.com/12196
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-14 23:08:23 +00:00
Nevins Bartolomeo
1fff4bb156 crypto: add SHA-512/224 and SHA-512/256 as described in FIPS 180-4
Change-Id: Ifbab8203dea1eb0df4c834df22e12cb7c37c14fd
Reviewed-on: https://go-review.googlesource.com/10683
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2015-07-14 19:45:21 +00:00
David Crawshaw
e3c67dda0a cmd/go: do not create subdirs of $GOBIN
Fixes #9769.

Change-Id: I2959906c71d0ce62cdb750dab78eab631a26f229
Reviewed-on: https://go-review.googlesource.com/12080
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 19:25:40 +00:00
Ian Lance Taylor
a6dc541436 cmd/go: warn on get from code.google.com that it is shutting down
Fixes #10193.

Change-Id: Ibbb747babb697a66b943e5da76b0ada41f1fb14f
Reviewed-on: https://go-review.googlesource.com/12070
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 18:18:12 +00:00
Ian Lance Taylor
443ec4f44d doc/go1.5.html: fix typo.
Fixes #11704.

Change-Id: If103f8eca7e53b0120885e2ec086db12176ea078
Reviewed-on: https://go-review.googlesource.com/12155
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-14 17:17:25 +00:00
Nigel Tao
60b7d27c82 image/jpeg: don't unread a byte if we've already taken bits from it.
This rolls back most of golang.org/cl/8841, aka 2f98bac310, and makes a
different fix. It keeps the TestTruncatedSOSDataDoesntPanic test
introduced by that other CL, which obviously still passes after this CL.

Fixes #11650, a regression (introduced by cl/8841) from Go 1.4.

The original cl/8841 changed the image/jpeg not to panic on an input
given in #10387. We still do not panic on that input, after this CL.

I have a corpus of over 160,000 JPEG images, a sample of a web crawl.
The image/jpeg code ran happily over that whole corpus both before and
after this CL, although that corpus clearly didn't catch the regression
in the first place.

This code was otherwise tested manually. I don't think that it's trivial
to synthesize a JPEG input that happens to run out of Huffman data at
just the right place. The test image attached to #11650 obviously has
that property, but I don't think we can simply add that test image to
the repository: it's 227KiB, and I don't know its copyright status.

I also looked back over the issue tracker for problematic JPEGs that
people have filed. The Go code, after this CL, is still happy on these
files in my directory:
issue2362a.jpeg
issue3916.jpeg
issue3976.jpeg
issue4084.jpeg
issue4259.jpeg
issue4291.jpeg
issue4337.jpeg
issue4500.jpeg
issue4705.jpeg
issue4975.jpeg
issue5112.jpeg
issue6767.jpeg
issue9888.jpeg
issue10133.jpeg
issue10357.jpeg
issue10447.jpeg
issue11648.jpeg
issue11650.jpeg

There were other images attached in the issue tracker that aren't
actually valid JPEGs. They failed both before and after this CL:
broken-issue2362b.jpeg
broken-issue6450.jpeg
broken-issue8693.jpeg
broken-issue10154.jpeg
broken-issue10387.jpeg
broken-issue10388.jpeg
broken-issue10389.jpeg
broken-issue10413.jpeg

In summary, this CL fixes #11650 and, after some automated and manual
testing, I don't think introduces new regressions.

Change-Id: I30b67036e9b087f3051d57dac7ea05fb4fa36f66
Reviewed-on: https://go-review.googlesource.com/12163
Reviewed-by: Rob Pike <r@golang.org>
2015-07-14 06:21:57 +00:00
Rob Pike
902345e596 doc: document behavior change in image/color in release notes
Change-Id: I7ad90ab78abb8a39d56c837610d5c311a96b7039
Reviewed-on: https://go-review.googlesource.com/12162
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-07-14 06:00:10 +00:00
Brad Fitzpatrick
a74d030557 os/exec: fix plan9 build
Fixes build from https://golang.org/cl/12152

Plan 9 lacks syscall.EPIPE. I was misled by api/go1.txt and also
forgot to use the trybots. :(

Change-Id: I4982fe969ad4a8724090cb03009bfb21780d8aa7
Reviewed-on: https://go-review.googlesource.com/12153
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-07-14 05:33:14 +00:00
Ross Light
c218a075be cmd/go: mark ssh:// URLs as secure
Add tests for isSecure function.

Change-Id: I49de9d2846b75d4c7be745484f85d351a6fd851d
Reviewed-on: https://go-review.googlesource.com/11514
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 05:27:57 +00:00
Russ Cox
3290e9c145 runtime: fix build on non-x86 machines
Fixes #11656 (again).

Change-Id: I170ff10bfbdb0f34e57c11de42b6ee5291837813
Reviewed-on: https://go-review.googlesource.com/12142
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-14 04:42:12 +00:00
Brad Fitzpatrick
73ca459a56 os/exec: ignore pipe write errors when command completes successfully
Fixes #9173

Change-Id: I83530533db84b07cb88dbf6ec690be48a06a9d7d
Reviewed-on: https://go-review.googlesource.com/12152
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-14 00:41:31 +00:00
Rob Pike
3c5eb96001 doc: update the architecture-specific information in asm.html
Still to do: ARM64 and PPC64. These architectures are woefully underdocumented.

Change-Id: Iedcf767a7e0e1c931812351940bc08f0c3821212
Reviewed-on: https://go-review.googlesource.com/12110
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-13 23:48:12 +00:00
Rob Pike
1bd1880906 cmd/internal/obj: rename *.out.go to a.out.go
The old numerical names like 6.out.go are a relic from the old tools.
Easier to rename than explain.

The anames.go files were modified by go generate; no changes
beyond the explanatory comment at the top.

Change-Id: I84742c75c60e47724baa9d49a91fef1f8581f021
Reviewed-on: https://go-review.googlesource.com/12069
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-13 23:47:38 +00:00
Austin Clements
777ab5ce1a runtime: fix MemStats.{PauseNS,PauseEnd,PauseTotalNS,LastGC}
These memstats are currently being computed by gcMark, which was
appropriate in Go 1.4, but gcMark is now just one part of a bigger
picture. In particular, it can't account for the sweep termination
pause time, it can't account for all of the mark termination pause
time, and the reported "pause end" and "last GC" times will be
slightly earlier than they really are.

Lift computing of these statistics into func gc, which has the
appropriate visibility into the process to compute them correctly.

Fixes one of the issues in #10323. This does not add new statistics
appropriate to the concurrent collector; it simply fixes existing
statistics that are being misreported.

Change-Id: I670cb16594a8641f6b27acf4472db15b6e8e086e
Reviewed-on: https://go-review.googlesource.com/11794
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-13 23:32:59 +00:00
Austin Clements
ad60cd8b92 runtime: report MemStats.PauseEnd in UNIX time
Currently we report MemStats.PauseEnd in nanoseconds, but with no
particular 0 time. On Linux, the 0 time is when the host started. On
Darwin, it's the UNIX epoch. This is also inconsistent with the other
absolute time in MemStats, LastGC, which is always reported in
nanoseconds since 1970.

Fix PauseEnd so it's always reported in nanoseconds since 1970, like
LastGC.

Fixes one of the issues raised in #10323.

Change-Id: Ie2fe3169d45113992363a03b764f4e6c47e5c6a8
Reviewed-on: https://go-review.googlesource.com/11801
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-13 23:32:02 +00:00
Russ Cox
0bcdffeea6 runtime: fix x86 stack trace for call to heap memory
Fixes #11656.

Change-Id: Ib81d583e4b004e67dc9d2f898fd798112434e7a9
Reviewed-on: https://go-review.googlesource.com/12026
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2015-07-13 19:42:35 +00:00
Russ Cox
683311175c runtime: fix race in TestChanSendBarrier
Fixes race detector build.

Change-Id: I8bdc78d57487580e6b5b8c415df4653a1ba69e37
Reviewed-on: https://go-review.googlesource.com/12087
Reviewed-by: Austin Clements <austin@google.com>
2015-07-13 19:42:20 +00:00
Mikio Hara
7ef6a9f38b net: clean up builtin DNS stub resolver, fix tests
This change does clean up as preparation for fixing #11081.

- renames cfg to resolvConf for clarification
- adds a new type resolverConfig and its methods: init, update,
  tryAcquireSema, releaseSema for mutual exclusion of resolv.conf data
- deflakes, simplifies tests for resolv.conf data; previously the tests
  sometimes left some garbage in the data

Change-Id: I277ced853fddc3791dde40ab54dbd5c78114b78c
Reviewed-on: https://go-review.googlesource.com/10931
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-13 19:29:25 +00:00
Russ Cox
d7a8d3eb08 cmd/go: fix go get -u with internal
Fixes #11307.
Fixes #11055.

Change-Id: I8d6b04cb509e62e27d6935b91ffe35fdaea4ebcd
Reviewed-on: https://go-review.googlesource.com/12028
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-13 19:17:17 +00:00
Russ Cox
8c3533c89b runtime: add memory barrier for sync send in select
Missed select case when adding the barrier last time.
All the more reason to refactor this code in Go 1.6.

Fixes #11643.

Change-Id: Ib0d19d6e0939296c0a3e06dda5e9b76f813bbc7e
Reviewed-on: https://go-review.googlesource.com/12086
Reviewed-by: Austin Clements <austin@google.com>
2015-07-13 19:10:22 +00:00
Alan Donovan
242ec168c1 go/internal/gcimporter: populate (*types.Package).Imports
This is a copy of an upstream change to the tools repo:
https://go-review.googlesource.com/#/c/8924/

This is a second attempt at CL 8954, with the necessary change to
go/build's deps test.

Change-Id: Ib798498cf85fea0baec5667e9324d11f6ae8ad64
Reviewed-on: https://go-review.googlesource.com/9173
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-13 17:51:09 +00:00
Nigel Tao
ca6ba49269 image/png: don't read filter bytes for empty interlace passes.
Fixes #11604

The gray-gradient.png image was created by a Go program:

----
package main

import (
	"image"
	"image/color"
	"image/png"
	"log"
	"os"
)

func main() {
	f, err := os.Create("a.png")
	if err != nil {
		log.Fatal(err)
	}
	defer f.Close()
	m := image.NewGray(image.Rect(0, 0, 1, 16))
	for i := 0; i < 16; i++ {
		m.SetGray(0, i, color.Gray{uint8(i * 0x11)})
	}
	err = png.Encode(f, m)
	if err != nil {
		log.Fatal(err)
	}
}
----

The equivalent gray-gradient.interlaced.png image was created via ImageMagick:
$ convert -interlace PNG gray-gradient.png gray-gradient.interlaced.png

As a sanity check:
$ file gray-gradient.*
gray-gradient.interlaced.png: PNG image data, 1 x 16, 4-bit grayscale, interlaced
gray-gradient.png:            PNG image data, 1 x 16, 8-bit grayscale, non-interlaced

Change-Id: I7700284f74d1ea30073aede3bce4d7651787bdbc
Reviewed-on: https://go-review.googlesource.com/12064
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-13 06:40:00 +00:00
Michael Hudson-Doyle
616cb3c0ea cmd/dist: actually disable testso and testsovar on ppc64
This is clearly what was intended all along. ./all.bash passes with this
change.

Change-Id: I16996da11cf1e4d2dc2a4434b7611a724691e8dc
Reviewed-on: https://go-review.googlesource.com/12068
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-13 04:11:39 +00:00
Brad Fitzpatrick
8a28242b5f doc: add section about standard library to the FAQ
Fixes #10246

Change-Id: Ifa698232a09e1c37f3a9340ffdc1f2650c06fe4c
Reviewed-on: https://go-review.googlesource.com/11900
Reviewed-by: Rob Pike <r@golang.org>
2015-07-13 02:05:08 +00:00
Rob Pike
a3985e400f time: document that time.Tick creates an unrecoverable resource
Fixes #11662.

Change-Id: I8839b48a1cd3da4c29b6def03cb0c74c1c12942e
Reviewed-on: https://go-review.googlesource.com/12066
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-13 01:35:36 +00:00
Ian Lance Taylor
7c767fd709 misc/cgo/testshared: unset GOBIN during test
Fixes #11273.

Change-Id: I409b6c4168711913076439036d65e8639ca3b06f
Reviewed-on: https://go-review.googlesource.com/12073
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-12 18:06:34 +00:00
Alex Brainman
4ef836faf6 cmd/dist: disable misc/scgo/testsovar on netbsd
Update #11654

Change-Id: Ia199b8dd349542ad8b92b463dd2f3734dd7e66a4
Reviewed-on: https://go-review.googlesource.com/12060
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-12 10:23:06 +00:00
Brad Fitzpatrick
783297ad6a all: link to https for golang subdomains too
The previous commit (git 2ae77376) just did golang.org.  This one
includes golang.org subdomains like blog, play, and build.

Change-Id: I4469f7b307ae2a12ea89323422044e604c5133ae
Reviewed-on: https://go-review.googlesource.com/12071
Reviewed-by: Rob Pike <r@golang.org>
2015-07-12 04:42:40 +00:00
Hariharan Srinath
4735002f58 flag: Clarifies docs for Arg(int) and FlagSet.Arg(int)
Adds the clarification that these functions return empty
string if the requested element is not available

Added fullstops

Fixes #11664

Change-Id: I84173862bc785240f7d3ee75a5023673264d172b
Reviewed-on: https://go-review.googlesource.com/12061
Reviewed-by: Rob Pike <r@golang.org>
2015-07-12 03:22:26 +00:00
Brad Fitzpatrick
2ae77376f7 all: link to https instead of http
The one in misc/makerelease/makerelease.go is particularly bad and
probably warrants rotating our keys.

I didn't update old weekly notes, and reverted some changes involving
test code for now, since we're late in the Go 1.5 freeze. Otherwise,
the rest are all auto-generated changes, and all manually reviewed.

Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d
Reviewed-on: https://go-review.googlesource.com/12048
Reviewed-by: Rob Pike <r@golang.org>
2015-07-11 14:36:33 +00:00
Brad Fitzpatrick
f96fa06d14 net/http/fcgi: fix race between serveRequest and cleanUp
Fixes #11552

Change-Id: I87904e9e3fb4bd1fb4c7075a4e2d0151e5bd37df
Reviewed-on: https://go-review.googlesource.com/11890
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-11 14:36:16 +00:00
Elias Naur
b3a8b0574a runtime: abort on fatal errors and panics in c-shared and c-archive modes
The default behaviour for fatal errors and runtime panics is to dump
the goroutine stack traces and exit with code 2. However, when the process is
owned by foreign code, it is suprising and inappropriate to suddenly exit
the whole process, even on fatal errors. Instead, re-use the crash behaviour
from GOTRACEBACK=crash and abort.

The motivating use case is issue #11382, where an Android crash reporter
is confused by an exiting process, but I believe the aborting behaviour
is appropriate for all cases where Go does not own the process.

The change is simple and contained and will enable reliable crash reporting
for Android apps in Go 1.5, but I'll leave it to others to judge whether it
is too late for Go 1.5.

Fixes #11382

Change-Id: I477328e1092f483591c99da1fbb8bc4411911785
Reviewed-on: https://go-review.googlesource.com/12032
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-07-11 11:39:05 +00:00
Alex Brainman
d5004ee69e runtime: use AddVectoredContinueHandler on Windows XP amd64
Recent change (CL 10370) unexpectedly broke TestRaiseException on
Windows XP amd64. I still do not know why. But reverting old
CL 8165 fixes the problem.

This effectively makes Windows XP amd64 use AddVectoredContinueHandler
instead of SetUnhandledExceptionFilter for exception handling. That is
what we do for all recent Windows versions too.

Fixes #11481

Change-Id: If2e8037711f05bf97e3c69f5a8d86af67c58f6fc
Reviewed-on: https://go-review.googlesource.com/11888
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-11 07:02:57 +00:00
Charlie Dorian
8b221092b9 math: Expm1 returns -1 with large negative argument.
Fixes #11442

Change-Id: I2053fe752c6a122924d28565f1338f73e00ed417
Reviewed-on: https://go-review.googlesource.com/11791
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 22:22:24 +00:00
Matthew Dempsky
1082e2390e cmd/link/internal/ld: stricter object file decoding
Instead of silently truncating integers to their expected range, check
that they're within range and emit errors if not.  Intended to help
narrow down the cause of issue #11617.

Change-Id: Ia7b577270f8438ca7479262702371e26277f1ea7
Reviewed-on: https://go-review.googlesource.com/12050
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 22:01:54 +00:00
Ian Lance Taylor
6a90b1d621 runtime, cmd/go: fix tests to work when GOROOT_FINAL is set
When GOROOT_FINAL is set when running all.bash, the tests are run
before the files are copied to GOROOT_FINAL.  The tests are run with
GOROOT set, so most work fine.  This fixes two cases that do not.

In cmd/go/go_test.go we were explicitly removing GOROOT from the
environment, causing tests that did not themselves explicitly set
GOROOT to fail.  There was no need to explicitly remove GOROOT, so
don't do it.  If people choose to run "go test cmd/go" with a bad
GOROOT, that is their own lookout.

In the runtime GDB test, the linker has told gdb to find the support
script in GOROOT_FINAL, which will fail.  Check for that case, and
skip the test when we see it.

Fixes #11652.

Change-Id: I4d3a32311e3973c30fd8a79551aaeab6789d0451
Reviewed-on: https://go-review.googlesource.com/12021
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-10 21:29:37 +00:00
Ian Lance Taylor
2de67e9974 runtime: clarify that NumCPU returns only available CPUs
Update #11609.

Change-Id: Ie363facf13f5e62f1af4a8bdc42a18fb36e16ebf
Reviewed-on: https://go-review.googlesource.com/12022
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-10 21:28:49 +00:00
Mikio Hara
91ba0abef1 net: fix misidentification of link-local, global unicast IP addresses
Don't treat IPv4-mapped link-local IP addresses as IPv6 link-local
addresses, an IPv4 broadcast address as a global unicast IP address.

Fixes #11585.

Change-Id: I6a7a0c0601f18638f5c624ab63e12ee40f77b182
Reviewed-on: https://go-review.googlesource.com/11883
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-10 07:30:33 +00:00
Mikio Hara
7b5d536786 net: ensure that ResolveIPAddr(addr.String()) reproduces addr
Updates #6465.

Change-Id: I5babbcf4c92dae47c823a41628b01e4ceb2332eb
Reviewed-on: https://go-review.googlesource.com/11951
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 06:51:55 +00:00
Rob Pike
a625b91916 cmd/doc: submit to the punched card tyranny
People use 80-column terminals because their grandparents used
punched cards. When I last used a punched card, in 1978, it seemed
antiquated even then. But today, people still set their terminal
widths to 80 to honor the struggles their fallen ancestors made to
endure this painful technology.

We must all stand and salute the 80 column flag, or risk the opprobium
of our peers.

For Pete's sake, I don't even use a fixed-width font. I don't even
believe in columns.

Fixes #11639 with extreme reluctance.

P.S. To avoid the horror of an automatically folded line of text, this commit message has been formatted to fit on an 80-column line, except for this postscript.

Change-Id: Ia2eb2dcf293dabe804c22ee5abb4bbb703f45c33
Reviewed-on: https://go-review.googlesource.com/12011
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 03:52:48 +00:00
Alex Brainman
315e5c99d8 debug/pe: truncate pe sections to their size in memory
Section.Data returns disk section data, but those are rounded up to
some predefined value. Processing these as is confuses dwarf parser
because of garbage at the end. Truncate Section.Data as per memory
section description.

Sometimes dwarf sections have memory section size of 0
(for pe object files). Keep those to their disk size.

Fixes #11608

Change-Id: I8de0a2271201a24aa9ac8dac44f1e9c8a9285183
Reviewed-on: https://go-review.googlesource.com/11950
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 03:33:38 +00:00
Brad Fitzpatrick
b615ad8fd5 net: add mechanisms to force go or cgo lookup, and to debug default strategy
GODEBUG=netdns=1 prints a one-time strategy decision. (cgo or go DNS lookups)
GODEBUG=netdns=2 prints the per-lookup strategy as a function of the hostname.

The new "netcgo" build tag forces cgo DNS lookups.

GODEBUG=netdns=go (or existing build tag "netgo") forces Go DNS resolution.
GODEBUG=netdns=cgo (or new build tag "netcgo") forces libc DNS resolution.

Options can be combined with e.g. GODEBUG=netdns=go+1 or GODEBUG=netdns=2+cgo.

Fixes #11322
Fixes #11450

Change-Id: I7a67e9f759fd0a02320e7803f9ded1638b19e861
Reviewed-on: https://go-review.googlesource.com/11584
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-09 22:19:41 +00:00