1
0
mirror of https://github.com/golang/go synced 2024-09-25 11:10:13 -06:00
Commit Graph

17811 Commits

Author SHA1 Message Date
Russ Cox
4dce7f8575 encoding/xml: accept chains of interfaces and pointers
Fixes #6556.

R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/14747043
2013-10-17 12:13:33 -04:00
Alberto García Hierro
e39eda1366 database/sql: make tests repeatable with -cpu=n,n
New test added in CL 14611045 causes a deadlock when
running the tests with -cpu=n,n because the fakedb
driver always waits when opening a new connection after
running TestConnectionLeak.  Reset its state after.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14780043
2013-10-17 09:02:32 -07:00
David Symonds
078bcffcb8 A+C: add Jamie Turner (Dropbox corporate CLA).
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14765043
2013-10-17 11:48:27 +11:00
Brad Fitzpatrick
e5babeff8a database/sql: fix some test fmt verbs
Found by vet.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14762044
2013-10-16 16:30:39 -07:00
Robert Griesemer
15da997c7e spec: clarify re-use of underlying arrays in slice operations
Please note the slight rewording for append: The spec now
requires that append reuses the underlying array if it is
sufficiently large. Per majority sentiment.

This is technically a language change but the current
implementation always worked this way.

Fixes #5818.
Fixes #5180.

R=rsc, iant, r, ken, minux.ma, dan.kortschak, rogpeppe, go.peter.90
CC=golang-dev
https://golang.org/cl/14419054
2013-10-16 16:16:54 -07:00
Alberto García Hierro
37db880469 database/sql: Fix connection leak and potential deadlock
CL 10726044 introduced a race condition which causes connections
to be leaked under certain circumstances. If SetMaxOpenConns is
used, the application eventually deadlocks. Otherwise, the number
of open connections just keep growing indefinitely.

Fixes #6593

R=golang-dev, bradfitz, tad.glines, bketelsen
CC=golang-dev
https://golang.org/cl/14611045
2013-10-16 09:22:57 -07:00
Alberto García Hierro
478f4b6754 database/sql: fix double decrement of numOpen count; test for connection leaks
Add a check at the end of every test to make sure
there are no leaked connections after running a test.

Avoid incorrectly decrementing the number of open connections
when the driver connection ends up it a bad state (numOpen was
decremented twice).

Prevent leaking a Rows struct (which ends up leaking a
connection) in Row.Scan() when a *RawBytes destination is
improperly used.

Close the Rows struct in TestRowsColumns.

Update #6593

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/14642044
2013-10-16 09:17:25 -07:00
Shenghou Ma
4d38d1260e cmd/cgo: simpler fix for issue 6506.
Replaces CL 14682044.
Fixes #6506.

R=rsc, iant, dave
CC=golang-dev
https://golang.org/cl/14717043
2013-10-15 21:35:52 -04:00
Shenghou Ma
244014e402 doc/effective_go.html: fix code example
Fixes #6595.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14425062
2013-10-15 21:30:49 -04:00
Russ Cox
5feb15508e cmd/cgo: print the builtin prolog after the per-file preamble
The preamble may want to #define some special symbols
and then #include <sys/types.h> itself. The builtin prolog
also #includes <sys/types.h>, which would break such a
preamble (because the second #include will be a no-op).

The use of sys/types.h in the builtin prolog is new since Go 1.1,
so this should preserve the semantics of more existing cgo
code than we would otherwise.

It also fixes src/pkg/syscall/mkall.sh's use of go tool cgo -godefs
on some Linux systems.

Thanks to fullung@ for identifying the problem.

Fixes #6558.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14684044
2013-10-15 15:00:48 -04:00
Alex Brainman
9aee98def8 undo CL 14231047 / 2f4c2dde2756
undone because the change slows down profile collection
significantly and unpredictable at times (see comments
at https://golang.org/cl/14231047 for details)

««« original CL description
runtime: collect profiles even while on g0 stack

Fixes #6417

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14231047
»»»

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14535046
2013-10-15 14:37:43 -04:00
Russ Cox
043ace1213 cmd/cgo: fix Xcode 5 incompatibility for #defined expressions
Ensure that clang always exits with a non-zero status by
giving it something that it always warns about (the statement "1;").

Fixes #6128.

R=golang-dev, iant, minux.ma
CC=golang-dev
https://golang.org/cl/14702043
2013-10-15 14:34:46 -04:00
Russ Cox
74f639176d misc/cgo/test: cut out non-standard functions
Otherwise the link fails. Fixes build.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14483050
2013-10-15 14:25:29 -04:00
Russ Cox
94bd34fe50 misc/cgo/test: fix build (define prototype for alloca)
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14454063
2013-10-15 13:46:57 -04:00
Russ Cox
56aeec31c6 cmd/cgo: work around bug in clang debug info for builtins like memset
Fixes #6506.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14682044
2013-10-15 12:46:14 -04:00
Oling Cat
6f53c4136b doc/contrib.html: fix some tags
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14516057
2013-10-15 18:41:23 +11:00
Alex Brainman
9a420b79d7 runtime/pprof: disable flaky TestGoroutineSwitch on windows
Update #6417

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14604043
2013-10-15 13:00:06 +11:00
Keith Randall
2acb80b5e5 cmd/gc: fix comment about performing indexing at compile time.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14441070
2013-10-14 14:26:52 -07:00
Michael Piatek
21e6b90d36 net/http: skip content-type sniffing if the header is explicitly unset.
Fixes #5953

R=dsymonds, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/14434044
2013-10-15 08:22:04 +11:00
David Symonds
51c0d7c0a7 C: add Michael Piatek (Google CLA).
R=golang-dev, r
CC=golang-dev, piatek
https://golang.org/cl/14681043
2013-10-15 08:21:30 +11:00
Ian Lance Taylor
c78d67fb86 debug/dwarf: report the value of an unrecognized attribute format
R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/14669045
2013-10-14 10:53:55 -07:00
Shenghou Ma
89ebc28b58 cmd/api: make it work even when cgo is disabled
make use of $USER or %USERNAME% to determine the current user.
Fixes #6578.

R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/14649043
2013-10-14 00:18:46 -04:00
Shenghou Ma
26f43a089e doc: fix small HTML problems
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/14629043
2013-10-12 18:40:41 -04:00
Rob Pike
7f168f9ccf doc/effective_go.html: fix unescaped less-than character
Why doesn't tidy complain about these?
Found by manlio.perillo.
Fixes #6571

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14608044
2013-10-11 16:39:40 -07:00
Ian Lance Taylor
5b2f626159 go/build: add GOOS and GOARCH to name of gccgo pkg directory
This matches the behaviour of builder.includeArgs in
cmd/go/build.go.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14535048
2013-10-11 16:17:45 -07:00
Ian Lance Taylor
96648e0195 go/build: fix test if built with CGO_ENABLED=0
Fixes #6567.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14502060
2013-10-11 15:55:50 -07:00
Ian Lance Taylor
cd61565ffc misc/cgo/test: fix C panic test to work with gccgo
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14611043
2013-10-11 11:24:54 -07:00
Ian Lance Taylor
db3374e24d doc/progs: don't try building cgo tests if CGO_ENABLED=0
R=golang-dev, jsing, r
CC=golang-dev
https://golang.org/cl/14523056
2013-10-11 08:55:13 -07:00
Shenghou Ma
7dba510c7b cmd/gc: re-word some error messages
Fixes #6557.

R=golang-dev, rsc, tracey.brendan
CC=golang-dev
https://golang.org/cl/14432053
2013-10-10 22:43:34 -04:00
Andrew Gerrand
5f3a7aa217 go.tools/misc/dist: copy doc.go from go.tools to go root
This will allow "godoc godoc", "godoc vet", "godoc cover" to work.

Fixes #6527.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/14566049
2013-10-11 10:37:32 +09:00
Yasuhiro Matsumoto
5516349fe7 misc/vim: complete packages in src directory
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14454059
2013-10-11 11:30:03 +11:00
Rob Pike
beca0e124d doc/effective_go.html: fix a couple of cosmetic issues
At the moment, godoc expands the example in the link, but in
the past it has not. Add a waffle word to allow either possibility.
Also change the order of cases in the switch in Compare to
be consistent with the other switch in the function.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14439055
2013-10-10 17:26:03 -07:00
Francesc Campoy
b6c0c4228d lib/codereview: return an empty list when CONTRIBUTORS is not found instead of None.
R=adg, campoy, r
CC=golang-dev
https://golang.org/cl/14419059
2013-10-10 17:16:17 -07:00
Dominik Honnef
50d4dae80b codereview: fix hg sync closing of CLs for subrepositories
The regexp for closing CLs that were sent by you but committed by
someone else only matched messages for the main repository,
because of the added &repo=... for subrepositories.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14512045
2013-10-10 16:30:47 -07:00
Dominik Honnef
950c284b11 misc/emacs: send correct content-length to the playground
R=adonovan
CC=golang-dev
https://golang.org/cl/14548049
2013-10-10 16:49:19 -04:00
Dominik Honnef
47bb44fd5b misc/emacs: don't treat (foo)(bar) as a function call when preceded by a word character.
Fixes #6531.

R=adonovan
CC=golang-dev
https://golang.org/cl/14523043
2013-10-10 16:30:20 -04:00
Ian Lance Taylor
649fc255a9 net: fix TestDialFailPDLeak to work when GOMAXPROCS is large
Fixes #6553.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/14526048
2013-10-09 13:52:29 -07:00
Keith Randall
139cc96a57 runtime: markfreed's error reports should be prefixed with "markfreed", not "markallocated".
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14441055
2013-10-09 13:28:47 -07:00
Ian Lance Taylor
c774e90208 cmd/go: add any .c/.cc files to the SWIG shared library
Also add the action's object directory to the list of
directories we use to find SWIG shared libraries.

Fixes #6521.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14369043
2013-10-09 10:35:46 -07:00
Ian Lance Taylor
cb30917387 runtime/cgo: mark callback functions as NOSPLIT
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14448044
2013-10-09 08:44:47 -07:00
Russ Cox
0965459bd9 debug/dwarf: handle surprising clang encoding
Fixes a bug in cgo on OS X using clang.
See golang.org/issue/6472 for details.

Fixes #6472.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14575043
2013-10-09 11:08:22 -04:00
Ian Lance Taylor
7bbe0163c7 net: fix typo in failure message in test
R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/14582043
2013-10-09 06:44:11 -07:00
Russ Cox
8ba6deb1ec compress/flate: fix infinite loop on malformed data
Test using compress/gzip, because that's how the
data arrived.

Fixes #6550.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14441051
2013-10-09 08:37:06 -04:00
Rob Pike
158c56ef8a lib/time: update time zone files to version 2013g
This dataset is current as of Sep 30, 2013.

Fixes #6524

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14570044
2013-10-08 16:16:24 -07:00
Rob Pike
daa61d1eb3 encoding/gob: add examples
Also tweak the package document, putting in section headings and
adding a sentence about intended use.

Fixes #4925.

R=golang-dev, iant, adg, ugorji
CC=golang-dev
https://golang.org/cl/14519044
2013-10-08 13:13:40 -07:00
Andrew Gerrand
cf694aac34 doc: fix a few broken links
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14494044
2013-10-09 07:05:43 +11:00
Alan Donovan
bab2a5416c test: revert changes made for Go SSA interpreter test.
R=r, gri
CC=golang-dev
https://golang.org/cl/14552044
2013-10-08 14:36:20 -04:00
Carl Shapiro
254dc5fdbe cmd/go, runtime: express armv5t architecture constraint differently
Instead of adding an -march=armv5t flag to the gcc command
line, the same effect is obtained with an ".arch armv5t"
pseudo op in the assembly file that uses armv5t instructions.

R=golang-dev, iant, dave
CC=golang-dev
https://golang.org/cl/14511044
2013-10-08 10:40:51 -07:00
Andrew Gerrand
fa9fad4b69 A+C: Tw (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/14502047
2013-10-08 16:53:56 +11:00
Andrew Gerrand
0d676f3d1e doc/articles/wiki: fix path handling and clean up test process
Fixes #6525.

R=r
CC=golang-dev
https://golang.org/cl/14383043
2013-10-08 11:14:35 +11:00