1
0
mirror of https://github.com/golang/go synced 2024-10-03 02:31:21 -06:00
Commit Graph

17830 Commits

Author SHA1 Message Date
Russ Cox
0fc9db7944 undo CL 13321048 / 9567c5da6e25
Makes build unnecessarily slower. Will fix the parser instead.

««« original CL description
runtime/pprof: run TestGoroutineSwitch for longer

Short test now takes about 0.5 second here.

Fixes #6417.

The failure was also seen on our builders.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/13321048
»»»

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/13720048
2013-09-23 15:58:35 -04:00
Kamil Kisiel
e07b5baf4f reflect: add example for StructTag
Fix a few minor vet quibbles while I'm here.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13235059
2013-09-23 13:19:08 -04:00
Shenghou Ma
60513bf2f4 cmd/ld: fix "_image_base__ not defined" problem for cmd/8l.
Fixes #6431.

Change suggested by kin.wilson.za.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13314048
2013-09-23 13:08:00 -04:00
Péter Surányi
3861cb4388 go/build: add go1.2 build tag
Fixes #6449.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13829044
2013-09-23 18:11:25 +10:00
Rob Pike
3e3ed5d978 fmt: one bad index shouldn't spoil them all
In an indexed verb such as %[3]d, if the index is out of range, don't
skip processing the rest of the verbs. The bug was that the bad
index set a bit for the whole format instead of just the verb.

Ok for 1.2 because this is a bug in a 1.2 feature.

Fixes #6434

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13632058
2013-09-23 16:03:57 +10:00
Shenghou Ma
d00fb0a1ea doc/go1.2: document that godoc and vet will always be installed to their old locations (not $GOPATH/bin).
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13830043
2013-09-23 01:23:42 -04:00
Andrew Gerrand
d851c6d478 doc: mention os/exec StdinPipe change in Go 1.2 doc
Fixes #6439.

R=r, minux.ma
CC=golang-dev
https://golang.org/cl/13478045
2013-09-23 15:14:26 +10:00
Rob Pike
4977f9f926 doc/go1.2.html: fix 3-index slice example
A number was wrong; adjust as suggested to make things clearer.
Fixes #6452

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/13422046
2013-09-23 14:41:20 +10:00
Dmitry Chestnykh
c2b7fb3902 net/http: send correct time in Date header.
Date header indicated that it contained GMT time,
however it actually sent local time. Fixed by
converting time to UTC.

Also fixes incorrect comment in appendTime().

Regression since CL 9432046.

R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/13386047
2013-09-22 19:53:55 -07:00
ChaiShushan
e82031618a misc/notepadplus: fix some number syntax highlight issue
notepadplus can only support some normal golang's hex and imaginary numbers.
it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0").

R=golang-dev, gvdschoot
CC=ajstarks, golang-dev
https://golang.org/cl/13401047
2013-09-23 11:35:17 +10:00
Andrew Gerrand
d4c7f04d71 A+C: Nathan John Youngman (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/13819045
2013-09-23 09:35:52 +10:00
Dmitriy Vyukov
3ec600d0ca runtime/race: update runtime to r191161.
Fixes #6305.

R=golang-dev, dave, alex.brainman, r
CC=golang-dev
https://golang.org/cl/13359046
2013-09-22 10:56:06 -07:00
Alex Brainman
521dbbfef3 runtime/pprof: run TestGoroutineSwitch for longer
Short test now takes about 0.5 second here.

Fixes #6417.

The failure was also seen on our builders.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/13321048
2013-09-22 17:31:08 +10:00
Brad Fitzpatrick
afda774e95 cmd/api: always do API check if hg is available
Fixes #6124

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/13500046
2013-09-22 08:01:17 +01:00
Dominik Honnef
f70116102b doc/go1.2.html: Go 1.2, not Go1.2
R=r
CC=golang-dev
https://golang.org/cl/13735044
2013-09-22 07:28:52 +10:00
Rob Pike
e4c1fffcb1 doc/go1.2.html: pre-emption; cgo and C++
These were bullet points that I had neglected to flesh out.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/13816043
2013-09-21 17:53:44 +10:00
Carl Shapiro
1c45f98fa3 test/chan: avoid wrap-around in memstats comparison
The select2.go test assumed that the memory allocated between
its two samplings of runtime.ReadMemStats is strictly
increasing.  To avoid failing the tests when this is not true,
a greater-than check is introduced before computing the
difference in allocated memory.

R=golang-dev, r, cshapiro
CC=golang-dev
https://golang.org/cl/13701046
2013-09-20 17:27:56 -07:00
Russ Cox
0826c04e14 cmd/yacc: report correct line for 'default action causes potential type clash'
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13588044
2013-09-20 16:00:13 -04:00
Russ Cox
8ce9a4fd26 test/run: print command line for running an individual test
Fixes #5087.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13812043
2013-09-20 15:25:59 -04:00
Russ Cox
5be1821a31 cmd/gc: fix imported and not used error for import .
Fixes issues 6420.

R=ken2
CC=golang-dev
https://golang.org/cl/13703044
2013-09-20 15:25:43 -04:00
Russ Cox
36f8480965 cmd/gc: print expression in 'duplicate case in switch' error
The line number alone does not help when the line is
case '~', '*', '(', ')', '[', ']', '{', '}', '?', ':', ';', ',', '*', '%', '^', '!', '=', '<', '>', '+', '-', '&', '|':

R=ken2
CC=golang-dev
https://golang.org/cl/13431046
2013-09-20 15:15:43 -04:00
Russ Cox
551ada4742 runtime: avoid allocation of internal panic values
If a fault happens in malloc, inevitably the next thing that happens
is a deadlock trying to allocate the panic value that says the fault
happened. Stop doing that, two ways.

First, reject panic in malloc just as we reject panic in garbage collection.

Second, runtime.panicstring was using an error implementation
backed by a Go string, so the interface held an allocated *string.
Since the actual errors are C strings, define a new error
implementation backed by a C char*, which needs no indirection
and therefore no allocation.

This second fix will avoid allocation for errors like nil panic derefs
or division by zero, so it is worth doing even though the first fix
should take care of faults during malloc.

Update #6419

R=golang-dev, dvyukov, dave
CC=golang-dev
https://golang.org/cl/13774043
2013-09-20 15:15:25 -04:00
Robert Griesemer
81dc0b65b2 test/fixedbugs/bug295.go: fix test in anticipation of future gc fix
See also issue 6428.

R=r, rsc
CC=golang-dev
https://golang.org/cl/13794043
2013-09-20 09:40:56 -07:00
Shenghou Ma
0d85d5423b cmd/ld: fix "ld -s" to not discard pclntab.
Fixes #6245.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/13751045
2013-09-20 10:04:52 -04:00
David Symonds
318e165238 crypto/x509: update comment on system root cert locations.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13775045
2013-09-20 15:49:26 +10:00
Ian Lance Taylor
1325732ab9 test: add a test that causes gccgo to get a failure at link time
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13788043
2013-09-19 15:20:39 -07:00
Andrew Gerrand
3378f2473c untag go1.2rc1
Looks like the dist tool really doesn't like tags.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13354049
2013-09-19 22:34:33 +10:00
Rémy Oudompheng
381b72a7a3 cmd/gc: cleanup SWITCH nodes after walk.
Keeping pointers from the pre-walk phase confuses
the race detection instrumentation.

Fixes #6418.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/13368057
2013-09-19 09:23:04 +02:00
Andrew Gerrand
d0bc227abb tag go1.2rc1
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/13777043
2013-09-19 17:12:00 +10:00
Andrew Gerrand
5ec8698862 misc/dist: add 'label' part of distro name, include blog content
This will allow us to cut binaries with names like:
        go1.2rc1.darwin-amd64-osx10.6.pkg
        go1.2rc1.darwin-amd64-osx10.8.pkg

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13629045
2013-09-19 16:51:29 +10:00
Shenghou Ma
c742179c49 cmd/ld: handle IMAGE_SYM_CLASS_LABEL symbols.
Was causing "invalid symbol binding" and thus "malformed pe file" error.

R=golang-dev, alex.brainman, adg
CC=golang-dev
https://golang.org/cl/13722050
2013-09-19 02:27:53 -04:00
Shenghou Ma
db71e1557b cmd/go: fix missing __mingw_fprintf symbol for cgo on windows
Fixes #5986.

R=golang-dev, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/13261055
2013-09-19 01:20:02 -04:00
Shenghou Ma
9add729a1f cmd/ld: handle duplicate static symbols in COFF and Mach-O files.
Fixes #5740.

R=iant, rsc, luisbebop
CC=gobot, golang-dev
https://golang.org/cl/10345046
2013-09-18 22:27:25 -04:00
Rob Pike
ba10318607 cmd/go: write the WORK=/tmp/... line to stderr
Unlike the other output from the -x flag, it was going to stdout.
Fixes #6362.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13746044
2013-09-19 11:19:11 +10:00
Ian Lance Taylor
4182889a09 test: add a test that gccgo failed to compile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13632057
2013-09-18 16:30:38 -07:00
Ian Lance Taylor
45e214fb62 test: add a test that gccgo failed to compile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13451045
2013-09-18 15:47:50 -07:00
Alan Donovan
3ddf5a655e test: disable failing tests under ssa/interp.
R=gri
CC=golang-dev
https://golang.org/cl/13471045
2013-09-18 14:44:57 -04:00
Ian Lance Taylor
e27b0cdfc4 test: add a test that crashed gccgo
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13683046
2013-09-17 18:06:58 -07:00
Thomas Habets
fefa4f2b89 net/http/cgi: use 'https://' for urls if HTTPS is set.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13700044
2013-09-18 10:48:28 +10:00
Andrew Gerrand
e903f5b26a C: add Thomas Habets (Google CLA)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13501050
2013-09-18 10:48:11 +10:00
Dave Cheney
b27e09331c cmd/gc: fix set but not used error
R=rsc, r
CC=golang-dev
https://golang.org/cl/13749044
2013-09-18 10:15:52 +10:00
Ian Lance Taylor
3d3bccc421 cmd/go: add basic docs on calling between Go and C/C++
This is a framework for docs on the subject more than it is
actual docs.

The section header in go/doc.go just says "C", not "C/C++,"
because otherwise godoc doesn't recognize the line as a
section header.

Fixes #5473.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13280050
2013-09-17 17:10:48 -07:00
Robert Griesemer
99d87720ad test: avoid future 'declared and not used' error
See also issue 6414.

R=r
CC=golang-dev
https://golang.org/cl/13683044
2013-09-17 15:24:54 -07:00
Robert Griesemer
0d0c748930 encoding/xml: remove dead code
Avoid future 'declared and not used error'.
See also issue 6414.

R=r
CC=golang-dev
https://golang.org/cl/13242058
2013-09-17 15:24:40 -07:00
Ian Lance Taylor
c757020b55 reflect: test method calls on pointers to pointers
Gccgo got this wrong, and evidently nothing else tests it.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13709045
2013-09-17 15:22:42 -07:00
Russ Cox
aa0439ba65 cmd/gc: eliminate redundant &x.Field nil checks
This eliminates ~75% of the nil checks being emitted,
on all architectures. We can do better, but we need
a bit more general support from the compiler, and
I don't want to do that so close to Go 1.2.
What's here is simple but effective and safe.

A few small code generation cleanups were required
to make the analysis consistent on all systems about
which nil checks are omitted, at least in the test.

Fixes #6019.

R=ken2
CC=golang-dev
https://golang.org/cl/13334052
2013-09-17 16:54:22 -04:00
Adam Langley
eef7035ec8 crypto/tls: don't select ECDSA ciphersuites with only an RSA certificate.
47ec7a68b1a2 added support for ECDSA ciphersuites but didn't alter the
cipher suite selection to take that into account. Thus Go servers could
try and select an ECDSA cipher suite while only having an RSA
certificate, leading to connection failures.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13239053
2013-09-17 13:30:36 -04:00
Ian Lance Taylor
acae4d212c cmd/cgo: rearrange and update documentation
In particular document that the Go tool will look for certain
file extensions and compile with them with either the C or the
C++ compiler.

Fixes #6393.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13733043
2013-09-17 07:11:40 -07:00
Josh Bleecher Snyder
eeb758546e text/template/parse, html/template: copy Tree.text during html template clone
The root cause of the panic reported in https://code.google.com/p/go/issues/detail?id=5980
is that parse's Tree.Text wasn't being copied during the clone.

Fix this by adding and using a Copy method for parse.Tree.

Fixes #5980.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12420044
2013-09-17 14:19:44 +10:00
Dave Cheney
8d5ec52e6c cmd/6c, cmd/6g, cmd/cc: fix undefined behavior warnings
Update #5764

Like Tribbles, the more you kill, the more spring up in their place.

R=rsc
CC=golang-dev
https://golang.org/cl/13324049
2013-09-17 13:43:27 +10:00