]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agoruntime: fix scanning of gc work buffer
Keith Randall [Tue, 30 Sep 2014 15:51:02 +0000 (08:51 -0700)]
runtime: fix scanning of gc work buffer

GC types were not being generated for the garbage collector
work buffer.  The markfor object was being collected as a result.
This broke amd64p32 and maybe plan9 builds.  Why it didn't break
every build I'm not sure...

Fixes #8812

LGTM=0intro, rsc
R=golang-codereviews, dave, khr, 0intro, rsc
CC=golang-codereviews
https://golang.org/cl/149260043

10 years agoruntime: fix throwsplit check
Dmitriy Vyukov [Tue, 30 Sep 2014 15:34:33 +0000 (19:34 +0400)]
runtime: fix throwsplit check
Newstack runs on g0, g0->throwsplit is never set.

LGTM=rsc
R=rsc
CC=golang-codereviews, khr
https://golang.org/cl/147370043

10 years agoruntime: initialize traceback variables earlier
Keith Randall [Tue, 30 Sep 2014 04:21:36 +0000 (21:21 -0700)]
runtime: initialize traceback variables earlier

Our traceback code needs to know the PC of several special
functions, including goexit, mcall, etc.  Make sure that
these PCs are initialized before any traceback occurs.

Fixes #8766

LGTM=rsc
R=golang-codereviews, rsc, khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/145570043

10 years agonet/http: make Transport.CloseIdleConnections also close pending dials
Brad Fitzpatrick [Tue, 30 Sep 2014 01:16:15 +0000 (18:16 -0700)]
net/http: make Transport.CloseIdleConnections also close pending dials

See comment 4 of https://code.google.com/p/go/issues/detail?id=8483#c4:

"So if a user creates a http.Client, issues a bunch of
requests and then wants to shutdown it and all opened connections;
what is she intended to do? The report suggests that just waiting for
all pending requests and calling CloseIdleConnections won't do, as
there can be new racing connections. Obviously she can't do what
you've done in the test, as it uses the unexported function.  If this
happens periodically, it can lead to serious resource leaks (the
transport is also preserved alive).  Am I missing something?"

This CL tracks the user's intention to close all idle
connections (CloseIdleConnections sets it true; and making a
new request sets it false). If a pending dial finishes and
nobody wants it, before it's retained for a future caller, the
"wantIdle" bool is checked and it's closed if the user has
called CloseIdleConnections without a later call to make a new
request.

Fixes #8483

LGTM=adg
R=golang-codereviews, dvyukov, adg
CC=golang-codereviews, rsc
https://golang.org/cl/148970043

10 years agogo/format, cmd/gofmt: fix issues with partial Go code with indent
Dmitri Shuralyov [Tue, 30 Sep 2014 00:04:48 +0000 (17:04 -0700)]
go/format, cmd/gofmt: fix issues with partial Go code with indent

Fixes #5551.
Fixes #4449.

Adds tests for both issues.

Note that the two issues occur only when formatting partial Go code
with indent.

The best way to understand the change is as follows: I took the code
of cmd/gofmt and go/format, combined it into one unified code that
does not suffer from either 4449 nor 5551, and then applied that code
to both cmd/gofmt and go/format.

As a result, there is now much more identical code between the two
packages, making future code deduplication easier (it was not possible
to do that now without adding public APIs, which I was advised not to
do at this time).

More specifically, I took the parse() of cmd/gofmt which correctly
preserves comments (issue 5551) and modified it to fix issue where
it would sometimes modify literal values (issue 4449).

I ended up removing the matchSpace() function because it no longer
needed to do some of its work (insert indent), and a part of its work
had to be done in advance (determining the indentation of first code
line), because that calculation is required for cfg.Fprint() to run.

adjustIndent is used to adjust the indent of cfg.Fprint() to compensate
for the body of wrapper func being indented by one level. This allows
to get rid of the bytes.Replace text manipulation of inner content,
which was problematic and sometimes altered raw string literals (issue
4449). This means that sometimes the value of cfg.Indent is negative,
but that works as expected.

So now the algorithm for formatting partial Go code is:

1. Determine and prepend leading space of original source.
2. Determine and prepend indentation of first code line.
3. Format and write partial Go code (with all of its leading &
   trailing space trimmed).
4. Determine and append trailing space of original source.

LGTM=gri
R=golang-codereviews, bradfitz, gri
CC=golang-codereviews
https://golang.org/cl/142360043

10 years agoliblink: generate MRC replacement in liblink, not tls_arm
Dave Cheney [Tue, 30 Sep 2014 00:03:10 +0000 (10:03 +1000)]
liblink: generate MRC replacement in liblink, not tls_arm

Fixes #8690.

This CL moves the save of LR around BL runtime.read_tls_fallback to liblink as it is not needed when MRC is not replaced.

LGTM=rsc, minux
R=rsc, khr, minux
CC=golang-codereviews
https://golang.org/cl/147310043

10 years agox509: add root certs for android.
Tom Linford [Mon, 29 Sep 2014 23:51:49 +0000 (09:51 +1000)]
x509: add root certs for android.

On android, root certificates appear to be stored in the folder
/system/etc/security/cacerts, which has many certs in several
different files. This change adds a new array of directories in
which certs can be found.

To test this, I simply tried making a request with the http
library to an HTTPS URL on an android emulator and manually
verified that it worked.

LGTM=crawshaw
R=golang-codereviews, gobot, crawshaw
CC=golang-codereviews
https://golang.org/cl/151800043

10 years agoA+C: Tom Linford (individual CLA)
Brad Fitzpatrick [Mon, 29 Sep 2014 22:57:03 +0000 (15:57 -0700)]
A+C: Tom Linford (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/149260044

10 years agoruntime: delete unused variables.
Keith Randall [Mon, 29 Sep 2014 21:05:33 +0000 (14:05 -0700)]
runtime: delete unused variables.

We're not comparing with code addresses any more.  Instead,
we use nil algorithm functions to mark uncomparable types.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/151040044

10 years agonet/http: enable Transfer-Encoding: identity without Content-Length for HTTP 1.1.
James Tucker [Mon, 29 Sep 2014 20:53:42 +0000 (13:53 -0700)]
net/http: enable Transfer-Encoding: identity without Content-Length for HTTP 1.1.

Use case is SSE recommended configuration: http://www.w3.org/TR/eventsource/#notes
Removes a TODO.

LGTM=bradfitz
R=golang-codereviews, bradfitz, tommi.virtanen
CC=golang-codereviews
https://golang.org/cl/100000044

10 years agonet/http: clarify Request.FormValue docs
Brad Fitzpatrick [Mon, 29 Sep 2014 20:42:33 +0000 (13:42 -0700)]
net/http: clarify Request.FormValue docs

Fixes #8067

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/146480043

10 years agocmd/yacc: fix handling of tokens that don't start with letters
Ian Lance Taylor [Mon, 29 Sep 2014 20:32:14 +0000 (13:32 -0700)]
cmd/yacc: fix handling of tokens that don't start with letters

CL 149110043 changed yacc to no longer keep a leading space
for quoted tokens.  That is OK by itself but unfortunately
yacc was relying on that leading space to notice which tokens
it should not output as const declarations.

Add a few such tokens to expr.y, although it won't make any
immediate difference as we seem to have no tests for yacc.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/152720043

10 years agoundo CL 141840043 / 65e21380cb2a
Brad Fitzpatrick [Mon, 29 Sep 2014 20:28:08 +0000 (13:28 -0700)]
undo CL 141840043 / 65e21380cb2a

Unnecessary; covered by https://golang.org/cl/141690043

Verified by jonathan@titanous.com on golang-dev.

««« original CL description
cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes #8684.

LGTM=bradfitz
R=golang-codereviews, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/141840043

»»»

LGTM=jonathan, iant
R=iant, jonathan
CC=golang-codereviews
https://golang.org/cl/150250045

10 years agospec: specify variable initialization order explicitly
Robert Griesemer [Mon, 29 Sep 2014 19:44:50 +0000 (12:44 -0700)]
spec: specify variable initialization order explicitly

The existing spec rules on package initialization were
contradictory: They specified that 1) dependent variables
are initialized in dependency order, and 2) independent
variables are initialized in declaration order. This 2nd
rule cannot be satisfied in general. For instance, for

var (
        c = b + 2
        a = 0
        b = 1
)

because of its dependency on b, c must be initialized after b,
leading to the partial order b, c. Because a is independent of
b but is declared before b, we end up with the order: a, b, c.
But a is also independent of c and is declared after c, so the
order b, c, a should also be valid in contradiction to a, b, c.

The new rules are given in form of an algorithm which outlines
initialization order explicitly.

gccgo and go/types already follow these rules.

Fixes #8485.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, gordon.klaus, adonovan
CC=golang-codereviews
https://golang.org/cl/142880043

10 years agocrypto/x509: accept CRLs without an expiry.
Adam Langley [Mon, 29 Sep 2014 19:26:51 +0000 (12:26 -0700)]
crypto/x509: accept CRLs without an expiry.

RFC5280 says that the nextUpdate field is optional.

Fixes #8085.

R=bradfitz
CC=golang-codereviews
https://golang.org/cl/149770044

10 years agonet: fix misleading package comment example
Brad Fitzpatrick [Mon, 29 Sep 2014 19:24:06 +0000 (12:24 -0700)]
net: fix misleading package comment example

Fixes #8607

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/146470043

10 years agogo/build: add go1.4 tag.
Adam Langley [Mon, 29 Sep 2014 19:23:43 +0000 (12:23 -0700)]
go/build: add go1.4 tag.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/138000044

10 years agoC: add Andres Erbsen (Google CLA)
Adam Langley [Mon, 29 Sep 2014 19:15:25 +0000 (12:15 -0700)]
C: add Andres Erbsen (Google CLA)

LGTM=bradfitz, minux
R=bradfitz, minux
CC=golang-codereviews
https://golang.org/cl/119540043

10 years agocmd/ld: close outfile before cleanup
Jonathan Rudenberg [Mon, 29 Sep 2014 19:13:22 +0000 (12:13 -0700)]
cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes #8684.

LGTM=bradfitz
R=golang-codereviews, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/141840043

10 years agoruntime: fix cgo_topofstack to save clobbered registers
Keith Randall [Mon, 29 Sep 2014 06:52:08 +0000 (23:52 -0700)]
runtime: fix cgo_topofstack to save clobbered registers

Fixes #8816

At least, I hope it does.

TBR=rsc
CC=golang-codereviews
https://golang.org/cl/153730043

10 years agocmd/ld: don't automatically mark symbols created by -X as reachable
Ian Lance Taylor [Sun, 28 Sep 2014 15:27:05 +0000 (08:27 -0700)]
cmd/ld: don't automatically mark symbols created by -X as reachable

This fixes the bug in which the linker reports "missing Go
type information" when a -X option refers to a symbol that is
not used.

Fixes #8821.

LGTM=rsc
R=rsc, r
CC=golang-codereviews
https://golang.org/cl/151000043

10 years agodoc/faq: update for 1.4
Rob Pike [Sat, 27 Sep 2014 18:56:54 +0000 (11:56 -0700)]
doc/faq: update for 1.4

LGTM=iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/150190043

10 years agomath: avoid assumption of denormalized math mode in Sincos
Russ Cox [Fri, 26 Sep 2014 21:13:24 +0000 (17:13 -0400)]
math: avoid assumption of denormalized math mode in Sincos

The extra-clever code in Sincos is trying to do

        if v&2 == 0 {
                mask = 0xffffffffffffffff
        } else {
                mask = 0
        }

It does this by turning v&2 into a float64 X0 and then using

        MOVSD $0.0, X3
        CMPSD X0, X3, 0

That CMPSD is defined to behave like:

        if X0 == X3 {
                X3 = 0xffffffffffffffff
        } else {
                X3 = 0
        }

which gives the desired mask in X3. The goal in using the
CMPSD was to avoid a conditional branch.

This code fails when called from a PortAudio callback.
In particular, the failure behavior is exactly as if the
CMPSD always chose the 'true' execution.

Notice that the comparison X0 == X3 is comparing as
floating point values the 64-bit pattern v&2 and the actual
floating point value zero. The only possible values for v&2
are 0x0000000000000000 (floating point zero)
and 0x0000000000000002 (floating point 1e-323, a denormal).
If they are both comparing equal to zero, I conclude that
in a PortAudio callback (whatever that means), the processor
is running in "denormals are zero" mode.

I confirmed this by placing the processor into that mode
and running the test case in the bug; it produces the
incorrect output reported in the bug.

In general, if a Go program changes the floating point math
modes to something other than what Go expects, the math
library is not going to work exactly as intended, so we might
be justified in not fixing this at all.

However, it seems reasonable that the client code might
have expected "denormals are zero" mode to only affect
actual processing of denormals. This code has produced
what is in effect a gratuitous denormal by being extra clever.
There is nothing about the computation being requested
that fundamentally requires a denormal.

It is also easy to do this computation in integer math instead:

        mask = ((v&2)>>1)-1

Do that.

For the record, the other math tests that fail if you put the
processor in "denormals are zero" mode are the tests for
Frexp, Ilogb, Ldexp, Logb, Log2, and FloatMinMax, but all
fail processing denormal inputs. Sincos was the only function
for which that mode causes incorrect behavior on non-denormal inputs.

The existing tests check that the new assembly is correct.
There is no test for behavior in "denormals are zero" mode,
because I don't want to add assembly to change that.

Fixes #8623.

LGTM=josharian
R=golang-codereviews, josharian
CC=golang-codereviews, iant, r
https://golang.org/cl/151750043

10 years agodoc/go1.4: go test builds + links all test files (CL 150980043)
Russ Cox [Fri, 26 Sep 2014 21:09:40 +0000 (17:09 -0400)]
doc/go1.4: go test builds + links all test files (CL 150980043)

CC=golang-codereviews
https://golang.org/cl/144660043

10 years agocmd/go: always build _test.go files and link into test
Russ Cox [Fri, 26 Sep 2014 21:09:11 +0000 (17:09 -0400)]
cmd/go: always build _test.go files and link into test

go test's handling of _test.go files when the entire
package's set of files has no Test functions has varied
over the past few releases. There are a few interesting
cases (all contain no Test functions):
        (1) x_test.go has syntax errors
        (2) x_test.go has type errors
        (3) x_test.go has runtime errors (say, a func init that panics)

In Go 1.1, tests with (1) or (2) failed; (3) passed.
In Go 1.2, tests with (1) or (2) failed; (3) passed.
In Go 1.3, tests with (1) failed; (2) or (3) passed.
After this CL, tests with (1), (2), or (3) all fail.

This is clearly a corner case, but it seems to me that
the behavior of the test should not change if you
add or remove a line like

        func TestAlwaysPasses(t *testing.T) {}

That implies that the _test.go files must always
be built and always be imported into the test binary.
Doing so means that (1), (2), and (3) must all fail.

Fixes #8337.

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, r
https://golang.org/cl/150980043

10 years agocmd/yacc: fix parsing of character tokens
Russ Cox [Fri, 26 Sep 2014 21:03:31 +0000 (17:03 -0400)]
cmd/yacc: fix parsing of character tokens

From issue 7967 I learned:

1) yacc accepts either 'x' or "x" to mean token value 0x78
2) yacc also accepts 'xyz' and "XYZ" to mean token value 0x78

Use strconv.Unquote to simplify the handling of quoted
strings and check that each has only one rune.

Although this does clean things up, it makes 'x' and "x"
treated as different internally (now they are stored as
`'x'` and `"x"`; before they were both ` x`). Grammars that
use both interchangeably will now die with an error
similar to the one from issue 7967:

        yacc bug -- cannot have 2 different Ts with same value
                "+" and '+'

The echoing of the quotes should make clear what is going on.

The other semantic change caused by using strconv.Unquote
is that '\"' and "\'" are no longer valid. Like in Go, they must be
spelled without the backslash: '"' and "'".

On the other hand, now yacc and Go agree about what character
and string literals mean.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/149110043

10 years agoflag: allow CommandLine's Usage function to be set
Rob Pike [Fri, 26 Sep 2014 19:33:05 +0000 (12:33 -0700)]
flag: allow CommandLine's Usage function to be set

Fixes #7779.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/147210043

10 years agocmd/go: fix -a
Russ Cox [Fri, 26 Sep 2014 19:15:48 +0000 (15:15 -0400)]
cmd/go: fix -a

The one line that you can't test easily was broken.
This manifested as a failure of a pre-existing test
in test.bash but I didn't notice it (there are a few other
long-standing failures that need to be fixed).

TBR=r
CC=golang-codereviews
https://golang.org/cl/146340044

10 years agocmd/go: make build -a skip standard packages in Go releases
Russ Cox [Fri, 26 Sep 2014 18:41:26 +0000 (14:41 -0400)]
cmd/go: make build -a skip standard packages in Go releases

Today, 'go build -a my/pkg' and 'go install -a my/pkg'
recompile not just my/pkg and all its dependencies that
you wrote but also the standard library packages.
Recompiling the standard library is problematic on
some systems because the installed copy is not writable.

The -a behavior means that you can't use 'go install -a all'
or 'go install -a my/...' to rebuild everything after a Go
release - the rebuild stops early when it cannot overwrite
the installed standard library.

During development work, however, you do want install -a
to rebuild everything, because anything might have changed.

Resolve the conflict by making the behavior of -a depend
on whether we are using a released copy of Go or a devel copy.
In the release copies, -a no longer applies to the standard library.
In the devel copies, it still does.

This is the latest in a long line of refinements to the
"do I build this or not" logic. It is surely not the last.

Fixes #8290.

LGTM=r
R=golang-codereviews, r, tracey.brendan
CC=adg, golang-codereviews, iant
https://golang.org/cl/151730045

10 years agodoc/go1.4: add some cmd/go changes
Russ Cox [Fri, 26 Sep 2014 18:37:38 +0000 (14:37 -0400)]
doc/go1.4: add some cmd/go changes

CC=golang-codereviews
https://golang.org/cl/143650043

10 years agocmd/go: handle paths like \x.go on windows
Alex Brainman [Fri, 26 Sep 2014 18:36:49 +0000 (14:36 -0400)]
cmd/go: handle paths like \x.go on windows

Fixes #8130.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/143200043

10 years agoliblink: fix cmd/ld -X flag
Russ Cox [Fri, 26 Sep 2014 17:50:53 +0000 (13:50 -0400)]
liblink: fix cmd/ld -X flag

This fixes the test/linkx.go test, which does not run by default.
(Issue 4139 is about fixing that.)

Fixes #8806.

LGTM=r
R=golang-codereviews, r
CC=bradfitz, golang-codereviews, iant
https://golang.org/cl/145420043

10 years agocmd/go: document that testdata directories are ignored
Russ Cox [Fri, 26 Sep 2014 17:50:39 +0000 (13:50 -0400)]
cmd/go: document that testdata directories are ignored

Also rebuild doc.go; was stale, so contains extra changes.

Fixes #8677.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://golang.org/cl/148170043

10 years agocmd/go: add test -o flag to control where test binary is written
Russ Cox [Fri, 26 Sep 2014 17:50:02 +0000 (13:50 -0400)]
cmd/go: add test -o flag to control where test binary is written

While we are here, remove undocumented, meaningless test -file flag.

Fixes #7724.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://golang.org/cl/149070043

10 years agocmd/go: display program name when reporting crash
Russ Cox [Fri, 26 Sep 2014 17:48:30 +0000 (13:48 -0400)]
cmd/go: display program name when reporting crash

Fix by atom (from CL 89190044), comment and test by me.

Fixes #6823.

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=0xe2.0x9a.0x9b, adg, golang-codereviews, iant, r
https://golang.org/cl/148180043

10 years agocmd/go: make malformed import path message more precise
Russ Cox [Fri, 26 Sep 2014 17:47:51 +0000 (13:47 -0400)]
cmd/go: make malformed import path message more precise

If you say 'go get -v' you get extra information when import
paths are not of the expected form.

If you say 'go get -v src/rsc.io/pdf' the message says that
src/rsc.io/pdf does not contain a hostname, which is incorrect.
The problem is that it does not begin with a hostname.

Fixes #7432.

LGTM=r
R=golang-codereviews, r
CC=bradfitz, golang-codereviews, iant
https://golang.org/cl/144650043

10 years agocmd/go: re-resolve and check vcs roots during go get -u
Russ Cox [Fri, 26 Sep 2014 16:10:13 +0000 (12:10 -0400)]
cmd/go: re-resolve and check vcs roots during go get -u

If you do 'go get -u rsc.io/pdf' and then rsc.io/pdf's redirect
changes to point somewhere else, after this CL a later
'go get -u rsc.io/pdf' will tell you that.

Fixes #8548.

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, n13m3y3r, r
https://golang.org/cl/147170043

10 years agocmd/go: fix 'go get vanity/repo/...' in clean GOPATH
Russ Cox [Fri, 26 Sep 2014 16:09:27 +0000 (12:09 -0400)]
cmd/go: fix 'go get vanity/repo/...' in clean GOPATH

The pattern was only working if the checkout had
already been done, but the code was trying to make
it work even the first time. Test and fix.

Fixes #8335.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://golang.org/cl/146310043

10 years agocrypto/tls: ensure that we don't resume when tickets are disabled.
Adam Langley [Fri, 26 Sep 2014 01:02:09 +0000 (11:02 +1000)]
crypto/tls: ensure that we don't resume when tickets are disabled.

LGTM=r
R=r, adg, rsc
https://golang.org/cl/148080043

10 years agodoc: document Go 1.3.2
Andrew Gerrand [Fri, 26 Sep 2014 01:00:49 +0000 (11:00 +1000)]
doc: document Go 1.3.2

LGTM=r
R=r, rsc, iant, agl
https://golang.org/cl/142650045

10 years agotag go1.3.2
Andrew Gerrand [Fri, 26 Sep 2014 00:53:09 +0000 (10:53 +1000)]
tag go1.3.2

LGTM=r
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/150100044

10 years ago.hgignore: delete some dregs
Rob Pike [Fri, 26 Sep 2014 00:30:12 +0000 (17:30 -0700)]
.hgignore: delete some dregs
I'd rather delete the file but I doubt that will be popular.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/150100043

10 years agoencoding/gob: fix 386 build
Rob Pike [Fri, 26 Sep 2014 00:16:27 +0000 (17:16 -0700)]
encoding/gob: fix 386 build

LGTM=ruiu
R=golang-codereviews, ruiu
CC=golang-codereviews
https://golang.org/cl/146320043

10 years agoencoding/gob: error rather than panic when decoding enormous slices
Rob Pike [Thu, 25 Sep 2014 22:18:25 +0000 (15:18 -0700)]
encoding/gob: error rather than panic when decoding enormous slices
Fixes #8084.

LGTM=ruiu
R=golang-codereviews, ruiu
CC=golang-codereviews
https://golang.org/cl/142710043

10 years agodoc/gopher: add biplane.jpg
Rob Pike [Thu, 25 Sep 2014 21:10:56 +0000 (14:10 -0700)]
doc/gopher: add biplane.jpg

LGTM=0intro
R=golang-codereviews, 0intro
CC=golang-codereviews
https://golang.org/cl/150960043

10 years agocmd/go: install dependencies for 'go build -i' on a command
Russ Cox [Thu, 25 Sep 2014 19:57:52 +0000 (15:57 -0400)]
cmd/go: install dependencies for 'go build -i' on a command

Fixes #8242.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://golang.org/cl/147150043

10 years agospec: clarify scope and re-use of iteration variables
Robert Griesemer [Thu, 25 Sep 2014 19:52:05 +0000 (12:52 -0700)]
spec: clarify scope and re-use of iteration variables

Fixes #7834.

LGTM=iant, rsc, r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/148940044

10 years agospec: clarify embedding of interfaces
Robert Griesemer [Thu, 25 Sep 2014 19:49:42 +0000 (12:49 -0700)]
spec: clarify embedding of interfaces

Fixes #7886.

LGTM=iant, r, rsc
R=r, iant, rsc, ken
CC=golang-codereviews
https://golang.org/cl/149010043

10 years agobufio: fix handling of empty tokens at end of line/file
Rob Pike [Thu, 25 Sep 2014 19:45:21 +0000 (12:45 -0700)]
bufio: fix handling of empty tokens at end of line/file
Fixes #8672.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/145390043

10 years agotime: make it clear that time.Time values do not compare with ==
Rob Pike [Thu, 25 Sep 2014 17:52:02 +0000 (10:52 -0700)]
time: make it clear that time.Time values do not compare with ==

LGTM=bradfitz, josharian, adg, rsc
R=golang-codereviews, bradfitz, josharian, rsc, adg
CC=golang-codereviews
https://golang.org/cl/141340043

10 years agocmd/gc: emit error for out-of-bounds slice of constant string
Russ Cox [Thu, 25 Sep 2014 17:24:43 +0000 (13:24 -0400)]
cmd/gc: emit error for out-of-bounds slice of constant string

Fixes #7200.

LGTM=gri, iant
R=golang-codereviews, gri, iant
CC=golang-codereviews, r
https://golang.org/cl/150020044

10 years agocmd/gc: print x++ (not x += 1) in errors about x++
Russ Cox [Thu, 25 Sep 2014 17:13:02 +0000 (13:13 -0400)]
cmd/gc: print x++ (not x += 1) in errors about x++

Fixes #8311.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/146270043

10 years agocmd/gc: avoid infinite recursion on invalid recursive type
Russ Cox [Thu, 25 Sep 2014 17:08:37 +0000 (13:08 -0400)]
cmd/gc: avoid infinite recursion on invalid recursive type

Fixes #8507.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/144560043

10 years agoruntime: add load_g call in arm callback.
Keith Randall [Thu, 25 Sep 2014 15:37:04 +0000 (08:37 -0700)]
runtime: add load_g call in arm callback.

Need to restore the g register.  Somehow this line vaporized from
CL 144130043.  Also cgo_topofstack -> _cgo_topofstack, that vaporized also.

TBR=rsc
CC=golang-codereviews
https://golang.org/cl/150940044

10 years agocgo: adjust return value location to account for stack copies.
Keith Randall [Thu, 25 Sep 2014 14:59:01 +0000 (07:59 -0700)]
cgo: adjust return value location to account for stack copies.

During a cgo call, the stack can be copied.  This copy invalidates
the pointer that cgo has into the return value area.  To fix this
problem, pass the address of the location containing the stack
top value (which is in the G struct).  For cgo functions which
return values, read the stktop before and after the cgo call to
compute the adjustment necessary to write the return value.

Fixes #8771

LGTM=iant, rsc
R=iant, rsc, khr
CC=golang-codereviews
https://golang.org/cl/144130043

10 years agonet/http: update ProxyFromEnvironment docs for HTTPS_PROXY addition
Brad Fitzpatrick [Thu, 25 Sep 2014 00:39:00 +0000 (17:39 -0700)]
net/http: update ProxyFromEnvironment docs for HTTPS_PROXY addition

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/142650043

10 years agonet/http: allow double-quotes only on cookie values, not cookie
Nigel Tao [Thu, 25 Sep 2014 00:21:52 +0000 (10:21 +1000)]
net/http: allow double-quotes only on cookie values, not cookie
attribute values, a la RFC 6265 section 4.1.1 "Syntax".

Fixes #7751.

LGTM=dr.volker.dobler
R=dr.volker.dobler
CC=bradfitz, golang-codereviews
https://golang.org/cl/148890043

10 years agonet/http: check for CloseWrite interface, not TCPConn implementation
Brad Fitzpatrick [Thu, 25 Sep 2014 00:01:54 +0000 (17:01 -0700)]
net/http: check for CloseWrite interface, not TCPConn implementation

Fixes #8724

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/148040043

10 years agonet/http: support https_proxy in ProxyFromEnvironment
Brad Fitzpatrick [Wed, 24 Sep 2014 23:55:39 +0000 (16:55 -0700)]
net/http: support https_proxy in ProxyFromEnvironment

Fixes #6181

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/148980043

10 years agocmd/go: fix bytes and net the right way
Russ Cox [Wed, 24 Sep 2014 23:18:01 +0000 (19:18 -0400)]
cmd/go: fix bytes and net the right way

Not sure why they used empty.s and all these other
packages were special cased in cmd/go instead.
Add them to the list.

This avoids problems with net .s files being compiled
with gcc in cgo mode and gcc not supporting // comments
on ARM.

Not a problem with bytes, but be consistent.

The last change fixed the ARM build but broke the Windows build.
Maybe *this* will make everyone happy. Sigh.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/144530046

10 years agonet: only "build" empty.s in non-cgo mode
Russ Cox [Wed, 24 Sep 2014 23:09:43 +0000 (19:09 -0400)]
net: only "build" empty.s in non-cgo mode

In cgo mode it gets passed to gcc, and on ARM
it appears that gcc does not support // comments.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/142640043

10 years agoruntime: more NOPTR
Russ Cox [Wed, 24 Sep 2014 23:04:06 +0000 (19:04 -0400)]
runtime: more NOPTR

Fixes linux builds (_vdso); may fix others.
I can at least cross-compile cmd/go for every
implemented system now.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/142630043

10 years agoos: fix Args setup on Windows
Brad Fitzpatrick [Wed, 24 Sep 2014 22:50:54 +0000 (18:50 -0400)]
os: fix Args setup on Windows

Should fix the Windows build. Untested.

on Windows, args are made by src/os/exec_windows.go, not package runtime.
runtime·goargs has if(Windows) return;

The two init funcs in pkg os were conflicting, with the second
overwriting Args back to an empty slice.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/143540044

10 years agoruntime: more NOPTR
Russ Cox [Wed, 24 Sep 2014 21:50:44 +0000 (17:50 -0400)]
runtime: more NOPTR

Fixes (or makes better) various builds.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/146280043

10 years agocmd/go: strip -fsanitize= flags when building cgo object
Dmitriy Vyukov [Wed, 24 Sep 2014 21:49:04 +0000 (01:49 +0400)]
cmd/go: strip -fsanitize= flags when building cgo object
Fixes #8788.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/142470043

10 years agobuild: fix elf builds
Russ Cox [Wed, 24 Sep 2014 21:45:11 +0000 (14:45 -0700)]
build: fix elf builds

Corrections due to new strict type rules for data+bss.
Also disable misc/cgo/cdefstest since you can't compile C code anymore.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/148050044

10 years agofmt: document and fix the handling of precision for strings and byte slices
Rob Pike [Wed, 24 Sep 2014 21:33:30 +0000 (14:33 -0700)]
fmt: document and fix the handling of precision for strings and byte slices
Previous behavior was undocumented and inconsistent. Now it is documented
and consistent and measures the input size, since that makes more sense
when talking about %q and %x. For %s the change has no effect.

Fixes #8151.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/144540044

10 years agocmd/cc, cmd/ld, runtime: disallow conservative data/bss objects
Russ Cox [Wed, 24 Sep 2014 20:55:26 +0000 (16:55 -0400)]
cmd/cc, cmd/ld, runtime: disallow conservative data/bss objects

In linker, refuse to write conservative (array of pointers) as the
garbage collection type for any variable in the data/bss GC program.

In the linker, attach the Go type to an already-read C declaration
during dedup. This gives us Go types for C globals for free as long
as the cmd/dist-generated Go code contains the declaration.
(Most runtime C declarations have a corresponding Go declaration.
Both are bss declarations and so the linker dedups them.)

In cmd/dist, add a few more C files to the auto-Go-declaration list
in order to get Go type information for the C declarations into the linker.

In C compiler, mark all non-pointer-containing global declarations
and all string data as NOPTR. This allows them to exist in C files
without any corresponding Go declaration. Count C function pointers
as "non-pointer-containing", since we have no heap-allocated C functions.

In runtime, add NOPTR to the remaining pointer-containing declarations,
none of which refer to Go heap objects.

In runtime, also move os.Args and syscall.envs data into runtime-owned
variables. Otherwise, in programs that do not import os or syscall, the
runtime variables named os.Args and syscall.envs will be missing type
information.

I believe that this CL eliminates the final source of conservative GC scanning
in non-SWIG Go programs, and therefore...

Fixes #909.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/149770043

10 years agodebug/dwarf: correct name for clang-generated complex type
Russ Cox [Wed, 24 Sep 2014 20:53:47 +0000 (16:53 -0400)]
debug/dwarf: correct name for clang-generated complex type

Fixes #8694.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/143570043

10 years agocmd/gc: fix import of package with var func returning _
Russ Cox [Wed, 24 Sep 2014 20:53:34 +0000 (16:53 -0400)]
cmd/gc: fix import of package with var func returning _

Fixes #8280.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/146240043

10 years agosrc: pass GO_GCFLAGS down to go test std
Brad Fitzpatrick [Wed, 24 Sep 2014 19:42:47 +0000 (12:42 -0700)]
src: pass GO_GCFLAGS down to go test std

Update #8725

LGTM=rsc, josharian
R=rsc, josharian
CC=golang-codereviews
https://golang.org/cl/149000043

10 years agocmd/gc: run escape analysis always (even in -N mode)
Russ Cox [Wed, 24 Sep 2014 19:20:03 +0000 (15:20 -0400)]
cmd/gc: run escape analysis always (even in -N mode)

Fixes #8585.
Removes some little-used code paths.

LGTM=josharian
R=golang-codereviews, minux, josharian
CC=golang-codereviews, iant, r
https://golang.org/cl/132970043

10 years agodoc/go1.4.txt: document that C sources in non-cgo packages are no longer allowed
Russ Cox [Wed, 24 Sep 2014 19:10:54 +0000 (15:10 -0400)]
doc/go1.4.txt: document that C sources in non-cgo packages are no longer allowed

CC=golang-codereviews
https://golang.org/cl/145890046

10 years agocmd/go: prohibit C sources files unless using cgo
Russ Cox [Wed, 24 Sep 2014 19:10:38 +0000 (15:10 -0400)]
cmd/go: prohibit C sources files unless using cgo

Those C files would have been compiled with 6c.
It's close to impossible to use C correctly anymore,
and the C compilers are going away eventually.
Make them unavailable now.

go1.4.txt change in CL 145890046

LGTM=iant
R=iant
CC=golang-codereviews, r
https://golang.org/cl/149720043

10 years agoruntime: fix LastGC comment
Russ Cox [Wed, 24 Sep 2014 18:18:25 +0000 (14:18 -0400)]
runtime: fix LastGC comment

I have no idea what "absolute time" means.

LGTM=dvyukov, r
R=r, dvyukov
CC=golang-codereviews
https://golang.org/cl/144320043

10 years agoruntime: keep g->syscallsp consistent after cgo->Go callbacks
Hector Martin Cantero [Wed, 24 Sep 2014 17:20:25 +0000 (13:20 -0400)]
runtime: keep g->syscallsp consistent after cgo->Go callbacks

Normally, the caller to runtime.entersyscall() must not return before
calling runtime.exitsyscall(), lest g->syscallsp become a dangling
pointer. runtime.cgocallbackg() violates this constraint. To work around
this, save g->syscallsp and g->syscallpc around cgo->Go callbacks, then
restore them after calling runtime.entersyscall(), which restores the
syscall stack frame pointer saved by cgocall. This allows the GC to
correctly trace a goroutine that is currently returning from a
Go->cgo->Go chain.

This also adds a check to proc.c that panics if g->syscallsp is clearly
invalid. It is not 100% foolproof, as it will not catch a case where the
stack was popped then pushed back beyond g->syscallsp, but it does catch
the present cgo issue and makes existing tests fail without the bugfix.

Fixes #7978.

LGTM=dvyukov, rsc
R=golang-codereviews, dvyukov, minux, bradfitz, iant, gobot, rsc
CC=golang-codereviews, rsc
https://golang.org/cl/131910043

10 years agoA+C: Hector Martin Cantero (individual CLA)
Russ Cox [Wed, 24 Sep 2014 17:12:15 +0000 (13:12 -0400)]
A+C: Hector Martin Cantero (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/147080043

10 years agocmd/pack: fix c command for existing file
Rob Pike [Wed, 24 Sep 2014 01:24:35 +0000 (18:24 -0700)]
cmd/pack: fix c command for existing file
There were at least two bugs:
1) It would overwrite a non-archive.
2) It would truncate a non-archive and then fail.
In general the file handling was too clever to be correct.
Make it more straightforward, doing the creation
separately from archive management.

Fixes #8369.

LGTM=adg, iant
R=golang-codereviews, adg, iant
CC=golang-codereviews
https://golang.org/cl/147010046

10 years agoos: add a comment inside RemoveAll
Brad Fitzpatrick [Tue, 23 Sep 2014 21:55:19 +0000 (14:55 -0700)]
os: add a comment inside RemoveAll

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/149950043

10 years agoos: fix another case where RemoveAll should return nil
Brad Fitzpatrick [Tue, 23 Sep 2014 21:26:20 +0000 (14:26 -0700)]
os: fix another case where RemoveAll should return nil

This hopefully fixes issue 8793.

Fixes #8793

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/150860046

10 years agoruntime: fix runtime.Breakpoint on ARMv5
Dave Cheney [Tue, 23 Sep 2014 05:34:38 +0000 (15:34 +1000)]
runtime: fix runtime.Breakpoint on ARMv5

Fixes #8775.

Use the illegal instruction suggested by Ian in https://golang.org/cl/144180043/#msg4 on all arm arches.

LGTM=minux
R=golang-codereviews, gobot, rsc
CC=golang-codereviews, iant, minux
https://golang.org/cl/146130043

10 years agoruntime: remove unused function declaration
Dmitriy Vyukov [Tue, 23 Sep 2014 02:51:53 +0000 (19:51 -0700)]
runtime: remove unused function declaration

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/145970043

10 years agotext/template: type-check chained node as argument
Rob Pike [Tue, 23 Sep 2014 00:48:13 +0000 (17:48 -0700)]
text/template: type-check chained node as argument
Was just a missing case (literally) in the type checker.

Fixes #8473.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/142460043

10 years agofmt: document that self-recursive data structures can be fatal
Rob Pike [Mon, 22 Sep 2014 22:35:25 +0000 (15:35 -0700)]
fmt: document that self-recursive data structures can be fatal

Fixes #8241.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/144420043

10 years agodoc/go1.4.txt: text/template comparison functions allow int==uint
Rob Pike [Mon, 22 Sep 2014 19:00:37 +0000 (12:00 -0700)]
doc/go1.4.txt: text/template comparison functions allow int==uint

CC=golang-codereviews
https://golang.org/cl/142450043

10 years agofmt: make printing of ints 25-35% faster
Rob Pike [Mon, 22 Sep 2014 18:58:15 +0000 (11:58 -0700)]
fmt: make printing of ints 25-35% faster
Inspired by a remark by Leonard Holz, use constants for division

BenchmarkSprintfEmpty           130           132           +1.54%
BenchmarkSprintfString          438           437           -0.23%
BenchmarkSprintfInt             417           414           -0.72%
BenchmarkSprintfIntInt          663           691           +4.22%
BenchmarkSprintfPrefixedInt     791           774           -2.15%
BenchmarkSprintfFloat           701           686           -2.14%
BenchmarkManyArgs               2584          2469          -4.45%
BenchmarkFprintInt              488           357           -26.84%
BenchmarkFprintIntNoAlloc       402           265           -34.08%
BenchmarkScanInts               1244346       1267574       +1.87%
BenchmarkScanRecursiveInt       1748741       1724138       -1.41%

Update #3463

LGTM=josharian, rsc
R=golang-codereviews, josharian, rsc
CC=golang-codereviews
https://golang.org/cl/144250043

10 years agotext/template: allow comparison functions to work between any integers
Rob Pike [Mon, 22 Sep 2014 18:46:02 +0000 (11:46 -0700)]
text/template: allow comparison functions to work between any integers
Previously, signed and unsigned integers could not be compared, but
this has problems with things like comparing 'x' with a byte in a string.
Since signed and unsigned integers have a well-defined ordering,
even though their types are different, and since we already allow
comparison regardless of the size of the integers, why not allow it
regardless of the sign?

Integers only, a fine place to draw the line.

Fixes #7489.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/149780043

10 years agodatabase/sql: Close per-tx prepared statements when the associated tx ends
Marko Tiikkaja [Mon, 22 Sep 2014 13:19:27 +0000 (09:19 -0400)]
database/sql: Close per-tx prepared statements when the associated tx ends

LGTM=bradfitz
R=golang-codereviews, bradfitz, mattn.jp
CC=golang-codereviews
https://golang.org/cl/131650043

10 years agonet/http: replace z_last_test hack with testing.Main
Brad Fitzpatrick [Mon, 22 Sep 2014 13:13:09 +0000 (09:13 -0400)]
net/http: replace z_last_test hack with testing.Main

LGTM=adg
R=rsc, adg
CC=golang-codereviews
https://golang.org/cl/144240043

10 years agoimage/gif: don't let the per-frame transparent index modify the global
Nigel Tao [Mon, 22 Sep 2014 04:29:45 +0000 (14:29 +1000)]
image/gif: don't let the per-frame transparent index modify the global
palette.

Fixes #7993.

LGTM=r
R=r
CC=golang-codereviews, james.jdunne
https://golang.org/cl/138600043

10 years agoruntime: be very careful with bad pointer tests
Keith Randall [Sun, 21 Sep 2014 06:31:11 +0000 (23:31 -0700)]
runtime: be very careful with bad pointer tests

Saw this on a test:

runtime: bad pointer in frame runtime_test.testSetPanicOnFault at 0xc20801c6b0: 0xfff
fatal error: bad pointer!

runtime stack:
...
copystack(0xc2081bf7a0, 0x1000)
        /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/stack.c:621 +0x173 fp=0xfffffd7ffd5ffee0 sp=0xfffffd7ffd5ffe20
runtime.newstack()
        /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/stack.c:774 +0x552 fp=0xfffffd7ffd5fff90 sp=0xfffffd7ffd5ffee0
runtime.morestack()
        /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/asm_amd64.s:324 +0x90 fp=0xfffffd7ffd5fff98 sp=0xfffffd7ffd5fff90

goroutine 163354 [stack growth]:
...
runtime.convT2E(0x587000, 0xc20807bea8, 0x0, 0x0)
        /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/iface.go:141 +0xd2 fp=0xc20801c678 sp=0xc20801c640
runtime_test.testSetPanicOnFault(0xc20822c510, 0xfff, 0xc20801c748)
        /root/work/solaris-amd64-smartos-2dde8b453d26/go/src/runtime/runtime_test.go:211 +0xc6 fp=0xc20801c718 sp=0xc20801c678
...

This test is testing bad pointers.  It loads the bad pointer into a pointer variable,
but before it gets a chance to dereference it, calls convT2E.  That call causes a stack copy,
which exposes that live but bad pointer variable.

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/146880043

10 years agoruntime: Fix interaction between Goexit and defers
Keith Randall [Fri, 19 Sep 2014 23:33:14 +0000 (16:33 -0700)]
runtime: Fix interaction between Goexit and defers

When running defers, we must check whether the defer
has already been marked as started so we don't run it twice.

Fixes #8774.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/142280044

10 years agospec: add dropped comma
Rob Pike [Fri, 19 Sep 2014 21:13:51 +0000 (14:13 -0700)]
spec: add dropped comma
The proposed text in the last CL had a comma that was missing from the submitted spec.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/150720043

10 years agospec: clarify panic behavior when deferring nil functions
Robert Griesemer [Fri, 19 Sep 2014 20:32:07 +0000 (13:32 -0700)]
spec: clarify panic behavior when deferring nil functions

Fixes #8107.

LGTM=iant, rsc, r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/145960043

10 years agocmd/go: fix typo
Sameer Ajmani [Fri, 19 Sep 2014 19:59:47 +0000 (15:59 -0400)]
cmd/go: fix typo

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/138700043

10 years agonet/http: document server recovering panics
Russ Cox [Fri, 19 Sep 2014 17:53:33 +0000 (13:53 -0400)]
net/http: document server recovering panics

Fixes #8594.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/145760043

10 years agoruntime: add runtime· prefix to some static variables
Russ Cox [Fri, 19 Sep 2014 17:51:23 +0000 (13:51 -0400)]
runtime: add runtime· prefix to some static variables

Pure renaming. This will make an upcoming CL have smaller diffs.

LGTM=dvyukov, iant
R=iant, dvyukov
CC=golang-codereviews
https://golang.org/cl/142280043

10 years agocmd/go, testing: add TestMain support
Russ Cox [Fri, 19 Sep 2014 17:51:06 +0000 (13:51 -0400)]
cmd/go, testing: add TestMain support

Fixes #8202.

LGTM=r, bradfitz
R=r, josharian, bradfitz
CC=golang-codereviews
https://golang.org/cl/148770043

10 years agonet/http: ensured that proxy errors are returned by Transport.RoundTrip.
John Tuley [Fri, 19 Sep 2014 15:28:38 +0000 (11:28 -0400)]
net/http: ensured that proxy errors are returned by Transport.RoundTrip.

Fixes #8755.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews, jtuley
https://golang.org/cl/136710044

10 years agoruntime: rename SchedType to SchedT
Russ Cox [Fri, 19 Sep 2014 03:51:22 +0000 (23:51 -0400)]
runtime: rename SchedType to SchedT

CL 144940043 renamed it from Sched to SchedType
to avoid a lowercasing conflict in the Go code with
the variable named sched.
We've been using just T resolve those conflicts, not Type.

The FooType pattern is already taken for the kind-specific
variants of the runtime Type structure: ChanType, MapType,
and so on. SchedType isn't a Type.

LGTM=bradfitz, khr
R=khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/145180043