1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:31:22 -06:00
Commit Graph

5505 Commits

Author SHA1 Message Date
Russ Cox
91bdbf591f net/rpc: silence read error on closing connection
Fixes #3113.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5698056
2012-02-23 22:45:44 -05:00
Mikio Hara
705ebf1144 net: reorganize test files
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694063
2012-02-24 11:58:30 +09:00
David Symonds
5fb82d8cf6 net/http: add overlooked 418 status code, per RFC 2324.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5688067
2012-02-24 11:55:31 +11:00
Scott Lawrence
c05c3a9d11 html/template: make doctype check case-insensitive
Fixes #3094.

R=golang-dev, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/5687065
2012-02-24 11:32:33 +11:00
Shenghou Ma
1bddfb5203 runtime: check for ARM syscall failures
While we are at it, also update some comments.
    Tested on Linux/ARM builder.

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5696047
2012-02-23 15:43:14 -05:00
Stefan Nilsson
83b5f067e8 binary: remove unnecessary dummy type.
R=rsc
CC=golang-dev
https://golang.org/cl/5698052
2012-02-23 15:29:17 -05:00
Russ Cox
3a6a1f9e7e go/parser: expand test cases for bad import
R=gri
CC=golang-dev
https://golang.org/cl/5697047
2012-02-23 14:44:53 -05:00
Russ Cox
224f05ba88 runtime: darwin signal masking
Fixes #3101 (darwin).

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5693044
2012-02-23 14:44:06 -05:00
Russ Cox
240b1d5b44 runtime: linux signal masking
Fixes #3101 (Linux).

R=golang-dev, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/5696043
2012-02-23 14:43:58 -05:00
Robert Griesemer
28e0e18863 math: slightly more readable comments
Replaced /*-style comments with line comments;
there are two many *'s already in those lines.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5699051
2012-02-23 10:17:24 -08:00
Robert Griesemer
3391de8df7 exp/types: fix package comment
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5695046
2012-02-22 23:40:28 -08:00
Robert Griesemer
bcc3862565 go/parser: check import path restrictions
Replaces pending CL 5674097.
Thanks to ality@pbrane.org for spearheading
the effort.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5683077
2012-02-22 23:21:56 -08:00
Brad Fitzpatrick
a5b5964524 net/http: some more cookie tests
Including a commented-out test we might
tackle later, after seeing what browsers do.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5694045
2012-02-23 15:51:53 +11:00
Gustavo Niemeyer
6c20f5c013 encoding/xml: add example and docs for anon fields
Anonymous pointer fields is not yet supported.
The problem is documented in issue 3108.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694043
2012-02-23 01:35:50 -02:00
Mikio Hara
adbadf444d net: add a bit clarified multicast listener tests
Also adds -external flag to allow use of external networks on tests.

R=rsc
CC=golang-dev
https://golang.org/cl/5693043
2012-02-23 12:16:43 +09:00
Russ Cox
ebae73bb24 pprof: add Profile type
Makes it possible for client code to maintain its own profiles,
and also reduces the API surface by giving us a type that
models built-in profiles.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5684056
2012-02-22 21:46:12 -05:00
Russ Cox
e4b02bfdc0 runtime: goroutine profile, stack dumps
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5687076
2012-02-22 21:45:01 -05:00
Gustavo Niemeyer
133c6bf77f encoding/xml: move Unmarshal example to function
This also fixes MarshalIndent's example after the
recent formatting convention changes.

Fixes #2831.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5671062
2012-02-22 23:37:57 -02:00
Alex Brainman
fea7f07e56 time: run full TestTicker test even during short tests
R=golang-dev, r, bradfitz, r
CC=golang-dev
https://golang.org/cl/5689076
2012-02-23 12:07:59 +11:00
Mikio Hara
ee71afbb55 net: make raw IP tests robust
Make it rely on underlying socket's address family.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5673091
2012-02-23 06:27:05 +09:00
Mikio Hara
9765325d49 net: make parseProcNetIGMP more robust
Suggested by Paul Borman.

Fixes #2826.

R=rsc, borman
CC=golang-dev
https://golang.org/cl/5689048
2012-02-23 06:26:31 +09:00
Rob Pike
880cda557a os: make the system info a value not a pointer on unix
fix a couple of other minor related details.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5690071
2012-02-23 07:51:49 +11:00
Russ Cox
213997a730 net: delete debugging print
Fixes #3030.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5689071
2012-02-22 15:35:41 -05:00
Robert Griesemer
8b7cdb7f25 go/printer, gofmt: improved comma placement
Not a Go 1 issue, but appeared to be fairly easy to fix.

- Note that a few existing test cases look slightly worse but
  those cases were not representative for real code. All real
  code looks better now.

- Manual move of the comment in go/scanner/example_test.go
  before applying gofmt.

- gofmt -w $GOROOT/src $GOROOT/misc

Fixes #3062.

R=rsc
CC=golang-dev
https://golang.org/cl/5674093
2012-02-22 11:27:45 -08:00
Robert Griesemer
0c2f3b7ffd go/doc: move firstSentence into go/doc
- renamed firstSentence -> Synopsis
- also deal with common abbreviations

R=rsc
CC=golang-dev
https://golang.org/cl/5676088
2012-02-22 10:49:37 -08:00
Mikio Hara
215777b332 net: replace error variable name oserr with err
This CL replaces the last two in source tree.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5685080
2012-02-22 19:08:19 +09:00
Devon H. O'Dell
b0891060ae runtime: fix FreeBSD signal handling around thread creation
Ignore signals while we are spawning a new thread. Previously, a
signal arriving just before runtime.minit setting up the signal
handler triggers a "double fault" in signal trampolining.
Fixes #3017.

R=rsc, mikioh.mikioh, minux.ma, adg
CC=golang-dev
https://golang.org/cl/5684060
2012-02-22 15:44:09 +11:00
Russ Cox
5bcad92f07 ld: add NOPTRBSS for large, pointer-free uninitialized data
cc: add #pragma textflag to set it
runtime: mark mheap to go into noptr-bss.
        remove special case in garbage collector

Remove the ARM from.flag field created by CL 5687044.
The DUPOK flag was already in p->reg, so keep using that.

Otherwise test/nilptr.go creates a very large binary.
Should fix the arm build.
Diagnosed by minux.ma; replacement for CL 5690044.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/5686060
2012-02-21 22:08:42 -05:00
Devon H. O'Dell
8542dc0764 runtime: use SYSCALL instead of INT 0x80 in FreeBSD's runtime.osyield on amd64
R=mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/5690062
2012-02-22 11:04:25 +09:00
Brad Fitzpatrick
9c8923f7dc net/http: update test to use time.Duration better
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5688063
2012-02-22 11:22:09 +11:00
Brad Fitzpatrick
31e94293fc net/textproto: accept bad MIME headers as browsers do
Accept certain non-compliant response headers
(in particular, when spaces preceed the colon).
All major browser and curl seem to support this,
and at least one webserver seems to send these.

*shrug*

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5690059
2012-02-22 11:13:59 +11:00
Robert Griesemer
5f2ecbff71 text/tabwriter: fix documentation by adding an example.
R=rsc, r
CC=golang-dev
https://golang.org/cl/5685069
2012-02-21 14:48:17 -08:00
Russ Cox
2110fadd12 net/smtp: use EHLO then HELO
Before we were using "ESMTP" in the banner as a clue,
but that is not required by the RFC and breaks mailing
to smtp.yandex.ru.

Fixes #3045.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5687066
2012-02-21 16:39:02 -05:00
Russ Cox
fc7ed45b35 runtime: avoid malloc during malloc
A fault during malloc might lead to the program's
first call to findfunc, which would in turn call malloc.
Don't do that.

Fixes #1777.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5689047
2012-02-21 16:36:15 -05:00
Marcel van Lohuizen
ecd24f381e exp/norm: Added Iter type for iterating on segment boundaries. This type is mainly to be used
by other low-level libraries, like collate.  Extra care has been given to optimize the performance
of normalizing to NFD, as this is what will be used by the collator.  The overhead of checking
whether a string is normalized vs simply decomposing a string is neglible.  Assuming that most
strings are in the FCD form, this iterator can be used to decompose strings and normalize with
minimal overhead.

R=r
CC=golang-dev
https://golang.org/cl/5676057
2012-02-21 13:13:21 +01:00
Rob Pike
152d806b16 net: extend the workaround to DialTCP to try to get arm building again.
Awfulness by the bucket that we hope
Fixes #3057.

R=golang-dev, mikioh.mikioh, dsymonds, r, rsc
CC=golang-dev
https://golang.org/cl/5687060
2012-02-21 16:48:05 +11:00
Rob Pike
c9bb042287 net: more selfConnect debugging: panic if ra == nil in internetSocket
TBR=dsymonds

R=dsymonds
CC=golang-dev
https://golang.org/cl/5687058
2012-02-21 15:49:08 +11:00
Rob Pike
3970d2fd58 net: panic if sockaddrToTCP returns nil incorrectly
Part of diagnosing the selfConnect bug
TBR=dsymonds

R=golang-dev
CC=golang-dev
https://golang.org/cl/5687057
2012-02-21 15:21:34 +11:00
Rob Pike
2155a0408e net: add diagnostic to try to catch selfConnect bug earlier
TBR=dsymonds

R=golang-dev
CC=golang-dev
https://golang.org/cl/5683057
2012-02-21 14:53:07 +11:00
Rob Pike
ccacab641a os: replace non-portable Waitmsg with portable ProcessState
Use methods for key questions.
Provide access to non-portable pieces through portable methods.
Windows and Plan 9 updated.

R=golang-dev, bradfitz, bradfitz, r, dsymonds, rsc, iant, iant
CC=golang-dev
https://golang.org/cl/5673077
2012-02-21 14:10:34 +11:00
Mikio Hara
22c41ff019 runtime: remove an obsolete file
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5686049
2012-02-21 12:07:38 +09:00
Brad Fitzpatrick
8729d158ca net: more docs on deadlines
Fixes #2777

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5685060
2012-02-21 11:11:18 +11:00
Brad Fitzpatrick
dc19b94b21 net/http: add optional Server.TLSConfig field
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5688047
2012-02-21 10:24:15 +11:00
Devon H. O'Dell
dff5535aaa runtime: implement runtime.osyield on FreeBSD 386, amd64
R=rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5689046
2012-02-21 07:32:20 +09:00
Mikio Hara
6e4ddc6872 net: move hosts testdata to testdata folder
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5687052
2012-02-21 07:11:44 +09:00
Rob Pike
b5a3bd5ff6 os: drop the Wait function and the options to Process.Wait
They are portability problems and the options are almost always zero in practice anyway.

R=golang-dev, dsymonds, r, bradfitz
CC=golang-dev
https://golang.org/cl/5688046
2012-02-20 15:36:08 +11:00
Brad Fitzpatrick
943f6cc837 database/sql/driver: API cleanups
-- add driver.Value type and documentation,
   convert from interface{} to Value where
   appropriate.
-- don't say "subset" anywhere,
-- SubsetValuer -> Valuer
-- SubsetValue -> Value
-- IsParameterSubsetType -> IsValue
-- IsScanSubsetType -> IsScanValue

Fixes #2842

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5674084
2012-02-20 14:25:28 +11:00
Rob Pike
0ce6c87004 html/template: don't indirect past a Stringer
While we're here, get rid of the old names for the escaping functions.

Fixes #3073.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5685049
2012-02-20 14:23:45 +11:00
Russ Cox
a53317668a strconv: run garbage collection before counting allocations in test
My theory is that the call to f() allocates, which triggers
a garbage collection, which itself may do some allocation,
which is being counted.  Running a garbage collection
before starting the test should avoid this problem.

Fixes #2894 (I hope).

R=golang-dev, bradfitz, nigeltao
CC=golang-dev
https://golang.org/cl/5685046
2012-02-19 22:13:04 -05:00
Rob Pike
9c9b96f028 go/doc: update golden file to fix build
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5683046
2012-02-20 14:06:38 +11:00