Commit graph

26178 commits

Author SHA1 Message Date
Russ Cox 0b4f578266 cmd/asm: remove nonexistent amd64 instructions
These have no accepted input syntax and,
as far as I can tell, do not actually exist.

Change-Id: Iafdfb71adccad76230191d922eb7ddf78b7d5898
Reviewed-on: https://go-review.googlesource.com/19612
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-19 01:35:18 +00:00
Russ Cox 76f272d717 cmd/asm: remove support for amd64 3DNow! instructions
3DNotAnymore!

These only ever existed on AMD (not Intel) processors,
and AMD cancelled support for them in August 2010.

Change-Id: Ia362259add9d4f5788fd151fb373f91288677407
Reviewed-on: https://go-review.googlesource.com/19611
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-19 01:35:13 +00:00
Nathan VanBenschoten b04f3b06ec all: replace strings.Index with strings.Contains where possible
Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a
Reviewed-on: https://go-review.googlesource.com/18120
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
2016-02-19 01:06:05 +00:00
Ian Gudger 952c2fd606 net: fix packDomainName encoding of root and invalid names
Fixes #14372

Change-Id: I40d594582639e87ef2574d37ac868e37ffaa17dc
Reviewed-on: https://go-review.googlesource.com/19623
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-02-19 00:55:47 +00:00
Benoit Sigoure 3ddfaa5653 cmd/gofmt: Ignore file not found errors.
gofmt prints an error to stderr when a file is deleted during its
`filepath.Walk()', which can happen in builds that change the tree
concurrently with gofmt running.

Change-Id: Ia1aa4804f6bc2172baf061c093e16fe56a3ee50c
Reviewed-on: https://go-review.googlesource.com/19301
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-02-19 00:13:18 +00:00
Brad Fitzpatrick 2eeaaaae75 net/http: fix bug where http2 wasn't enabled on DefaultTransport
I had accidentally disabled a headline feature at the last second. :(

Fixes #14391

Change-Id: I1992c9b801072b7538b95c55242be174075ff932
Reviewed-on: https://go-review.googlesource.com/19672
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-18 23:58:00 +00:00
Rhys Hiltner 98cc8b4cf2 cmd/link/internal/ld: remove unused call to os.Getwd
This call to os.Getwd (or getwd) has been part of the linker since the C
implementation in 7d507dc6e6. It stopped being used in 26438d4d80, and
survived the conversion to Go in 1f9dbb60ef.

Its return value goes unused (the linker gets the value for AT_comp_dir in
dwarf.go), remove it.

Change-Id: I3d4594813bb4ee0a6af31a36e19d99ec4b863677
Reviewed-on: https://go-review.googlesource.com/19655
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-18 22:34:29 +00:00
Matthew Dempsky 7555f7f2bf cmd/compile: cleanup mkbuiltin.go
Changes largely in preparation for eventually switching the builtin
export data to use the new binary format.

Replace fancy incremental line-by-line scanning with simply reading
the entire object file into memory, finding the export data section,
and processing it that way.

Just use "package runtime" and "package unsafe" in the builtin Go
source files so we don't need to rewrite references to "PACKAGE".

Stop looking for init_PACKAGE_function; it doesn't exist anyway.

Compile package runtime with -u so that its export data marks it as a
"safe" package.

Eliminate requirement to pass "runtime" and "unsafe" as command-line
arguments so that just "go run mkbuiltin.go" works.

Only rewrite builtin.go when successful.

Change-Id: I4addfde9e0cfb30607c7a83de686bde0ad1f035a
Reviewed-on: https://go-review.googlesource.com/19624
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-18 21:41:51 +00:00
Matthew Dempsky 7d80291c4c cmd/compile: eliminate Io.importsafe
It was only really necessary for ensuring that package runtime should
be treated as safe even without a "safe" marker, but mkbuiltin.go now
compiles it with -u.

Change-Id: Ifbcc62436ce40ab732ece667141afd82c1d3b64b
Reviewed-on: https://go-review.googlesource.com/19625
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-18 21:28:57 +00:00
Damien Neil 5bbb98df09 cmd/go, cmd/link: make builds deterministic
Add the following flags when supported by the compiler:
  -gno-record-gcc-switches
  -fdebug-prefix-map=$WORK=/tmp/go-build

Add an empty NAME symbol to the ELF .symtab. GNU ld will add a NAME
symbol when one is not present; including one of our own prevents it
from adding a reference to the link tempdir.

Fixes #13247 for compilers that support -fdebug-prefix-map. (gcc, clang
in the near future.)

Change-Id: I221c71fc59cd23ee8c99bcc038793ff4623c9ffc
Reviewed-on: https://go-review.googlesource.com/19363
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
2016-02-18 20:56:29 +00:00
Matthew Dempsky 1a94431a78 cmd/cgo: support multiple-value special form in VarDecl
Fixes #13930.

Change-Id: I124b7d31d1f2be05b7f23dafd1e52d9f3f02f3f0
Reviewed-on: https://go-review.googlesource.com/18623
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-18 20:12:20 +00:00
Robert Griesemer a576e9883c text/scanner: mention package when reporting errors to stderr
Fixes #14166.

Change-Id: I325b283a1d53e73a6d862611c446820ab94a161c
Reviewed-on: https://go-review.googlesource.com/19622
Reviewed-by: Damien Neil <dneil@google.com>
2016-02-18 19:46:51 +00:00
Matt Bostock 8fd1634f44 sort: Fix typo in stable sort comment
Fix `reverences`, which I believe should read as `references`.

Change-Id: I450efcbeee0f8861a84b209f2e6636764034232a
Reviewed-on: https://go-review.googlesource.com/19469
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-18 19:20:41 +00:00
Alberto Donizetti 3e91e8aa35 go/internal/gcimporter: add missing argument to error message
Change-Id: I3071f0e876506c6dc283e97bc15f157bf2ff011e
Reviewed-on: https://go-review.googlesource.com/19641
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-02-18 19:12:46 +00:00
Robert Griesemer c51f9173ad go/constant: fix doc strings
Fixes #14357.

Change-Id: I91acff0b0cc7be2bcbad68925a19a437dbd4c83d
Reviewed-on: https://go-review.googlesource.com/19620
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-02-18 17:44:29 +00:00
Rahul Chaudhry 6b9a0fa356 doc: fix typo in go1.6 release date.
Change-Id: If15fdcd3cd49394a0c1dffd39fbbeede11081ccb
Reviewed-on: https://go-review.googlesource.com/19528
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-02-17 23:13:51 +00:00
Chris Broadfoot 6030c75315 doc: document Go 1.6
Change-Id: I4910105d48ed650289ecb1490d556929db05bc38
Reviewed-on: https://go-review.googlesource.com/19526
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/19527
2016-02-17 22:07:28 +00:00
Russ Cox 939a9424de doc: remove DRAFT tags from go1.6.html
Go 1.6 is soon (but not yet).

Fixes #14301.

Change-Id: I85e329b643adcb5d4fa680c5333fbc1f928d4d9d
Reviewed-on: https://go-review.googlesource.com/19550
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-02-17 18:25:10 +00:00
Russ Cox c4f902bef4 net/http: update bundle command
This is the bundle command's new usage and new output header,
after CL 19428.

Actually running this command would work but would bring in
a newer x/net/http2 that we don't want yet.

Change-Id: Ic6082ca00102a2df1f7632eebf9aca41fdcdb444
Reviewed-on: https://go-review.googlesource.com/19551
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-02-17 18:23:46 +00:00
Russ Cox f997475129 doc: mention multi-change branches in contribute.html
Fixes #13651.

Change-Id: I1d21b49e2b5bc6c507eb084d6d2553e5a9c607cf
Reviewed-on: https://go-review.googlesource.com/19552
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-02-17 18:23:12 +00:00
Ian Lance Taylor aa22c42d70 cmd/go: avoid race on test environment
Fixes #14337.

Change-Id: I58aef7e08d936b0712da577dd1ce5c9ed5d8bfd2
Reviewed-on: https://go-review.googlesource.com/19513
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 22:02:56 +00:00
Austin Clements 7c22af830a runtime: fix deadlock in TestCrashDumpsAllThreads
TestCrashDumpsAllThreads carefully sets the number of Ps to one
greater than the number of non-preemptible loops it starts so that the
main goroutine can continue to run (necessary because of #10958).
However, if GC starts, it can take over that one spare P and lock up
the system while waiting for the non-preemptible loops, causing the
test to eventually time out. This deadlock is easily reproducible if
you run the runtime test with GOGC=1.

Fix this by forcing GOGC=off when running this test.

Change-Id: Ifb22da5ce33f9a61700a326ea92fcf4b049721d1
Reviewed-on: https://go-review.googlesource.com/19516
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 20:18:40 +00:00
Russ Cox feb2a5d610 cmd/compile: print struct tags in var decl in inlined func body
This bug was introduced in golang.org/cl/18217,
while trying to fix #13777.

Originally I wanted to just disable inlining for the case
being handled incorrectly, but it's fairly difficult to detect
and much easier just to fix. Since the case being handled
incorrectly was inlined correctly in Go 1.5, not inlining it
would also be somewhat of a regression.
So just fix it.

Test case copied from Ian's CL 19520.

The mistake to worry about in this CL would be relaxing
the condition too much (we now print the note more often
than we did yesterday). To confirm that we'd catch this mistake,
I checked that changing (!fmtbody || !t.Funarg) to (true) does
cause fixedbugs/issue13777.go to fail. And putting it back
to what is written in this CL makes that test pass again
as well as the new fixedbugs/issue14331.go.
So I believe that the new condition is correct for both constraints.

Fixes #14331.

Change-Id: I91f75a4d5d07c53af5caea1855c780d9874b8df6
Reviewed-on: https://go-review.googlesource.com/19514
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-16 19:39:10 +00:00
Alex Brainman e136cac48c net: make TestInterfaceAddrsWithNetsh more robust
TestInterfaceAddrsWithNetsh invokes Windows netsh command passing
it a particular interface name. This approach somehow does not work
on some computers (see issue for details). Change that to call netsh
without specifying any interface name. This provides output for all
interfaces available. So we can achieve same goal parsing this output.
Also makes test faster because we only need to invoke netsh once.

Fixes #14130.

Change-Id: I7911692ca64e372af1e1f9d6acb718c67071de67
Reviewed-on: https://go-review.googlesource.com/19441
Reviewed-by: Volker Dobler <dr.volker.dobler@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 17:16:00 +00:00
Austin Clements 0c02bc009a runtime: show panics in traceback
We used to include panic calls in tracebacks; however, when
runtime.panic was renamed to runtime.gopanic in the conversion of the
runtime to Go, we missed the special case in showframe that includes
panic calls even though they're in package runtime.

Fix the function name check in showframe (and, while we're here, fix
the other check for "runtime.panic" in runtime/pprof). Since the
"runtime.gopanic" name doesn't match what users call panic and hence
isn't very user-friendly, make traceback rewrite it to just "panic".

Updates #5832, #13857. Fixes #14315.

Change-Id: I8059621b41ec043e63d5cfb4cbee479f47f64973
Reviewed-on: https://go-review.googlesource.com/19492
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 16:58:43 +00:00
Russ Cox 095c0e5c00 doc: fix remaining TODOs in Go 1.6 release notes
Fixes #14300.

Change-Id: Idb6a300fe0e06fb8966cf06b55f9b252752a69a6
Reviewed-on: https://go-review.googlesource.com/19459
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-16 16:46:17 +00:00
Austin Clements 62fad436bb doc: tweak Go 1.6 GC release notes
Go 1.6 significantly improves pause times for large heaps, but it
improves them in many other situations as well, such as when goroutine
churn is high, allocation rate is high, or when there are many
finalizers. Hence, make the statement about pause times a bit more
general.

Change-Id: Ic034b1c904c39dd1d966ee7fa96ca8bbb3614e53
Reviewed-on: https://go-review.googlesource.com/19504
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-02-16 16:45:18 +00:00
Austin Clements 18aefe9c19 doc: fix non-possessive "'s"
Currently we use "Section's" as the plural of the debug/elf Section
struct. Change this to "Sections" because it's not possessive and
doesn't seem to fall in to any special cases were the apostrophe is
acceptable.

Change-Id: Id5d3abbd748502a67ead3f483182ee7729db94a2
Reviewed-on: https://go-review.googlesource.com/19505
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 16:44:53 +00:00
Ian Lance Taylor 387d5b8cfb runtime: remove debugging print in cgoCheckTypedBlock
Change-Id: I83639fcde88e7d9747b54728a9481ee2e1b23a64
Reviewed-on: https://go-review.googlesource.com/19486
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-02-13 17:33:22 +00:00
Brad Fitzpatrick 76cb265f28 net/http: update bundled http2 to fix gzip crash on Read after NewReader error
Updates x/net/http2 to git rev 62685c2 for https://golang.org/cl/19483

Change-Id: Id01331cdba03934a6e55e55ad9c2ae27461ba149
Reviewed-on: https://go-review.googlesource.com/19484
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-13 06:46:47 +00:00
Keith Randall e3033fc535 cmd/compile: add write barrier to type switch
Type switches need write barriers if the written-to
variable is heap allocated.

For the added needwritebarrier call, the right arg doesn't
really matter, I just pass something that will never disqualify
the write barrier.  The left arg is the one that matters.

Fixes #14306

Change-Id: Ic2754167cce062064ea2eeac2944ea4f77cc9c3b
Reviewed-on: https://go-review.googlesource.com/19481
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-12 21:07:21 +00:00
Ian Lance Taylor c93193aec0 runtime: return errno value from Solaris mmap as expected
The code in mem_bsd.go expects that when mmap fails it will return a
positive errno value.  This fixes the Solaris implementation of mmap to
work as expected.

Change-Id: Id1c34a9b916e8dc955ced90ea2f4af8321d92265
Reviewed-on: https://go-review.googlesource.com/19477
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-12 19:20:19 +00:00
Ryan Brown 68aa7fb636 cmd/link: fix padding for dwarf aranges on 32 bit platforms.
Fixes #14278

Change-Id: I6a0c1370d595f0573ff0eb933450b1eea41f4bb3
Reviewed-on: https://go-review.googlesource.com/19452
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-12 19:13:11 +00:00
Ian Lance Taylor cc0a04d351 runtime: fix errno sign for some mmap and mincore cases
The caller of mmap expects it to return a positive errno value, but the
linux-arm64 and nacl-386 system calls returned a negative errno value.
Correct them to negate the errno value.

The caller of mincore expects it to return a negative errno value (yes,
this is inconsistent), but the linux-mips64x and linux-ppc64x system
call returned a positive errno value.  Correct them to negate the errno
value.

Add a test that mmap returns errno with the correct sign.  Brad added a
test for mincore's errno value in https://golang.org/cl/19457.

Fixes #14297.

Change-Id: I2b93f32e679bd1eae1c9aef9ae7bcf0ba39521b5
Reviewed-on: https://go-review.googlesource.com/19455
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-12 00:07:29 +00:00
Brad Fitzpatrick 70418eb819 runtime: add test for mincore's return value sign on Linux
Updates #14297

Change-Id: I6b5f5020af5efaaa71280bdeb2ff99785ee9b959
Reviewed-on: https://go-review.googlesource.com/19457
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-11 19:09:50 +00:00
Brad Fitzpatrick 53b6661673 net/http/httptest: make Server.CloseClientConnections wait for conns to close
httptest.Server was rewritten during Go 1.6, but
CloseClientConnections was accidentally made async in the rewrite and
not caught due to lack of tests.

Restore the Go 1.5 behavior and add tests.

Fixes #14290
Updates #14291

Change-Id: I14f01849066785053ccca2373931bc82d78c0a13
Reviewed-on: https://go-review.googlesource.com/19432
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-10 21:30:13 +00:00
Robert Griesemer 7ebf653fcc go/internal/gcimporter: interpret relative srcDir relative to cwd
1) go/types.dir: Correctly return "." if there is no path.
2) go/internal/gcimporter.FindPkg: work-around for build.Import
   (build.Import doesn't produce expected result if srcDir is
   relative). See also issue 14282.

Fixes #14215.

Change-Id: Ia3721f9ad8a1115d2595fe99b04baaf30d5765f2
Reviewed-on: https://go-review.googlesource.com/19393
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-10 16:46:50 +00:00
Volker Dobler 811b785193 net: make getmac based tests on windows more robust
The Windows 7 getmac command may report the physical address of an adapter
as "Disabled" or "N/A". Handle these two cases to make the tests more
robust when building on Windows with manually disabled adapters or turned
off hardware.

Addresses issue #14130.

Change-Id: I0c2f8554b4b6810568e4e60ed53857599401f296
Reviewed-on: https://go-review.googlesource.com/19411
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-10 14:42:30 +00:00
Brad Fitzpatrick 79d9f48c73 net/http: be more conservative about enabling http2 on Transports
For now, don't enable http2 when Transport.TLSConfig != nil.
See background in #14275.

Also don't enable http2 when ExpectContinueTimeout is specified for
now, in case somebody depends on that functionality. (It is not yet
implemented in http2, and was only just added to net/http too in Go
1.6, so nobody would be setting it yet).

Updates #14275
Updates #13851

Change-Id: I192d555f5fb0a567bd89b6ad87175bbdd7891ae3
Reviewed-on: https://go-review.googlesource.com/19424
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-09 21:12:32 +00:00
Russ Cox ee451770a7 cmd/go: use GOPATH order for compile -I and link -L options
Given GOPATH=p1:p2 and source code of just the right form,
the go command could previously end up invoking the compiler
with -I p2 -I p1 or the linker with -L p2 -L p1, so that
compiled packages in p2 incorrectly shadowed packages in p1.
If foo were in both p1 and p2 and the compilation of bar
were such that the -I and -L options were inverted in this way,
then

	GOPATH=p2 go install foo
	GOPATH=p1:p2 go install bar

would get the p2 copy of foo instead of the (expected) p1 copy of foo.

This manifested in real usage in a few different ways, but in all
the root cause was that the -I or -L option sequence did not
match GOPATH.

Make it match GOPATH.

Fixes #14176 (second report).
Fixes #14192.
Related but less common issue #14271 not fixed.

Change-Id: I9c0f69042bb2bf92c9fc370535da2c60a1187d30
Reviewed-on: https://go-review.googlesource.com/19385
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2016-02-09 20:36:10 +00:00
Russ Cox 558a213d55 build: mv cmd/vendor cmd/internal/unvendor
And update two imports in cmd/internal/objfile/disasm.go.
This makes GO15VENDOREXPERIMENT=0 ./make.bash work.
For Go 1.7 we will move it back.

Fixes #14236.

Change-Id: I429c9af4baff8496f83d113b1b03b90e309f4f48
Reviewed-on: https://go-review.googlesource.com/19384
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-09 20:36:08 +00:00
Russ Cox 97572d5552 cmd/go: silence standard imports non-standard error for non-existent import target
This error only affects the compilation of the standard library,
but I discovered that if you import "notexist" from the standard
library then you get both an error about notexist not existing
and an error about notexist being a non-standard package
(because the non-existant package is in fact not a standard package).
Silence the second error.

Change-Id: Ib4c1523e89844260fde90de3459ec1e752df8f25
Reviewed-on: https://go-review.googlesource.com/19383
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-09 20:36:06 +00:00
Brad Fitzpatrick 6a208efbdf net/http: make ListenAndServeTLS treat GetCertificate as a set cert too
ListenAndServeTLS doesn't require cert and key file names if the
server's TLSConfig has a cert configured. This code was never updated
when the GetCertificate hook was added to *tls.Config, however.

Fixes #14268

Change-Id: Ib282ebb05697edd37ed8ff105972cbd1176d900b
Reviewed-on: https://go-review.googlesource.com/19381
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-09 00:17:25 +00:00
Robert Griesemer 41191e192c go/constant: fix String() implementation
Fixes #14262.

Change-Id: Id590995dd4460e81f6b91bcfb3f02515a97650fe
Reviewed-on: https://go-review.googlesource.com/19361
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-08 23:10:00 +00:00
Brad Fitzpatrick 77b4c8d9af runtime: fix comment
Fixes #14259

Change-Id: I23fedec0eb85ae28e56bc24539bc864674856130
Reviewed-on: https://go-review.googlesource.com/19318
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-08 22:12:42 +00:00
Robert Griesemer 33a9a98e4d go/types: make sure constants valid in integer operations are in integer form
The operation where this manifested in a crash was % (only defined on integers).
However, the existing code was sloppy in that it didn't retain the integer form
after a value (e.g., 3.0) was accepted as representable in integer form (3 for
the example). We would have seen a crash in such cases for / as well except
that there was code to fix it for just that case.

Remove the special code for / and fix more generally by retaining the integer
form for all operations if applicable.

Fixes #14229.

Change-Id: I8bef769e6299839fade27c6e8b5ff29ad6521d0d
Reviewed-on: https://go-review.googlesource.com/19300
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-02-08 18:05:04 +00:00
Mikio Hara fa5e5478c8 runtime: don't call testing.Fatal from worker goroutines
Change-Id: I630d4d2d8a914d6c07f22351a56d5e44a937123e
Reviewed-on: https://go-review.googlesource.com/19245
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-02-07 03:18:28 +00:00
Ian Lance Taylor 54b4b946b6 net/http: deflake TestCloseNotifierPipelined
The test sends two HTTP/1.1 pipelined requests.  The first is
completedly by the second, and as such triggers an immediate call to the
CloseNotify channel.  The second calls the CloseNotify channel after the
overall connection is closed.

The test was passing fine on gc because the code would enter the select
loop before running the handler, so the send on gotReq would always be
seen first.  On gccgo the code would sometimes enter the select loop
after the handler had already finished, meaning that the select could
choose between gotReq and sawClose.  If it picked sawClose, it would
never close the overall connection, and the httptest server would hang.
The same hang could be induced with gc by adding a time.Sleep
immediately before the select loop.

Deflake the test by 1) don't close the overall connection until both
requests have been seen; 2) don't exit the loop until both closes have
been seen.

Fixes #14231.

Change-Id: I9d20c309125422ce60ac545f78bcfa337aec1c7d
Reviewed-on: https://go-review.googlesource.com/19281
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-06 23:33:23 +00:00
Brad Fitzpatrick fd9fd4c39d net/http: fix doc typo
Change-Id: I93201fa4152f2d60b3eedb8d321a152819033121
Reviewed-on: https://go-review.googlesource.com/19270
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-05 17:06:51 +00:00
Brad Fitzpatrick dc89b5b48f net/http: update bundled http2
Updates x/net/http2 to git rev 493a262 for https://golang.org/cl/19223

Fixes #14227

Change-Id: I626122811138fb3d88e4eea83f8da3fdcf91e0dc
Reviewed-on: https://go-review.googlesource.com/19250
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-05 02:07:02 +00:00