]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agocmd/go: proper rebuild of affected packages during go test
Russ Cox [Wed, 26 Jun 2013 18:31:12 +0000 (14:31 -0400)]
cmd/go: proper rebuild of affected packages during go test

With this CL, go test -short -cover std successfully builds and
runs all the standard package tests. The tests that look a file
line numbers (log and runtime/debug) fail, because cover is
not inserting //line directives. Everything else passes.

ok   cmd/api 0.038s coverage: 66.6% of statements
?    cmd/cgo [no test files]
ok   cmd/fix 0.043s coverage: 27.2% of statements
ok   cmd/go 0.063s coverage: 2.4% of statements
?    cmd/godoc [no test files]
ok   cmd/gofmt 0.085s coverage: 61.3% of statements
?    cmd/yacc [no test files]
ok   archive/tar 0.023s coverage: 74.2% of statements
ok   archive/zip 0.075s coverage: 71.8% of statements
ok   bufio 0.149s coverage: 88.2% of statements
ok   bytes 0.135s coverage: 90.4% of statements
ok   compress/bzip2 0.087s coverage: 85.1% of statements
ok   compress/flate 0.632s coverage: 79.3% of statements
ok   compress/gzip 0.027s coverage: 76.7% of statements
ok   compress/lzw 0.141s coverage: 71.2% of statements
ok   compress/zlib 1.123s coverage: 77.2% of statements
ok   container/heap 0.020s coverage: 85.8% of statements
ok   container/list 0.021s coverage: 92.5% of statements
ok   container/ring 0.030s coverage: 86.5% of statements
?    crypto [no test files]
ok   crypto/aes 0.054s coverage: 54.3% of statements
ok   crypto/cipher 0.027s coverage: 68.8% of statements
ok   crypto/des 0.041s coverage: 83.8% of statements
ok   crypto/dsa 0.027s coverage: 33.1% of statements
ok   crypto/ecdsa 0.048s coverage: 48.7% of statements
ok   crypto/elliptic 0.030s coverage: 91.6% of statements
ok   crypto/hmac 0.019s coverage: 83.3% of statements
ok   crypto/md5 0.020s coverage: 78.7% of statements
ok   crypto/rand 0.057s coverage: 20.8% of statements
ok   crypto/rc4 0.092s coverage: 70.8% of statements
ok   crypto/rsa 0.261s coverage: 80.8% of statements
ok   crypto/sha1 0.019s coverage: 83.9% of statements
ok   crypto/sha256 0.021s coverage: 89.0% of statements
ok   crypto/sha512 0.023s coverage: 88.7% of statements
ok   crypto/subtle 0.027s coverage: 83.9% of statements
ok   crypto/tls 0.833s coverage: 79.7% of statements
ok   crypto/x509 0.961s coverage: 74.9% of statements
?    crypto/x509/pkix [no test files]
ok   database/sql 0.033s coverage: 75.0% of statements
ok   database/sql/driver 0.020s coverage: 46.2% of statements
ok   debug/dwarf 0.023s coverage: 71.5% of statements
ok   debug/elf 0.035s coverage: 58.2% of statements
ok   debug/gosym 0.022s coverage: 1.8% of statements
ok   debug/macho 0.023s coverage: 63.7% of statements
ok   debug/pe 0.024s coverage: 50.5% of statements
ok   encoding/ascii85 0.021s coverage: 89.7% of statements
ok   encoding/asn1 0.022s coverage: 77.9% of statements
ok   encoding/base32 0.022s coverage: 91.4% of statements
ok   encoding/base64 0.020s coverage: 90.7% of statements
ok   encoding/binary 0.022s coverage: 66.2% of statements
ok   encoding/csv 0.022s coverage: 88.5% of statements
ok   encoding/gob 0.064s coverage: 82.2% of statements
ok   encoding/hex 0.019s coverage: 86.3% of statements
ok   encoding/json 0.047s coverage: 77.3% of statements
ok   encoding/pem 0.026s coverage: 80.5% of statements
ok   encoding/xml 0.039s coverage: 85.0% of statements
ok   errors 0.022s coverage: 100.0% of statements
ok   expvar 0.048s coverage: 72.0% of statements
ok   flag 0.019s coverage: 86.9% of statements
ok   fmt 0.062s coverage: 91.2% of statements
ok   go/ast 0.028s coverage: 46.3% of statements
ok   go/build 0.190s coverage: 75.4% of statements
ok   go/doc 0.095s coverage: 76.7% of statements
ok   go/format 0.036s coverage: 79.8% of statements
ok   go/parser 0.075s coverage: 82.0% of statements
ok   go/printer 0.733s coverage: 88.6% of statements
ok   go/scanner 0.031s coverage: 86.5% of statements
ok   go/token 0.062s coverage: 79.7% of statements
?    hash [no test files]
ok   hash/adler32 0.029s coverage: 49.0% of statements
ok   hash/crc32 0.020s coverage: 64.2% of statements
ok   hash/crc64 0.021s coverage: 53.5% of statements
ok   hash/fnv 0.018s coverage: 75.5% of statements
ok   html 0.022s coverage: 4.5% of statements
ok   html/template 0.087s coverage: 83.9% of statements
ok   image 0.108s coverage: 67.1% of statements
ok   image/color 0.026s coverage: 20.1% of statements
ok   image/draw 0.049s coverage: 69.6% of statements
ok   image/gif 0.019s coverage: 65.2% of statements
ok   image/jpeg 0.197s coverage: 78.6% of statements
ok   image/png 0.055s coverage: 56.5% of statements
ok   index/suffixarray 0.027s coverage: 82.4% of statements
ok   io 0.037s coverage: 83.4% of statements
ok   io/ioutil 0.022s coverage: 70.1% of statements
FAIL log 0.020s
ok   log/syslog 2.063s coverage: 71.1% of statements
ok   math 0.023s coverage: 76.5% of statements
ok   math/big 0.235s coverage: 79.2% of statements
ok   math/cmplx 0.020s coverage: 66.5% of statements
ok   math/rand 0.031s coverage: 69.9% of statements
ok   mime 0.022s coverage: 83.0% of statements
ok   mime/multipart 0.389s coverage: 76.1% of statements
ok   net 2.219s coverage: 58.0% of statements
ok   net/http 4.744s coverage: 82.9% of statements
ok   net/http/cgi 0.593s coverage: 68.5% of statements
ok   net/http/cookiejar 0.038s coverage: 90.3% of statements
ok   net/http/fcgi 0.047s coverage: 37.6% of statements
ok   net/http/httptest 0.068s coverage: 68.9% of statements
ok   net/http/httputil 0.058s coverage: 52.8% of statements
?    net/http/pprof [no test files]
ok   net/mail 0.025s coverage: 80.3% of statements
ok   net/rpc 0.063s coverage: 71.5% of statements
ok   net/rpc/jsonrpc 0.047s coverage: 81.3% of statements
ok   net/smtp 0.032s coverage: 74.1% of statements
ok   net/textproto 0.023s coverage: 66.0% of statements
ok   net/url 0.020s coverage: 78.2% of statements
ok   os 4.729s coverage: 73.3% of statements
ok   os/exec 39.620s coverage: 65.1% of statements
ok   os/signal 0.541s coverage: 89.9% of statements
ok   os/user 0.022s coverage: 62.2% of statements
ok   path 0.018s coverage: 90.8% of statements
ok   path/filepath 10.834s coverage: 88.4% of statements
ok   reflect 0.055s coverage: 83.2% of statements
ok   regexp 0.084s coverage: 75.5% of statements
ok   regexp/syntax 0.547s coverage: 85.2% of statements
ok   runtime 4.755s coverage: 75.9% of statements
?    runtime/cgo [no test files]
FAIL runtime/debug 0.018s
ok   runtime/pprof 0.368s coverage: 8.5% of statements
?    runtime/race [no test files]
ok   sort 0.059s coverage: 97.7% of statements
ok   strconv 0.315s coverage: 95.6% of statements
ok   strings 0.147s coverage: 96.1% of statements
ok   sync 0.083s coverage: 56.7% of statements
ok   sync/atomic 0.035s coverage: 0.0% of statements
ok   syscall 0.043s coverage: 24.0% of statements
ok   testing 0.018s coverage: 24.0% of statements
?    testing/iotest [no test files]
ok   testing/quick 0.062s coverage: 83.2% of statements
ok   text/scanner 0.020s coverage: 91.5% of statements
ok   text/tabwriter 0.021s coverage: 90.4% of statements
ok   text/template 0.052s coverage: 81.1% of statements
ok   text/template/parse 0.024s coverage: 86.1% of statements
ok   time 2.431s coverage: 88.8% of statements
ok   unicode 0.024s coverage: 92.1% of statements
ok   unicode/utf16 0.017s coverage: 97.3% of statements
ok   unicode/utf8 0.019s coverage: 97.4% of statements
?    unsafe [no test files]

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10586043

11 years agocrypto/md5: provide a top-level Sum function
Rob Pike [Wed, 26 Jun 2013 18:29:30 +0000 (11:29 -0700)]
crypto/md5: provide a top-level Sum function
Makes it easy to ask the simple question, what is the hash of this data?
Also mark block as non-escaping.

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/10624044

11 years agocmd/go: log compilation errors when scanning directories and packages
Rob Pike [Wed, 26 Jun 2013 17:48:04 +0000 (10:48 -0700)]
cmd/go: log compilation errors when scanning directories and packages
Before, some packages disappear silently if the package cannot be imported,
such as if the import statement is unparseable.
Before:
        % ls src
        foo   issue
        % go list ./...
        _/home/r/bug/src/foo
        %
After:
        % go list ./...
        src/issue/issue.go:3:5: expected 'STRING', found newline
        _/home/r/bug/src/foo
        %

R=rsc
CC=golang-dev
https://golang.org/cl/10568043

11 years agomisc/dashboard: show all race builders as "race"
Dmitriy Vyukov [Wed, 26 Jun 2013 17:20:53 +0000 (21:20 +0400)]
misc/dashboard: show all race builders as "race"
race is more important than arch (moreover race implies x64)
don't know how to test it

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/10484046

11 years agotest: match gccgo error strings.
Rémy Oudompheng [Wed, 26 Jun 2013 16:05:02 +0000 (18:05 +0200)]
test: match gccgo error strings.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10468043

11 years agotest/shift1.go: recognize gccgo errors
Ian Lance Taylor [Wed, 26 Jun 2013 15:23:52 +0000 (08:23 -0700)]
test/shift1.go: recognize gccgo errors

R=golang-dev, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/10524045

11 years agocrypto/sha1: provide a top-level Sum function
Rob Pike [Wed, 26 Jun 2013 00:04:18 +0000 (17:04 -0700)]
crypto/sha1: provide a top-level Sum function
Makes it easy to ask the simple question, what is the hash of this data?

R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/10571043

11 years agocmd/gc: fix escape analysis ordering
Russ Cox [Tue, 25 Jun 2013 21:28:49 +0000 (17:28 -0400)]
cmd/gc: fix escape analysis ordering

Functions without bodies were excluded from the ordering logic,
because when I wrote the ordering logic there was no reason to
analyze them.

But then we added //go:noescape tags that need analysis, and we
didn't update the ordering logic.

So in the absence of good ordering, //go:noescape only worked
if it appeared before the use in the source code.

Fixes #5773.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10570043

11 years agocmd/ld: fix line numbers when using fieldtrack
Russ Cox [Tue, 25 Jun 2013 21:23:33 +0000 (17:23 -0400)]
cmd/ld: fix line numbers when using fieldtrack

USEFIELD is a special kind of NOP, so treat it like a NOP
when generating the pc-ln table.

There are more invasive fixes that could be applied here.
I am going for minimum number of lines changed.

The smallest test case we know of is five distinct Go files
in four packages, and the bug only happens with
GOEXPERIMENT=fieldtrack enabled, which we don't
normally build with, so the test would never run
meaningfully anyway.

Fixes #5762.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10495044

11 years agocodereview: force hg update after hg pull -u during hg sync
Russ Cox [Tue, 25 Jun 2013 21:23:21 +0000 (17:23 -0400)]
codereview: force hg update after hg pull -u during hg sync

If you hg update your client to an earlier CL, then
hg sync will move you back to tip if it pulls anything in,
but it will leave you where you are if it doesn't pull anything in.
That's confusing: make hg sync always update to tip.

R=golang-dev, bradfitz, r, dsymonds
CC=golang-dev
https://golang.org/cl/10456044

11 years agolib9: avoid all -Wconversion warnings
Ian Lance Taylor [Tue, 25 Jun 2013 17:44:25 +0000 (10:44 -0700)]
lib9: avoid all -Wconversion warnings

Built after adding -Wconversion to the list of compiler
arguments used when building.  I believe these are all OK
assuming we will not change the API.  There is no effort to
detect overflow due to very long strings.

R=golang-dev, dave, rsc, r
CC=golang-dev
https://golang.org/cl/10195044

11 years agosync: fix race instrumentation of WaitGroup
Dmitriy Vyukov [Tue, 25 Jun 2013 16:27:19 +0000 (20:27 +0400)]
sync: fix race instrumentation of WaitGroup
Currently more than 1 gorutine can execute raceWrite() in Wait()
in the following scenario:
1. goroutine 1 executes first check of wg.counter, sees that it's == 0
2. goroutine 2 executes first check of wg.counter, sees that it's == 0
3. goroutine 2 locks the mutex, sees that he is the first waiter and executes raceWrite()
4. goroutine 2 block on the semaphore
5. goroutine 3 executes Done() and unblocks goroutine 2
6. goroutine 1 lock the mutex, sees that he is the first waiter and executes raceWrite()

It produces the following false report:
WARNING: DATA RACE
Write by goroutine 35:
  sync.raceWrite()
      src/pkg/sync/race.go:41 +0x33
  sync.(*WaitGroup).Wait()
      src/pkg/sync/waitgroup.go:103 +0xae
  command-line-arguments_test.TestNoRaceWaitGroupMultipleWait2()
      src/pkg/runtime/race/testdata/waitgroup_test.go:156 +0x19a
  testing.tRunner()
      src/pkg/testing/testing.go:361 +0x108

Previous write by goroutine 36:
  sync.raceWrite()
      src/pkg/sync/race.go:41 +0x33
  sync.(*WaitGroup).Wait()
      src/pkg/sync/waitgroup.go:103 +0xae
  command-line-arguments_test.func·012()
      src/pkg/runtime/race/testdata/waitgroup_test.go:148 +0x4d

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10424043

11 years agoruntime: do not mark os memory as executable on windows
Alex Brainman [Tue, 25 Jun 2013 07:20:14 +0000 (17:20 +1000)]
runtime: do not mark os memory as executable on windows

Resubmit 3c2cddfbdaec now that windows callbacks
are not generated during runtime.

Fixes #5494

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/10487043

11 years agotest: add shift expression incorrectly rejected by gccgo.
Rémy Oudompheng [Tue, 25 Jun 2013 06:06:34 +0000 (08:06 +0200)]
test: add shift expression incorrectly rejected by gccgo.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10483045

11 years agolibmach: trivial: resolve unused parameter warnings
Dave Cheney [Tue, 25 Jun 2013 05:29:02 +0000 (15:29 +1000)]
libmach: trivial: resolve unused parameter warnings

Fix a bunch of warnings detected by https://golang.org/cl/8090044.

Same as CL 10483044, but for FreeBSD.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10498044

11 years agoruntime: change netpoll in preparation for windows implementation
Alex Brainman [Tue, 25 Jun 2013 02:29:00 +0000 (12:29 +1000)]
runtime: change netpoll in preparation for windows implementation

- change runtime_pollWait so it does not return
  closed or timeout if IO is ready - windows must
  know if IO has completed or not even after
  interruption;
- add (*pollDesc).Prepare(mode int) that can be
  used for both read and write, same for Wait;
- introduce runtime_pollWaitCanceled and expose
  it in net as (*pollDesc).WaitCanceled(mode int);

Full windows netpoll changes are
here https://golang.org/cl/8670044/.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/10485043

11 years agolibmach: trivial: resolve unused parameter warnings
Dave Cheney [Tue, 25 Jun 2013 00:52:37 +0000 (10:52 +1000)]
libmach: trivial: resolve unused parameter warnings

Fix a bunch of warnings detected by https://golang.org/cl/8090044

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10483044

11 years agocrypto/sha1: mark block as non-escaping
Rob Pike [Tue, 25 Jun 2013 00:48:31 +0000 (17:48 -0700)]
crypto/sha1: mark block as non-escaping
The compiler still gets the escape analysis wrong, but the annotation here is correct.

R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/10514046

11 years agosyscall: reduce duplication between *bsd and linux
Dave Cheney [Tue, 25 Jun 2013 00:14:40 +0000 (10:14 +1000)]
syscall: reduce duplication between *bsd and linux

Part 2 of several.

R=rsc, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/10462043

11 years agohash: tweak the package docs
Rob Pike [Mon, 24 Jun 2013 23:53:13 +0000 (16:53 -0700)]
hash: tweak the package docs
No semantic change.
I found the wording distracting in a couple of instances and was moved to improve it.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10478048

11 years agonet/http: Transport should return an error when response body ends early
Brad Fitzpatrick [Mon, 24 Jun 2013 20:27:56 +0000 (13:27 -0700)]
net/http: Transport should return an error when response body ends early

If a server response contains a Content-Length and the body is short,
the Transport should end in io.ErrUnexpectedEOF, not io.EOF.

Fixes #5738

R=golang-dev, kevlar, r
CC=golang-dev
https://golang.org/cl/10237050

11 years agonet/rpc: fix RegisterName rejects "." character.
ChaiShushan [Mon, 24 Jun 2013 20:23:02 +0000 (13:23 -0700)]
net/rpc: fix RegisterName rejects "." character.

Fixes #5617.

R=r, rsc
CC=gobot, golang-dev
https://golang.org/cl/10370043

11 years agonet/rpc: call client.Close() when test exit
ChaiShushan [Mon, 24 Jun 2013 20:18:50 +0000 (13:18 -0700)]
net/rpc: call client.Close() when test exit

Fixes #5768.

R=golang-dev
CC=golang-dev
https://golang.org/cl/10503043

11 years agomisc/{bbedit|IntelliJIDEA|kate}: add missing delete predeclared identifier
ChaiShushan [Mon, 24 Jun 2013 20:17:56 +0000 (13:17 -0700)]
misc/{bbedit|IntelliJIDEA|kate}: add missing delete predeclared identifier

In general the description should describe what is added or fixed,
not how it was done (the code does this), but in this case the cause
was delete was missing, so the fix is to add it.

Fixes  issue 5765.

R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/10496043

11 years agoruntime/pprof: disable testing under race detector
Dmitriy Vyukov [Mon, 24 Jun 2013 19:51:00 +0000 (23:51 +0400)]
runtime/pprof: disable testing under race detector
until we decide what to do with issues 5659/5736.
Profiling with race detector is not very useful in general,
and now it makes race builders red.

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

11 years agotime: avoid garbage collector aliasing bug
Russ Cox [Mon, 24 Jun 2013 18:49:35 +0000 (14:49 -0400)]
time: avoid garbage collector aliasing bug

Time is a tiny struct, so the compiler copies a Time by
copying each of the three fields.

The layout of a time on amd64 is [ptr int32 gap32 ptr].
Copying a Time onto a location that formerly held a pointer in the
second word changes only the low 32 bits, creating a different
but still plausible pointer. This confuses the garbage collector
when it appears in argument or result frames.

To avoid this problem, declare nsec as uintptr, so that there is
no gap on amd64 anymore, and therefore no partial pointers.

Note that rearranging the fields to put the int32 last still leaves
a gap - [ptr ptr int32 gap32] - because Time must have a total
size that is ptr-width aligned.

Update #5749

This CL is enough to fix the problem, but we should still do
the other actions listed in the initial report. We're not too far
from completely precise collection.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/10504043

11 years agocompress/bzip2: don't panic on invalid input.
Adam Langley [Mon, 24 Jun 2013 14:59:41 +0000 (10:59 -0400)]
compress/bzip2: don't panic on invalid input.

Fixes 5747.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/10401050

11 years agoruntime: do not generate code during runtime in windows NewCallback
Alex Brainman [Mon, 24 Jun 2013 07:17:45 +0000 (17:17 +1000)]
runtime: do not generate code during runtime in windows NewCallback

Update #5494

R=golang-dev, minux.ma, rsc, iant
CC=golang-dev
https://golang.org/cl/10368043

11 years agomisc/notepadplus: add missing operator keyword
ChaiShushan [Mon, 24 Jun 2013 04:19:00 +0000 (14:19 +1000)]
misc/notepadplus: add missing operator keyword

In general the description should describe what is added or fixed,
not how it was done (the code does this), but in this
case the cause were "/ /= ;" was missing,
so the fix is to add it.

Fixes #5761.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/10479043

11 years agomisc/notepadplus: add missing delete keyword
ChaiShushan [Mon, 24 Jun 2013 03:28:10 +0000 (13:28 +1000)]
misc/notepadplus: add missing delete keyword

In general the description should describe what is added or fixed, not how it was done (the code does this), but in this case the cause was delete was missing, so the fix is to add it.

Fixes #5759.

R=adg
CC=dave, dominik.honnef, gobot, golang-dev
https://golang.org/cl/10476043

11 years agoA+C: ChaiShushan (individual CLA)
Andrew Gerrand [Mon, 24 Jun 2013 03:27:39 +0000 (13:27 +1000)]
A+C: ChaiShushan (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10482043

11 years agoos: rename error_posix.go to error_unix.go
Dave Cheney [Mon, 24 Jun 2013 01:23:37 +0000 (11:23 +1000)]
os: rename error_posix.go to error_unix.go

The tradition is to use _posix when the platform extends beyond unix variants. As windows has its own file, rename to the more usual _unix.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10320043

11 years agocmd/gc: fix pointer composite literals in exported if statements.
Rémy Oudompheng [Sun, 23 Jun 2013 16:39:07 +0000 (18:39 +0200)]
cmd/gc: fix pointer composite literals in exported if statements.

Fixes #4230 (again).

R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/10470043

11 years agotime: handle integer overflow in Sub
Rick Arnold [Sat, 22 Jun 2013 01:07:57 +0000 (18:07 -0700)]
time: handle integer overflow in Sub

If time.Sub results in a value that won't fit in a Duration (int64),
return either the min or max int64 value as appropriate.

Fixes #5011.

R=golang-dev, bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/10328043

11 years agosyscall: reduce duplication between *bsd and linux
Dave Cheney [Sat, 22 Jun 2013 01:03:40 +0000 (11:03 +1000)]
syscall: reduce duplication between *bsd and linux

See discussion: https://groups.google.com/forum/#!topic/golang-dev/zSmH0lQxKAs

Part 1 of several.

Move identical types and functions to syscall_unix.go.

R=rsc, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/10392048

11 years agospec: fix spec on conversions to match implementations
Robert Griesemer [Fri, 21 Jun 2013 23:11:13 +0000 (16:11 -0700)]
spec: fix spec on conversions to match implementations

The existing compilers convert empty strings to empty
but non-nil byte and rune slices. The spec required
a nil byte and rune slice in those cases. That seems
an odd additional requirement. Adjust the spec to
match the reality.

Also, removed over-specification for conversions of
nil []byte and []rune: such nil slices already act
like empty slices and thus don't need extra language.
Added extra examples instead.

Fixes #5704.

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/10440045

11 years agogo/parser: always provide a non-nil path for imports
Robert Griesemer [Fri, 21 Jun 2013 22:09:04 +0000 (15:09 -0700)]
go/parser: always provide a non-nil path for imports

The go/ast ImportSpec always requires a non-nil path.

R=adonovan
CC=golang-dev
https://golang.org/cl/10402047

11 years agotesting: include cover mode in cover profile
Rob Pike [Fri, 21 Jun 2013 21:19:08 +0000 (14:19 -0700)]
testing: include cover mode in cover profile

R=adg, rsc
CC=golang-dev
https://golang.org/cl/10392049

11 years agogo/*: support for slices with cap: s[:j:k] and s[i:j:k]
Robert Griesemer [Fri, 21 Jun 2013 20:14:06 +0000 (13:14 -0700)]
go/*: support for slices with cap: s[:j:k] and s[i:j:k]

Experimental, per rsc's proposal.

R=rsc
CC=golang-dev
https://golang.org/cl/10204043

11 years agocmd/6a, cmd/6l: add PCLMULQDQ instruction.
Adam Langley [Fri, 21 Jun 2013 19:17:13 +0000 (15:17 -0400)]
cmd/6a, cmd/6l: add PCLMULQDQ instruction.

This Intel instruction implements multiplication in binary fields.

R=golang-dev, minux.ma, dave, rsc
CC=golang-dev
https://golang.org/cl/10428043

11 years agoall: avoid leaking fds during tests
Dave Cheney [Fri, 21 Jun 2013 01:13:14 +0000 (11:13 +1000)]
all: avoid leaking fds during tests

trivial: it is not a serious problem to leak a fd in a short lived process, but it was obscuring my investigation of issue 5593.

R=golang-dev, iant, bradfitz
CC=golang-dev
https://golang.org/cl/10391043

11 years agoall: excise some warts found by vet -shadow
Rob Pike [Thu, 20 Jun 2013 23:14:40 +0000 (16:14 -0700)]
all: excise some warts found by vet -shadow
These are not erroneous, just poor or confusing.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10448043

11 years agodoc: update gccgo docs
Ian Lance Taylor [Thu, 20 Jun 2013 21:49:15 +0000 (14:49 -0700)]
doc: update gccgo docs

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10401046

11 years agonet/http: fix confusing shadowing in ProxyFromEnvironment
Brad Fitzpatrick [Thu, 20 Jun 2013 18:58:24 +0000 (11:58 -0700)]
net/http: fix confusing shadowing in ProxyFromEnvironment

The old code worked, somewhat on accident, but was confusing,
and had a useless assignment to the inner err. It worked
because url.Parse parses just about anything, so the outer err
was always nil, so it always fell through to the bottom return
statement, even without the "err = nil" line.

Instead, just have two return statements, and add a comment.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10448044

11 years agoall: fix shadowing bugs found by go tool vet -shadow
Rob Pike [Thu, 20 Jun 2013 18:50:44 +0000 (11:50 -0700)]
all: fix shadowing bugs found by go tool vet -shadow

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10328044

11 years agocmd/go: put the coverage information on the summary line.
Rob Pike [Thu, 20 Jun 2013 17:27:44 +0000 (10:27 -0700)]
cmd/go: put the coverage information on the summary line.
Output now:
ok   crypto/aes 0.060s coverage: 89.8% of statements
ok   crypto/des 0.074s coverage: 92.2% of statements
ok   crypto/dsa 0.056s coverage: 34.5% of statements
ok   crypto/ecdsa 0.058s coverage: 86.8% of statements
ok   crypto/elliptic 0.039s coverage: 94.6% of statements
ok   crypto/hmac 0.037s coverage: 93.5% of statements
ok   crypto/md5 0.031s coverage: 96.2% of statements
ok   crypto/rand 0.074s coverage: 9.9% of statements
ok   crypto/rc4 0.090s coverage: 66.7% of statements
ok   crypto/rsa 0.253s coverage: 83.5% of statements

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10413044

11 years agocrypto/x509: add function to marshal EC private keys.
Adam Langley [Thu, 20 Jun 2013 16:14:16 +0000 (12:14 -0400)]
crypto/x509: add function to marshal EC private keys.

This complements the parsing function that we already have.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10426043

11 years agotest: match gccgo error messages
Rémy Oudompheng [Thu, 20 Jun 2013 06:21:14 +0000 (08:21 +0200)]
test: match gccgo error messages

R=iant, golang-dev
CC=golang-dev
https://golang.org/cl/10365052

11 years agocmd/go: document that files beginning with . or _ are ignored
Andrew Gerrand [Thu, 20 Jun 2013 00:29:38 +0000 (10:29 +1000)]
cmd/go: document that files beginning with . or _ are ignored

Fixes #5655.

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

11 years agocrypto/tls: change advertised ciphersuite order.
Adam Langley [Wed, 19 Jun 2013 20:46:53 +0000 (16:46 -0400)]
crypto/tls: change advertised ciphersuite order.

TLS clients send ciphersuites in preference order (most prefereable
first). This change alters the order so that ECDHE comes before plain
RSA, and RC4 comes before AES (because of the Lucky13 attack).

This is unlikely to have much effect: as a server, the code uses the
client's ciphersuite order by default and, as a client, the non-Go
server probably imposes its order.

R=golang-dev, r, raggi, jsing
CC=golang-dev
https://golang.org/cl/10372045

11 years agocmd/go: another attempt at flag handling for coverage
Rob Pike [Wed, 19 Jun 2013 16:44:40 +0000 (09:44 -0700)]
cmd/go: another attempt at flag handling for coverage
The -cover flag is now just enable/disable and is implied if
either of the other flags is set.

R=rsc
CC=golang-dev
https://golang.org/cl/10420043

11 years agocmd/go: simplify flags for coverage
Rob Pike [Wed, 19 Jun 2013 00:15:26 +0000 (17:15 -0700)]
cmd/go: simplify flags for coverage
The single flag -cover provides the default simplest behavior.
The other flags, -covermode and -coverprofile, provide more
control. The three flags interconnect to work well.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10364044

11 years agocmd/go: write coverage to file, add percentage statistic
Rob Pike [Tue, 18 Jun 2013 21:18:25 +0000 (14:18 -0700)]
cmd/go: write coverage to file, add percentage statistic
Move the data dumper to the testing package, where it has access
to file I/O.
Print a percentage value at the end of the run.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/10264045

11 years agomath/big: fix Errorf verb
Robert Griesemer [Tue, 18 Jun 2013 21:16:40 +0000 (14:16 -0700)]
math/big: fix Errorf verb

Pointed out by go vet.

R=r
CC=golang-dev
https://golang.org/cl/10368048

11 years agocmd/gc: fix race detector on tail-call wrappers
Russ Cox [Tue, 18 Jun 2013 18:43:37 +0000 (14:43 -0400)]
cmd/gc: fix race detector on tail-call wrappers

(By not using the tail-call wrappers when the race
detector is enabled.)

R=golang-dev, minux.ma, dvyukov, daniel.morsing
CC=golang-dev
https://golang.org/cl/10227043

11 years agoos/exec: make exec_test.go:TestExtraFilesFDShuffle portable.
Cosmos Nicolaou [Tue, 18 Jun 2013 15:55:32 +0000 (08:55 -0700)]
os/exec: make exec_test.go:TestExtraFilesFDShuffle portable.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/9103045

11 years agocmd/cgo: avoid leaking fds
Dave Cheney [Tue, 18 Jun 2013 13:20:17 +0000 (23:20 +1000)]
cmd/cgo: avoid leaking fds

Fixes #5714.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10386043

11 years agodoc: style tweaks in preparation for Google Feedback link
Andrew Gerrand [Tue, 18 Jun 2013 05:26:15 +0000 (15:26 +1000)]
doc: style tweaks in preparation for Google Feedback link

Fixes #5589.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10272051

11 years agomisc/vim: Added filetype settings for comments.
David Bürgin [Tue, 18 Jun 2013 04:59:50 +0000 (14:59 +1000)]
misc/vim: Added filetype settings for comments.

This basic Vim ftplugin sets the 'comments' and 'commentstring'
settings to sensible values. Future filetype settings for Go
would go in the same file.
The ftplugin was added as misc/vim/ftplugin/go/go.vim, this way
the installation instructions in readme.txt remain valid.
Fixes #5715.

R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/10323043

11 years agoA+C: David Bürgin (individual CLA)
David Symonds [Tue, 18 Jun 2013 04:59:23 +0000 (14:59 +1000)]
A+C: David Bürgin (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10372043

11 years agonet/smtp: close conn in SendMail; add Client.Close method
Alex Jin [Mon, 17 Jun 2013 23:53:27 +0000 (16:53 -0700)]
net/smtp: close conn in SendMail; add Client.Close method

R=rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/10082044

11 years agoA+C: Alex Jin (individual CLA)
Brad Fitzpatrick [Mon, 17 Jun 2013 23:42:15 +0000 (16:42 -0700)]
A+C: Alex Jin (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10286045

11 years agocrypto/x509: Added RFC 5280, section 4.2.1.14 to parseCertificate and buildExtensions
Paul van Brouwershaven [Mon, 17 Jun 2013 21:56:45 +0000 (14:56 -0700)]
crypto/x509: Added RFC 5280, section 4.2.1.14 to parseCertificate and buildExtensions
Support for CRL Distribution Points

R=golang-dev, agl, bradfitz
CC=golang-dev
https://golang.org/cl/10258043

11 years agoA+C: Paul van Brouwershaven (individual CLA)
Brad Fitzpatrick [Mon, 17 Jun 2013 21:55:26 +0000 (14:55 -0700)]
A+C: Paul van Brouwershaven (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10332046

11 years agonet: fix LookupNS on Plan 9
Nicolas Owens [Mon, 17 Jun 2013 18:38:07 +0000 (11:38 -0700)]
net: fix LookupNS on Plan 9

use correct field count when resolving nameservers via /net/dns on Plan 9.

we incorrectly check for 4 fields instead of 3 when parsing the result of /net/dns, and get no results

R=golang-dev, ality
CC=golang-dev
https://golang.org/cl/10182044

11 years agoA+C: Nicolas Owens (individual CLA)
Brad Fitzpatrick [Mon, 17 Jun 2013 18:37:50 +0000 (11:37 -0700)]
A+C: Nicolas Owens (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10335044

11 years agotesting: use -bench flag and fix flags doc link
Dan Peterson [Mon, 17 Jun 2013 14:32:28 +0000 (07:32 -0700)]
testing: use -bench flag and fix flags doc link

R=golang-dev, r, kr
CC=golang-dev
https://golang.org/cl/10263043

11 years agoA+C: Dan Peterson (individual CLA)
Brad Fitzpatrick [Mon, 17 Jun 2013 14:31:39 +0000 (07:31 -0700)]
A+C: Dan Peterson (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/10340043

11 years agocrypto/cipher: StreamWriter.Closer docs + behavior change
Brad Fitzpatrick [Mon, 17 Jun 2013 14:30:04 +0000 (07:30 -0700)]
crypto/cipher: StreamWriter.Closer docs + behavior change

Don't panic when the underlying Writer isn't a Closer. And
document what Close does and clarify that it's not a Flush.

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/10310043

11 years agoruntime/race: add tests for method thunks
Dmitriy Vyukov [Mon, 17 Jun 2013 13:59:53 +0000 (17:59 +0400)]
runtime/race: add tests for method thunks

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10257043

11 years agoruntime: fix test for new closure representation
Dmitriy Vyukov [Mon, 17 Jun 2013 11:41:17 +0000 (15:41 +0400)]
runtime: fix test for new closure representation
I've hit it several times already.
Currently it crashes with nil deref.

R=golang-dev, daniel.morsing, r
CC=golang-dev
https://golang.org/cl/10317045

11 years agorun.bash: raise ulimit for the number of threads.
Benny Siegert [Mon, 17 Jun 2013 09:31:58 +0000 (19:31 +1000)]
run.bash: raise ulimit for the number of threads.

This is needed on NetBSD-current. Support for
ulimit -T in bash was added in 4.2nb3.

R=golang-dev, minux.ma, rsc, dave
CC=golang-dev
https://golang.org/cl/10078047

11 years agoruntime: fix race condition between GC and setGCPercent
Dmitriy Vyukov [Sat, 15 Jun 2013 12:07:06 +0000 (16:07 +0400)]
runtime: fix race condition between GC and setGCPercent
If first GC runs concurrently with setGCPercent,
it can overwrite gcpercent value with default.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10242047

11 years agoruntime: improve scheduler fairness
Dmitriy Vyukov [Sat, 15 Jun 2013 12:06:28 +0000 (16:06 +0400)]
runtime: improve scheduler fairness
Currently global runqueue is starved if a group of goroutines
constantly respawn each other (local runqueue never becomes empty).
Fixes #5639.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10042044

11 years agoruntime: remove unused moreframesize_minalloc field
Dmitriy Vyukov [Sat, 15 Jun 2013 12:02:39 +0000 (16:02 +0400)]
runtime: remove unused moreframesize_minalloc field
It was used to request large stack segment for GC
when it was running not on g0.
Now GC is running on g0 with large stack,
and it is not needed anymore.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10242045

11 years agocmd/godoc: don't link unexported identifiers
Jonathan Rudenberg [Fri, 14 Jun 2013 19:37:23 +0000 (12:37 -0700)]
cmd/godoc: don't link unexported identifiers

R=golang-dev, gri, gri
CC=golang-dev
https://golang.org/cl/9722045

11 years agoruntime: garbage collector runs on g0 now.
Keith Randall [Fri, 14 Jun 2013 18:42:51 +0000 (11:42 -0700)]
runtime: garbage collector runs on g0 now.
No need to change to Grunnable state.
Add some more checks for Grunning state.

R=golang-dev, rsc, khr, dvyukov
CC=golang-dev
https://golang.org/cl/10186045

11 years agoapi: update next.txt
Brad Fitzpatrick [Fri, 14 Jun 2013 17:00:07 +0000 (10:00 -0700)]
api: update next.txt

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10283043

11 years agonet: coalesce duplicate in-flight DNS lookups
Brad Fitzpatrick [Fri, 14 Jun 2013 15:59:43 +0000 (08:59 -0700)]
net: coalesce duplicate in-flight DNS lookups

In Issue 5625, Russ says: "We should at least have a cache of
inflight lookups, so that 100 simultaneous dials of one host
name don't do the work 100x. That's easy and (assume we forget
the answer once they all get it) doesn't pose any consistency
problems. It just merges simultaneous work."

This brings in singleflight (unexported) from Google /
Camlistore, but without its tests. Maybe we should put it
somewhere in the standard library. But not now.

Update #5625

R=golang-dev, iant, cespare, rsc, dave, rogpeppe, remyoudompheng
CC=golang-dev
https://golang.org/cl/10079043

11 years agocmd/gc: instrument arrays properly in race detector.
Rémy Oudompheng [Fri, 14 Jun 2013 09:14:45 +0000 (11:14 +0200)]
cmd/gc: instrument arrays properly in race detector.

The previous implementation would only record access to
the address of the array but the memory access to the whole
memory range must be recorded instead.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/8053044

11 years agostrconv: corrected several bad references to err.Error in doc comments.
Caleb Spare [Fri, 14 Jun 2013 00:04:47 +0000 (17:04 -0700)]
strconv: corrected several bad references to err.Error in doc comments.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10253051

11 years agocmd/go: change to use struct in go test -cover
Rob Pike [Thu, 13 Jun 2013 20:12:58 +0000 (13:12 -0700)]
cmd/go: change to use struct in go test -cover
Go tool half of https://golang.org/cl/10271044

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/10272043

11 years agogo/ast: add {L,R}paren token.Pos field to ast.TypeAssertExpr.
Alan Donovan [Thu, 13 Jun 2013 18:41:44 +0000 (14:41 -0400)]
go/ast: add {L,R}paren token.Pos field to ast.TypeAssertExpr.

These are required to correctly determine the End() of the node.

Also set these fields in go/parser and use them in go/printer.

This is a backward-compatible API change.

R=gri, r
CC=golang-dev
https://golang.org/cl/10189043

11 years agoruntime: fix bug introduced in cl/10256043
Dmitriy Vyukov [Thu, 13 Jun 2013 12:40:10 +0000 (16:40 +0400)]
runtime: fix bug introduced in cl/10256043

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10260043

11 years agoruntime/race: remove now unused step parameter from range access functions
Dmitriy Vyukov [Thu, 13 Jun 2013 12:38:44 +0000 (16:38 +0400)]
runtime/race: remove now unused step parameter from range access functions

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10259043

11 years agocmd/gc: properly race-instrument for loops
Dmitriy Vyukov [Thu, 13 Jun 2013 12:03:58 +0000 (16:03 +0400)]
cmd/gc: properly race-instrument for loops
Instrumentation of ntest expression should go to ntest->init.
Same for nincr.
Fixes #5340.

R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/10026046

11 years agoruntime: use ROUND macro for rounding
Dmitriy Vyukov [Thu, 13 Jun 2013 12:02:50 +0000 (16:02 +0400)]
runtime: use ROUND macro for rounding

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/10256043

11 years agoruntime/race: update runtime to r183644
Dmitriy Vyukov [Thu, 13 Jun 2013 10:32:05 +0000 (14:32 +0400)]
runtime/race: update runtime to r183644
This revision properly handles memory range accesses.
Fixes #4453.
Fixes #5654.

R=golang-dev, iant, remyoudompheng
CC=golang-dev
https://golang.org/cl/10082043

11 years agomisc/vim: Adding flag-guarding for Vim commands
Josh Hoak [Thu, 13 Jun 2013 05:07:09 +0000 (15:07 +1000)]
misc/vim: Adding flag-guarding for Vim commands

Default behavior is the same as before, but now a user may selectively disable some commands.

Also: deleted the mappings for import.vim.

Tested: by trying the commands for fmt, import and godoc in succession to make sure they still work. Also, ran test.sh in ftplugin/go.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10124043

11 years agotag go1.1.1
Andrew Gerrand [Thu, 13 Jun 2013 02:52:02 +0000 (12:52 +1000)]
tag go1.1.1

R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/10254043

11 years agodoc: add go1.1.1 to the release notes
Andrew Gerrand [Thu, 13 Jun 2013 02:43:26 +0000 (12:43 +1000)]
doc: add go1.1.1 to the release notes

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10236045

11 years agotesting: add -outputdir flag so "go test" controls where the files are written
Rob Pike [Thu, 13 Jun 2013 01:13:34 +0000 (18:13 -0700)]
testing: add -outputdir flag so "go test" controls where the files are written
Obscure misfeature now fixed: When run from "go test", profiles were always
written in the package's source directory. This change puts them in the directory
where "go test" is run.
Also fix a couple of problems causing errors in testing.after to go unreported
unless -v was set.

R=rsc, minux.ma, iant, alex.brainman
CC=golang-dev
https://golang.org/cl/10234044

11 years agoruntime: update runtime·gogo comment in asm files
Ian Lance Taylor [Wed, 12 Jun 2013 22:05:10 +0000 (15:05 -0700)]
runtime: update runtime·gogo comment in asm files

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/10244043

11 years agoruntime: add lr, ctxt, ret to Gobuf
Russ Cox [Wed, 12 Jun 2013 19:22:26 +0000 (15:22 -0400)]
runtime: add lr, ctxt, ret to Gobuf

Add gostartcall and gostartcallfn.
The old gogocall = gostartcall + gogo.
The old gogocallfn = gostartcallfn + gogo.

R=dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/10036044

11 years agoruntime: more flexible heap memory mapping on 64-bits
Dmitriy Vyukov [Wed, 12 Jun 2013 14:47:16 +0000 (18:47 +0400)]
runtime: more flexible heap memory mapping on 64-bits
Fixes #5641.

R=golang-dev, dave, daniel.morsing, iant
CC=golang-dev, kcc
https://golang.org/cl/10126044

11 years agoruntime: fix scheduler race condition
Dmitriy Vyukov [Wed, 12 Jun 2013 14:46:35 +0000 (18:46 +0400)]
runtime: fix scheduler race condition
In starttheworld() we assume that P's with local work
are situated in the beginning of idle P list.
However, once we start the first M, it can execute all local G's
and steal G's from other P's.
That breaks the assumption above. Thus starttheworld() will fail
to start some P's with local work.
It seems that it can not lead to very bad things, but still
it's wrong and breaks other assumtions
(e.g. we can have a spinning M with local work).
The fix is to collect all P's with local work first,
and only then start them.

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

11 years agoruntime: fix plan9, windows builds
Russ Cox [Wed, 12 Jun 2013 13:41:29 +0000 (09:41 -0400)]
runtime: fix plan9, windows builds

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/10229043

11 years agoruntime: fix build
Russ Cox [Wed, 12 Jun 2013 13:06:28 +0000 (09:06 -0400)]
runtime: fix build

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/10227044

11 years agoruntime: adjust traceback / garbage collector boundary
Russ Cox [Wed, 12 Jun 2013 12:49:38 +0000 (08:49 -0400)]
runtime: adjust traceback / garbage collector boundary

The garbage collection routine addframeroots is duplicating
logic in the traceback routine that calls it, sometimes correctly,
sometimes incorrectly, sometimes incompletely.
Pass necessary information to addframeroots instead of
deriving it anew.

Should make addframeroots significantly more robust.
It's certainly smaller.

Also try to standardize on uintptr for saved pc, sp values.

Will make CL 10036044 trivial.

R=golang-dev, dave, dvyukov
CC=golang-dev
https://golang.org/cl/10169045

11 years agocmd/go: diagnose invalid coverage runs
Russ Cox [Wed, 12 Jun 2013 12:42:05 +0000 (08:42 -0400)]
cmd/go: diagnose invalid coverage runs

# bufio
coverage analysis cannot handle package (bufio_test imports testing imports bufio)
# bytes
coverage analysis cannot handle package (bytes_test imports encoding/base64 imports bytes)
# crypto/cipher
coverage analysis cannot handle package (cipher_test imports crypto/aes imports crypto/cipher)
# debug/dwarf
coverage analysis cannot handle package (dwarf_test imports debug/elf imports debug/dwarf)
# errors
coverage analysis cannot handle package (errors_test imports fmt imports errors)
# flag
coverage analysis cannot handle package (flag_test imports testing imports flag)
# fmt
coverage analysis cannot handle package (fmt_test imports testing imports fmt)
# go/ast
coverage analysis cannot handle package (ast_test imports go/format imports go/ast)
# image
coverage analysis cannot handle package (image_test imports image/gif imports image)
# io
coverage analysis cannot handle package (io_test imports bytes imports io)
# math
coverage analysis cannot handle package (math_test imports fmt imports math)
# net/http
coverage analysis cannot handle package (http_test imports net/http/httptest imports net/http)
# os
coverage analysis cannot handle package (os_test imports flag imports os)
# path/filepath
coverage analysis cannot handle package (filepath_test imports io/ioutil imports path/filepath)
# reflect
coverage analysis cannot handle package (reflect_test imports flag imports reflect)
# runtime
coverage analysis cannot handle package (runtime_test imports fmt imports runtime)
# runtime/pprof
coverage analysis cannot handle package (pprof_test imports testing imports runtime/pprof)
# sort
coverage analysis cannot handle package (sort_test imports testing imports sort)
# strconv
coverage analysis cannot handle package (strconv_test imports fmt imports strconv)
# strings
coverage analysis cannot handle package (strings_test imports testing imports strings)
# sync
coverage analysis cannot handle package (sync_test imports fmt imports sync)
# sync/atomic
coverage analysis cannot handle package (atomic_test imports testing imports sync/atomic)
# syscall
coverage analysis cannot handle package (syscall_test imports flag imports syscall)
# text/tabwriter
coverage analysis cannot handle package (tabwriter_test imports testing imports text/tabwriter)
# time
coverage analysis cannot handle package (time_test imports encoding/gob imports time)
# unicode
coverage analysis cannot handle package (unicode_test imports testing imports unicode)
# unicode/utf8
coverage analysis cannot handle package (utf8_test imports bytes imports unicode/utf8)

R=r
CC=golang-dev
https://golang.org/cl/10216043