]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agoruntime: don't crash in SetFinalizer if sizeof *x is zero
Brad Fitzpatrick [Tue, 17 Dec 2013 22:18:58 +0000 (14:18 -0800)]
runtime: don't crash in SetFinalizer if sizeof *x is zero

And document it explicitly, even though it already said
it wasn't guaranteed.

Fixes #6857

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/43580043

11 years agodatabase/sql: fix typo in comment
Arne Hormann [Tue, 17 Dec 2013 21:17:43 +0000 (08:17 +1100)]
database/sql: fix typo in comment

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

11 years agoA+C: Arne Hormann (individual CLA)
Andrew Gerrand [Tue, 17 Dec 2013 21:17:17 +0000 (08:17 +1100)]
A+C: Arne Hormann (individual CLA)

Generated by addca.

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

11 years agoos: avoid a string concat in readdir
Brad Fitzpatrick [Tue, 17 Dec 2013 20:25:32 +0000 (12:25 -0800)]
os: avoid a string concat in readdir

R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/37690045

11 years agoos, path/filepath: don't ignore Lstat errors in Readdir
Brad Fitzpatrick [Tue, 17 Dec 2013 20:19:01 +0000 (12:19 -0800)]
os, path/filepath: don't ignore Lstat errors in Readdir

os: don't ignore LStat errors in Readdir. If it's ENOENT,
on the second pass, just treat it as missing. If it's another
error, it's real.

path/filepath: use ReaddirNames instead of Readdir in Walk,
in order to obey the documented WalkFunc contract of returning
each walked item's LStat error, if any.

Fixes #6656
Fixes #6680

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

11 years agodatabase/sql: fix auto-reconnect in prepared statements
Julien Schmidt [Tue, 17 Dec 2013 19:57:30 +0000 (11:57 -0800)]
database/sql: fix auto-reconnect in prepared statements

This also fixes several connection leaks.
Fixes #5718

R=bradfitz, adg
CC=alberto.garcia.hierro, golang-dev
https://golang.org/cl/14920046

11 years agoimage: roll back 13239051 (add RGB and RGB48)
Rob Pike [Tue, 17 Dec 2013 18:49:45 +0000 (10:49 -0800)]
image: roll back 13239051 (add RGB and RGB48)

They cause too much bloat in the internals as we find ourselves adding
special case code for all the cross-connections. It's better to use RGBA
and just max out the alpha. We lose a little memory but reduce the number
of special cases the encoders, decoders, and drawers need to provide.

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/42910045

11 years agold: fix Plan 9 build
David du Colombier [Tue, 17 Dec 2013 16:46:07 +0000 (08:46 -0800)]
ld: fix Plan 9 build

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

11 years agoall: add missing copyright
ChaiShushan [Tue, 17 Dec 2013 14:52:32 +0000 (06:52 -0800)]
all: add missing copyright

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

11 years agocmd/ld: maintain correct headstring needed by windows port.
Shenghou Ma [Tue, 17 Dec 2013 12:36:01 +0000 (07:36 -0500)]
cmd/ld: maintain correct headstring needed by windows port.
Fixes build for go_bootstrap.
Fixes #6971.

R=alex.brainman, mattn.jp, rsc
CC=golang-dev
https://golang.org/cl/43130043

11 years agorace.bat: set exit status
Dmitriy Vyukov [Tue, 17 Dec 2013 11:09:42 +0000 (15:09 +0400)]
race.bat: set exit status

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/43340043

11 years agorace.bat: fix env setup
Dmitriy Vyukov [Tue, 17 Dec 2013 08:59:13 +0000 (12:59 +0400)]
race.bat: fix env setup

Currently it fails as:
go tool dist: $GOROOT is not set correctly or not exported
GOROOT=c:\go
c:\go\include\u.h does not exist
Fail.

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

11 years agotime: fix test error in Chinese edition of Windows
Shenghou Ma [Tue, 17 Dec 2013 07:43:14 +0000 (02:43 -0500)]
time: fix test error in Chinese edition of Windows
On the Chinese Windows XP system that I'm using, GetTimeZoneInformation returns a struct containing "中国标准时间" (China Standard Time in Chinese) in both StandardName and DaylightName (which is correct, because China does not use DST). However, in registry, under key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time, the key Std and Dlt contain "中国标准时间" (China Standard Time in Chinese) and "中国夏季时间" (China Summer Time in Chinese) respectively. This means that time.toEnglishName() cannot determine the abbreviation for the local timezone (CST) and causes test failures (time.Local is empty)

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

11 years agomath/rand: minor optimization to Perm
Josh Bleecher Snyder [Tue, 17 Dec 2013 02:49:34 +0000 (13:49 +1100)]
math/rand: minor optimization to Perm

Instead of writing out 0..n and then reading it
back, just use i when it is needed.

Wikipedia calls this the "inside-out" implementation:
http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

This yields identical values to the previous
implementation, given the same seed. (Note that the
output from Example_rand is unchanged.)

2.8 GHz Intel Core i7, results very stable:

benchmark          old ns/op    new ns/op    delta
BenchmarkPerm3           138          136   -1.45%
BenchmarkPerm30          825          803   -2.67%

Stock Raspberry Pi, minimum improvement out of three runs:

benchmark          old ns/op    new ns/op    delta
BenchmarkPerm3          5774         5664   -1.91%
BenchmarkPerm30        32582        29381   -9.82%

R=golang-dev, dave, mtj, adg
CC=golang-dev
https://golang.org/cl/21030043

11 years agocmd/go: set GOROOT when testing "go install cmd/fix"
Andrew Gerrand [Tue, 17 Dec 2013 01:17:56 +0000 (12:17 +1100)]
cmd/go: set GOROOT when testing "go install cmd/fix"

This particular test would never pass unless you had GOROOT set in your
environment. This changes makes the test use the baked-in GOROOT, as it
does with GOOS and GOARCH.

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

11 years agomisc/vim: use shiftwidth() instead of &sw if available.
Shenghou Ma [Tue, 17 Dec 2013 01:05:48 +0000 (20:05 -0500)]
misc/vim: use shiftwidth() instead of &sw if available.
Fixes #6841.

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

11 years agocmd/gc: fix comparison order of parameters in mpcmpfltc(a, b)
Shenghou Ma [Mon, 16 Dec 2013 21:54:10 +0000 (16:54 -0500)]
cmd/gc: fix comparison order of parameters in mpcmpfltc(a, b)
It should compare a - b to 0, not b - a to 0.
Fixes #6964.

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

11 years agodatabase/sql: Check errors in QueryRow.Scan
Marko Tiikkaja [Mon, 16 Dec 2013 20:48:35 +0000 (12:48 -0800)]
database/sql: Check errors in QueryRow.Scan

The previous coding did not correctly check for errors from the driver's
Next() or Close(), which could mask genuine errors from the database, as
witnessed in issue #6651.

Even after this change errors from Close() will be ignored if the query
returned no rows (as Rows.Next will have closed the handle already), but it
is a lot easier for the drivers to guard against that.

Fixes #6651.

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

11 years agoA+C: Marko Tiikkaja (individual CLA)
Brad Fitzpatrick [Mon, 16 Dec 2013 20:48:12 +0000 (12:48 -0800)]
A+C: Marko Tiikkaja (individual CLA)

Generated by addca.

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

11 years agonet: lookup protocol in lower-case on Plan 9
David du Colombier [Mon, 16 Dec 2013 20:00:23 +0000 (12:00 -0800)]
net: lookup protocol in lower-case on Plan 9

Protocol keywords are case-insensitive,
but the Ndb database is case-sensitive.

Also use the generic net protocol instead
of tcp in lookupHost.

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

11 years agostrings: Add example function for IndexAny
Daniel Lidén [Mon, 16 Dec 2013 18:50:56 +0000 (10:50 -0800)]
strings: Add example function for IndexAny

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

11 years agoA+C: Daniel Lidén (individual CLA)
Brad Fitzpatrick [Mon, 16 Dec 2013 18:48:51 +0000 (10:48 -0800)]
A+C: Daniel Lidén (individual CLA)

Generated by addca.

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

11 years agostrings: Add IndexFunc example
Robin Eklind [Mon, 16 Dec 2013 18:44:23 +0000 (10:44 -0800)]
strings: Add IndexFunc example

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

11 years agostrings: Update Trim example.
Robin Eklind [Mon, 16 Dec 2013 18:40:28 +0000 (10:40 -0800)]
strings: Update Trim example.

Use an input which better shows that behaviour of the function. Only leading
and trailing runes are trimed, not intermediate ones.

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

11 years agoruntime: fix test
Russ Cox [Mon, 16 Dec 2013 17:59:30 +0000 (12:59 -0500)]
runtime: fix test

Was supposed to be in the nm CL.

TBR=r
CC=golang-dev
https://golang.org/cl/42870043

11 years agoapi: update next.txt
Brad Fitzpatrick [Mon, 16 Dec 2013 17:57:41 +0000 (09:57 -0800)]
api: update next.txt

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

11 years agodebug/goobj: add package for reading new Go object files
Russ Cox [Mon, 16 Dec 2013 17:52:21 +0000 (12:52 -0500)]
debug/goobj: add package for reading new Go object files

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

11 years agocmd/nm: reimplement in Go
Russ Cox [Mon, 16 Dec 2013 17:52:11 +0000 (12:52 -0500)]
cmd/nm: reimplement in Go

The immediate goal is to support the new object file format,
which libmach (nm's support library) does not understand.
Rather than add code to libmach or reengineer liblink to
support this new use, just write it in Go.

The C version of nm reads the Plan 9 symbol table stored in
Go binaries, now otherwise unused.

This reimplementation uses the standard symbol table for
the corresponding file format instead, bringing us one step
closer to removing the Plan 9 symbol table from Go binaries.

Tell cmd/dist not to build cmd/nm anymore.
Tell cmd/go to install cmd/nm in the tool directory.

R=golang-dev, r, iant, alex.brainman
CC=golang-dev
https://golang.org/cl/40600043

11 years agocmd/ld: move instruction selection + layout into compilers, assemblers
Russ Cox [Mon, 16 Dec 2013 17:51:58 +0000 (12:51 -0500)]
cmd/ld: move instruction selection + layout into compilers, assemblers

- new object file reader/writer (liblink/objfile.c)
- remove old object file writing routines
- add pcdata iterator
- remove all trace of "line number stack" and "path fragments" from
  object files, linker (!!!)
- dwarf now writes a single "compilation unit" instead of one per package

This CL disables the check for chains of no-split functions that
could overflow the stack red zone. A future CL will attack the problem
of reenabling that check (issue 6931).

This CL is just the liblink and cmd/ld changes.
There are minor associated adjustments in CL 37030045.
Each depends on the other.

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

11 years agocmd/cc, cmd/gc: update compilers, assemblers for liblink changes
Russ Cox [Mon, 16 Dec 2013 17:51:38 +0000 (12:51 -0500)]
cmd/cc, cmd/gc: update compilers, assemblers for liblink changes

- add buffered stdout to all tools and provide to link ctxt.
- avoid extra \n before ! in .6 files written by assemblers
  (makes them match the C compilers).
- use linkwriteobj instead of linkouthist+linkwritefuncs.
- in assemblers and C compilers, record pc explicitly in Prog,
  for use by liblink.
- in C compilers, preserve jump target links.
- in Go compilers (gsubr.c) attach gotype directly to
  corresponding LSym* instead of rederiving from instruction stream.
- in Go compilers, emit just one definition for runtime.zerovalue
  from each compilation.

This CL consists entirely of small adjustments.
The heavy lifting is in CL 39680043.
Each depends on the other.

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

11 years agostrings: Add FieldsFunc example.
Robin Eklind [Mon, 16 Dec 2013 17:43:03 +0000 (09:43 -0800)]
strings: Add FieldsFunc example.

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

11 years agodoc/install-source.html: mention make.bash to skip tests
Shenghou Ma [Mon, 16 Dec 2013 02:03:12 +0000 (21:03 -0500)]
doc/install-source.html: mention make.bash to skip tests

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

11 years agounicode/utf16: add explicit test for decoding invalid runes.
Dave Cheney [Mon, 16 Dec 2013 01:35:25 +0000 (12:35 +1100)]
unicode/utf16: add explicit test for decoding invalid runes.

The EncodeRune test exercises DecodeRune, but only for runes that it can encode. Add an explicit test for invalid utf16 surrogate pairs.

Bonus: coverage is now 100%

unicode/utf16/utf16.go: IsSurrogate     100.0%
unicode/utf16/utf16.go: DecodeRune      100.0%
unicode/utf16/utf16.go: EncodeRune      100.0%
unicode/utf16/utf16.go: Encode          100.0%
unicode/utf16/utf16.go: Decode          100.0%
total:                  (statements)    100.0%

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

11 years agounicode/utf16: add explicit tests for IsSurrogate
Dave Cheney [Mon, 16 Dec 2013 00:15:23 +0000 (11:15 +1100)]
unicode/utf16: add explicit tests for IsSurrogate

Update #6956

Add tests for IsSurrogate.

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

11 years agodoc/articles/wiki: remove GNU make dependency
Aram Hăvărneanu [Sun, 15 Dec 2013 22:51:03 +0000 (17:51 -0500)]
doc/articles/wiki: remove GNU make dependency

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

11 years agocrypto/tls: generate random serial numbers.
Adam Langley [Sun, 15 Dec 2013 17:57:57 +0000 (12:57 -0500)]
crypto/tls: generate random serial numbers.

NSS (used in Firefox and Chrome) won't accept two certificates with the same
issuer and serial. But this causes problems with self-signed certificates
with a fixed serial number.

This change randomises the serial numbers in the certificates generated by
generate_cert.go.

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

11 years agocrypto/cipher: fix CFB mode.
Adam Langley [Sun, 15 Dec 2013 17:55:59 +0000 (12:55 -0500)]
crypto/cipher: fix CFB mode.

a073d65e6f8c had a couple of bugs in the CFB mode that I missed in code review:
        1) The loop condition wasn't updated from the old version.
        2) It wasn't safe when src and dst aliased.

Fixes #6950.

R=golang-dev, hanwen
CC=golang-dev
https://golang.org/cl/42110043

11 years agoA+C: Aram Hăvărneanu (individual CLA)
Andrew Gerrand [Fri, 13 Dec 2013 23:03:11 +0000 (10:03 +1100)]
A+C: Aram Hăvărneanu (individual CLA)

Generated by addca.

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

11 years agoruntime: fix crash in runtime.GoroutineProfile
Russ Cox [Fri, 13 Dec 2013 20:44:57 +0000 (15:44 -0500)]
runtime: fix crash in runtime.GoroutineProfile

This is a possible Go 1.2.1 candidate.

Fixes #6946.

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

11 years agobytes: fix description of FieldsFunc
Shenghou Ma [Fri, 13 Dec 2013 03:13:19 +0000 (22:13 -0500)]
bytes: fix description of FieldsFunc
Similar to CL 3814041 that fixed the same issue in strings.
Fixes #6941.

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

11 years agotest: match gccgo import error messages
Ian Lance Taylor [Fri, 13 Dec 2013 03:02:11 +0000 (19:02 -0800)]
test: match gccgo import error messages

Gccgo doesn't have the same equivalent of file name and
package as the gc compiler, so the error messages are
necessarily different.

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

11 years ago.hgignore: remove duplicate entry
Ian Lance Taylor [Fri, 13 Dec 2013 03:01:50 +0000 (19:01 -0800)]
.hgignore: remove duplicate entry

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

11 years agodebug/dwarf: remove unused field addrsize from Data
Ian Lance Taylor [Fri, 13 Dec 2013 02:55:05 +0000 (18:55 -0800)]
debug/dwarf: remove unused field addrsize from Data

The addrsize field is not a constant for an entire executable
file, and is now handled by the dataFormat interface when
reading the data.

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

11 years agoreflect: correct function name in panic string
Ian Lance Taylor [Fri, 13 Dec 2013 02:54:48 +0000 (18:54 -0800)]
reflect: correct function name in panic string

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

11 years agodoc: change "threads" to "goroutines"
Ian Lance Taylor [Fri, 13 Dec 2013 02:48:40 +0000 (18:48 -0800)]
doc: change "threads" to "goroutines"

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

11 years ago.hgignore: remove merge markers
Ian Lance Taylor [Fri, 13 Dec 2013 01:25:02 +0000 (17:25 -0800)]
.hgignore: remove merge markers

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

11 years agotest: match gccgo error messages
Ian Lance Taylor [Fri, 13 Dec 2013 01:18:37 +0000 (17:18 -0800)]
test: match gccgo error messages

fixedbugs/issue4510.dir/f2.go:7: error: 'fmt' defined as both imported name and global name
f1.go:7: note: 'fmt' imported here

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

11 years agotest: match gccgo error messages
Ian Lance Taylor [Fri, 13 Dec 2013 01:18:12 +0000 (17:18 -0800)]
test: match gccgo error messages

const1.go:33: error: integer constant overflow
<similar errors omitted>
const1.go:64: error: division by zero
const1.go:67: error: floating point constant overflow
const1.go:68: error: floating point constant overflow
const1.go:69: error: floating point constant overflow
const1.go:70: error: division by zero
const1.go:71: error: expected integer type
const1.go:77: error: argument 1 has incompatible type (cannot use type int8 as type int)
const1.go:78: error: argument 1 has incompatible type (cannot use type int8 as type int)
const1.go:79: error: argument 1 has incompatible type (cannot use type uint8 as type int)
const1.go:81: error: argument 1 has incompatible type (cannot use type float32 as type int)
const1.go:82: error: argument 1 has incompatible type (cannot use type float64 as type int)
const1.go:83: error: floating point constant truncated to integer
const1.go:85: error: argument 1 has incompatible type (cannot use type float64 as type int)
const1.go:86: error: argument 1 has incompatible type (cannot use type string as type int)
const1.go:87: error: argument 1 has incompatible type (cannot use type bool as type int)
const1.go:90: error: const initializer cannot be nil
const1.go:91: error: expression is not constant
const1.go:92: error: expression is not constant
const1.go:93: error: invalid constant type
const1.go:94: error: invalid constant type
fixedbugs/bug462.go:17: error: unknown field 'os.File' in 'T'
fixedbugs/issue3705.go:9: error: cannot declare init - must be func
fixedbugs/issue4251.go:12: error: inverted slice range
fixedbugs/issue4251.go:16: error: inverted slice range
fixedbugs/issue4251.go:20: error: inverted slice range
fixedbugs/issue4405.go:11: error: invalid character 0x7 in identifier
fixedbugs/issue4405.go:12: error: invalid character 0x8 in identifier
fixedbugs/issue4405.go:13: error: invalid character 0xb in identifier
fixedbugs/issue4405.go:14: error: invalid character 0xc in identifier
fixedbugs/issue4429.go:15: error: expected pointer
fixedbugs/issue4517d.go:9: error: cannot import package as init
fixedbugs/issue4545.go:17: error: invalid context-determined non-integer type for left operand of shift
fixedbugs/issue4545.go:16: error: incompatible types in binary expression
fixedbugs/issue4610.go:15: error: expected ';' or '}' or newline
fixedbugs/issue4610.go:16: error: expected declaration
fixedbugs/issue4654.go:15: error: value computed is not used
<similar errors omitted>
fixedbugs/issue4776.go:9: error: program must start with package clause
fixedbugs/issue4776.go:9: error: expected ';' or newline after package clause
fixedbugs/issue4813.go:31: error: index must be integer
<similar errors omitted>
fixedbugs/issue4847.go:22: error: initialization expression for 'matchAny' depends upon itself
fixedbugs/issue5089.go:13: error: redefinition of 'bufio.Buffered': receiver name changed
fixedbugs/issue5089.go:11: note: previous definition of 'bufio.Buffered' was here
fixedbugs/issue5172.go:17: error: reference to undefined field or method 'bar'
fixedbugs/issue5172.go:18: error: reference to undefined field or method 'bar'
fixedbugs/issue5172.go:12: error: use of undefined type 'bar'
fixedbugs/issue5358.go:16: error: argument 2 has incompatible type
fixedbugs/issue5581.go:29: error: use of undefined type 'Blah'
funcdup.go:10: error: redefinition of 'i'
funcdup.go:10: note: previous definition of 'i' was here
<similar errors omitted>
funcdup2.go:10: error: redefinition of 'i'
funcdup2.go:10: note: previous definition of 'i' was here
<similar errors omitted>
slice3err.go:20: error: middle index required in 3-index slice
<similar errors omitted>
slice3err.go:20: error: final index required in 3-index slice
<similar errors omitted>
slice3err.go:21: error: final index required in 3-index slice
slice3err.go:46: error: invalid 3-index slice of string
<similar errors omitted>
slice3err.go:57: error: inverted slice range
<similar errors omitted>
slice3err.go:62: error: invalid slice index: capacity less than length
slice3err.go:64: error: invalid slice index: capacity less than start
slice3err.go:65: error: invalid slice index: capacity less than start
slice3err.go:66: error: invalid slice index: capacity less than start
slice3err.go:68: error: invalid slice index: capacity less than length
slice3err.go:70: error: invalid slice index: capacity less than start
slice3err.go:80: error: invalid slice index: capacity less than length
slice3err.go:82: error: invalid slice index: capacity less than start
slice3err.go:83: error: invalid slice index: capacity less than start
slice3err.go:84: error: invalid slice index: capacity less than start
slice3err.go:86: error: invalid slice index: capacity less than length
slice3err.go:88: error: invalid slice index: capacity less than start
slice3err.go:99: error: array index out of bounds
<similar errors omitted>
slice3err.go:106: error: invalid slice index: capacity less than length
slice3err.go:107: error: invalid slice index: capacity less than start
slice3err.go:118: error: invalid slice index: capacity less than length
slice3err.go:119: error: invalid slice index: capacity less than start
syntax/semi1.go:10: error: missing '{' after if clause
syntax/semi1.go:10: error: reference to undefined name 'x'
syntax/semi1.go:10: error: reference to undefined name 'y'
syntax/semi1.go:12: error: reference to undefined name 'z'
syntax/semi2.go:10: error: missing '{' after switch clause
syntax/semi2.go:10: error: reference to undefined name 'x'
syntax/semi3.go:10: error: missing '{' after for clause
syntax/semi3.go:10: error: reference to undefined name 'x'
syntax/semi3.go:10: error: reference to undefined name 'y'
syntax/semi3.go:10: error: reference to undefined name 'z'
syntax/semi3.go:12: error: reference to undefined name 'z'
syntax/semi4.go:11: error: missing '{' after for clause
syntax/semi4.go:10: error: reference to undefined name 'x'
syntax/semi4.go:12: error: reference to undefined name 'z'
typecheck.go:12: error: reference to undefined name 'b'
typecheck.go:17: error: reference to undefined name 'c'
typecheck.go:11: error: use of undefined type 'b'
typecheck.go:16: error: not enough arguments
typecheck.go:17: error: not enough arguments

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

11 years agotest: add []rune case to string_lit.go
Ian Lance Taylor [Fri, 13 Dec 2013 01:17:02 +0000 (17:17 -0800)]
test: add []rune case to string_lit.go

Gccgo managed to get this case wrong.

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

11 years agotest: adjust issue4618 for gccgo allocation behaviour
Ian Lance Taylor [Fri, 13 Dec 2013 01:14:05 +0000 (17:14 -0800)]
test: adjust issue4618 for gccgo allocation behaviour

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

11 years agotest: disable large type/stack frame tests for gccgo
Ian Lance Taylor [Fri, 13 Dec 2013 01:13:46 +0000 (17:13 -0800)]
test: disable large type/stack frame tests for gccgo

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

11 years agotest: disable a couple of precise GC tests for gccgo
Ian Lance Taylor [Fri, 13 Dec 2013 01:13:27 +0000 (17:13 -0800)]
test: disable a couple of precise GC tests for gccgo

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

11 years agodoc: add Go 1.2 to release history page
Andrew Gerrand [Thu, 12 Dec 2013 22:31:49 +0000 (09:31 +1100)]
doc: add Go 1.2 to release history page

Fixes #6939.

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

11 years agocrypto/rc4: fix type errors in pure Go implementation
Richard Musiol [Thu, 12 Dec 2013 19:32:31 +0000 (14:32 -0500)]
crypto/rc4: fix type errors in pure Go implementation

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

11 years agocrypto/sha1: Optimise FUNC1 with alternate formulation
Nick Craig-Wood [Thu, 12 Dec 2013 19:26:36 +0000 (11:26 -0800)]
crypto/sha1: Optimise FUNC1 with alternate formulation

According to Wikipedia: http://en.wikipedia.org/wiki/SHA-1
there is an alternate formulation for the FUNC1 transform,
namely

f1 = d xor (b and (c xor d))

instead of

f1 = (b and c) or ((not b) and d)

This reduces the instruction count of FUNC1 from 6 to 4 and
makes about 5% speed improvement on amd64 and suprisingly 17%
on 386.

amd64 Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          506          499   -1.38%
BenchmarkHash1K             3099         2961   -4.45%
BenchmarkHash8K            22292        21243   -4.71%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes        15.80        16.00    1.01x
BenchmarkHash1K           330.40       345.82    1.05x
BenchmarkHash8K           367.48       385.63    1.05x

i386 Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          647          615   -4.95%
BenchmarkHash1K             3673         3161  -13.94%
BenchmarkHash8K            26141        22374  -14.41%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes        12.35        13.01    1.05x
BenchmarkHash1K           278.74       323.94    1.16x
BenchmarkHash8K           313.37       366.13    1.17x

The improvements on an Intel(R) Core(TM) i7-4770K CPU @
3.50GHz were almost identical.

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

11 years agoimage: add RGB and RGB48
ChaiShushan [Thu, 12 Dec 2013 19:24:27 +0000 (11:24 -0800)]
image: add RGB and RGB48

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

11 years agodoc/go1.3.txt: first checkins: makerelease, liblink
Rob Pike [Thu, 12 Dec 2013 19:17:54 +0000 (11:17 -0800)]
doc/go1.3.txt: first checkins: makerelease, liblink

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

11 years agocrypto/cipher: speed up gcmInc32.
Han-Wen Nienhuys [Thu, 12 Dec 2013 16:25:17 +0000 (11:25 -0500)]
crypto/cipher: speed up gcmInc32.

The counter is not secret, so the code does not need to be
constant time.

benchmark                    old MB/s     new MB/s  speedup
BenchmarkAESGCMSeal1K           89.90        92.84    1.03x
BenchmarkAESGCMOpen1K           89.16        92.30    1.04x

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

11 years agofmt: Fix signed zero-padding for positive floats
Felix Geisendörfer [Thu, 12 Dec 2013 14:40:16 +0000 (06:40 -0800)]
fmt: Fix signed zero-padding for positive floats

Space padding still has the same issue, I will send a separate patch for that
if this one gets accepted.
Fixes #6856.

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

11 years agoA+C: Felix Geisendörfer (individual CLA)
Rob Pike [Thu, 12 Dec 2013 14:39:57 +0000 (06:39 -0800)]
A+C: Felix Geisendörfer (individual CLA)

Generated by addca.

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

11 years agonet, text/tabwriter: use cap arg to make
Josh Bleecher Snyder [Thu, 12 Dec 2013 06:13:17 +0000 (10:13 +0400)]
net, text/tabwriter: use cap arg to make

Changes generated by:

gofmt -w -r 'make(a, b)[0:0] -> make(a, 0, b)' src/pkg

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

11 years agonet: don't leave hostsPath unrestored on error in TestLookupStaticHost
Josh Bleecher Snyder [Thu, 12 Dec 2013 06:12:06 +0000 (10:12 +0400)]
net: don't leave hostsPath unrestored on error in TestLookupStaticHost

If the return was reached, then hostsPath would not be properly restored
to its original value. See the (lengthy) discussion at
https://golang.org/cl/15960047/

I assume that this is not for Go 1.2; mailing now since I promised to do so.
I will plan to ping once Go 1.2 is out.

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

11 years agocrypto/x509: fix typo in comment.
Adam Langley [Wed, 11 Dec 2013 22:27:29 +0000 (17:27 -0500)]
crypto/x509: fix typo in comment.

Fixes #6633.

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

11 years agocrypto/cipher: speed up xor operations in CBC, CFB, OBF, CTR
Han-Wen Nienhuys [Wed, 11 Dec 2013 21:05:02 +0000 (16:05 -0500)]
crypto/cipher: speed up xor operations in CBC, CFB, OBF, CTR
and GCM on 386 and amd64

Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz:

benchmark                    old MB/s     new MB/s  speedup
BenchmarkAESGCMSeal1K           82.39        92.05    1.12x
BenchmarkAESGCMOpen1K           82.28        91.88    1.12x
BenchmarkAESCFBEncrypt1K       141.54       277.59    1.96x
BenchmarkAESCFBDecrypt1K       133.06       278.07    2.09x
BenchmarkAESOFB1K              160.51       380.24    2.37x
BenchmarkAESCTR1K              164.07       429.25    2.62x
BenchmarkAESCBCEncrypt1K       170.99       263.74    1.54x
BenchmarkAESCBCDecrypt1K       124.96       249.14    1.99x

Fixes #6741.

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

11 years agocmd/5a, cmd/6a, cmd/8a: fix .y files to match y.tab.[ch]
Russ Cox [Wed, 11 Dec 2013 17:11:37 +0000 (12:11 -0500)]
cmd/5a, cmd/6a, cmd/8a: fix .y files to match y.tab.[ch]

When I renamed LAddr back to Addr (before sending the
original linker CLs), I missed the .y files in my global substitute.
Since the .y files are only processed when running make in
one of those directories (not during all.bash), they were
behind the generated files.

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

11 years agocrypto/sha256: block implementation in amd64 assembly
Joel Sing [Wed, 11 Dec 2013 16:41:30 +0000 (11:41 -0500)]
crypto/sha256: block implementation in amd64 assembly

Benchmark on Intel(R) Xeon(R) CPU X5650  @ 2.67GHz

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1259          677  -46.23%
BenchmarkHash1K            14387         6749  -53.09%
BenchmarkHash8K           106006        50107  -52.73%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         6.35        11.81    1.86x
BenchmarkHash1K            71.17       151.72    2.13x
BenchmarkHash8K            77.28       163.49    2.12x

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

11 years agonet/http: document that body is closed after (*Request).Write.
Shenghou Ma [Wed, 11 Dec 2013 04:35:50 +0000 (23:35 -0500)]
net/http: document that body is closed after (*Request).Write.
Fixes #6911.

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

11 years agomisc/dist: rename to makerelease
Andrew Gerrand [Wed, 11 Dec 2013 03:47:18 +0000 (14:47 +1100)]
misc/dist: rename to makerelease

The ambiguity has gone on too long.

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

11 years agodoc/effective_go.html: close some tags.
Oling Cat [Tue, 10 Dec 2013 22:49:28 +0000 (09:49 +1100)]
doc/effective_go.html: close some tags.

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

11 years agotest: don't rely on order of unrelated imports in bug191
Ian Lance Taylor [Tue, 10 Dec 2013 20:05:37 +0000 (12:05 -0800)]
test: don't rely on order of unrelated imports in bug191

There is no necessary relationship between the imports of the
packages a and b, and gccgo happens to import them in a
different order, leading to different output.  This ordering
is not the purpose of the test in any case.

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

11 years agoruntime: remove outdated comment and related indentation
Carl Shapiro [Tue, 10 Dec 2013 19:17:43 +0000 (11:17 -0800)]
runtime: remove outdated comment and related indentation

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

11 years agocrypto/x509: fix behaviour of KeyUsageAny.
Adam Langley [Tue, 10 Dec 2013 19:06:26 +0000 (14:06 -0500)]
crypto/x509: fix behaviour of KeyUsageAny.

(Reporter wasn't able to provide a certificate chain that uses this
feature for testing.)

Fixes #6831

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

11 years agotest/run: make -v output look like go test output
Russ Cox [Tue, 10 Dec 2013 19:02:42 +0000 (14:02 -0500)]
test/run: make -v output look like go test output

Among other things, it makes it easier to scan to
see what is slow.

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

11 years agotest: add some test cases that were miscompiled by gccgo
Ian Lance Taylor [Tue, 10 Dec 2013 18:47:30 +0000 (10:47 -0800)]
test: add some test cases that were miscompiled by gccgo

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

11 years agoliblink, cmd/gc: fix incompatible type signatures on Plan 9
David du Colombier [Tue, 10 Dec 2013 13:42:41 +0000 (08:42 -0500)]
liblink, cmd/gc: fix incompatible type signatures on Plan 9

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

11 years agosyscall: skip routing messages with mismatched version
Joel Sing [Tue, 10 Dec 2013 13:03:46 +0000 (00:03 +1100)]
syscall: skip routing messages with mismatched version

Skip routing messages with a mismatched version, rather than failing
and returning EINVAL. Only return EINVAL if we were unable to parse
any of the routing messages (presumably due to a version mismatch).

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

11 years agodatabase/sql: Remove redundant condition in if
Alberto García Hierro [Tue, 10 Dec 2013 12:10:09 +0000 (16:10 +0400)]
database/sql: Remove redundant condition in if

The final condition (db.maxIdleConnsLocked() > db.freeConn.Len()) can
only be true iff db.maxIdleConnsLocked() is greater than 0, so previously
checking if it's greater than 0 is a waste, specially when that involves
a method call which (ATM) can't be inlined and includes a switch.

Dissasembly follows (test for err == nil has been omitted for clarity):

Before:
43c357: cmp    $0x0,%bl
43c35a: jne    43c3ce <database/sql.(*DB).putConnDBLocked+0x1ce>
43c35c: mov    %rax,(%rsp)
43c360: callq  43aec0 <database/sql.(*DB).maxIdleConnsLocked>
43c365: mov    0x8(%rsp),%rbx
43c36a: cmp    $0x0,%rbx
43c36e: jle    43c3ce <database/sql.(*DB).putConnDBLocked+0x1ce>
43c370: mov    0x30(%rsp),%rbx
43c375: mov    %rbx,(%rsp)
43c379: callq  43aec0 <database/sql.(*DB).maxIdleConnsLocked>
43c37e: mov    0x30(%rsp),%rdx
43c383: mov    0x8(%rsp),%rcx
43c388: mov    0x28(%rdx),%rbp
43c38c: mov    0x28(%rbp),%rbx
43c390: cmp    %rcx,%rbx
43c393: jge    43c3ce <database/sql.(*DB).putConnDBLocked+0x1ce>
43c395: mov    0x28(%rdx),%rbp
43c399: mov    %rbp,(%rsp)
43c39d: mov    0x38(%rsp),%rcx
43c3a2: mov    $0x556c60,%eax
43c3a7: mov    %rax,0x8(%rsp)
43c3ac: mov    %rcx,0x10(%rsp)
43c3b1: callq  4db5b0 <container/list.(*List).PushFront>

After:
43c357: cmp    $0x0,%bl
43c35a: jne    43c3b5 <database/sql.(*DB).putConnDBLocked+0x1b5>
43c35c: mov    %rax,(%rsp)
43c360: callq  43aec0 <database/sql.(*DB).maxIdleConnsLocked>
43c365: mov    0x30(%rsp),%rdx
43c36a: mov    0x8(%rsp),%rcx
43c36f: mov    0x28(%rdx),%rbp
43c373: mov    0x28(%rbp),%rbx
43c377: cmp    %rcx,%rbx
43c37a: jge    43c3b5 <database/sql.(*DB).putConnDBLocked+0x1b5>
43c37c: mov    0x28(%rdx),%rbp
43c380: mov    %rbp,(%rsp)
43c384: mov    0x38(%rsp),%rcx
43c389: mov    $0x556c60,%eax
43c38e: mov    %rax,0x8(%rsp)
43c393: mov    %rcx,0x10(%rsp)
43c398: callq  4db590 <container/list.(*List).PushFront>

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

11 years agonet: fix nits found by go tool vet
Mikio Hara [Tue, 10 Dec 2013 05:30:52 +0000 (14:30 +0900)]
net: fix nits found by go tool vet

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

11 years agoos: fix build.
Shenghou Ma [Tue, 10 Dec 2013 04:46:21 +0000 (23:46 -0500)]
os: fix build.
CL 36800043 and CL 36930044 have a merge conflict that I overlooked.

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

11 years agocrypto/rand: support generation of 2-5 bit primes, also document the error return...
Shenghou Ma [Tue, 10 Dec 2013 04:25:49 +0000 (23:25 -0500)]
crypto/rand: support generation of 2-5 bit primes, also document the error return for Prime
Fixes #6849.
Fixes #6867.

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

11 years agoos: clarify docs for Rename.
Shenghou Ma [Tue, 10 Dec 2013 04:25:13 +0000 (23:25 -0500)]
os: clarify docs for Rename.

Three changes:
1. mention "move" to clarify things up.
2. use {old,new}path instead of {old,new}name, which makes it clear what
   relative path would do here.
3. mention "OS-specific restrictions might apply".

Fixes #6887.

R=golang-dev, alex.brainman, iant, r
CC=golang-dev
https://golang.org/cl/36930044

11 years agostrconv: add example for Unquote.
Shenghou Ma [Tue, 10 Dec 2013 04:24:58 +0000 (23:24 -0500)]
strconv: add example for Unquote.

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

11 years agoruntime: check for signed zero in printfloat
Carl Shapiro [Tue, 10 Dec 2013 01:51:30 +0000 (17:51 -0800)]
runtime: check for signed zero in printfloat

Fixes #6899

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

11 years agomisc/cgo/testcdefs: rm correct file in test.bash
Alex Brainman [Tue, 10 Dec 2013 01:06:24 +0000 (12:06 +1100)]
misc/cgo/testcdefs: rm correct file in test.bash

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

11 years agocmd/pack: stop parsing object files to generate __.SYMDEF
Russ Cox [Tue, 10 Dec 2013 00:35:17 +0000 (19:35 -0500)]
cmd/pack: stop parsing object files to generate __.SYMDEF

Nothing looks at __.SYMDEF, and the object file format is changing.

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

11 years agoruntime: remove non-extern decls of runtime.goarm
Russ Cox [Tue, 10 Dec 2013 00:35:07 +0000 (19:35 -0500)]
runtime: remove non-extern decls of runtime.goarm

The linker is in charge of providing the one true declaration.

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

11 years agocmd/cgo: use __gcc_struct__ for go exported functions
Alex Brainman [Tue, 10 Dec 2013 00:30:12 +0000 (11:30 +1100)]
cmd/cgo: use __gcc_struct__ for go exported functions

Fixes #6833

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

11 years agoliblink: fix extern register accesses on Plan 9 (386)
Anthony Martin [Mon, 9 Dec 2013 23:48:44 +0000 (18:48 -0500)]
liblink: fix extern register accesses on Plan 9 (386)

R=golang-dev, 0intro, rsc
CC=golang-dev
https://golang.org/cl/39680044

11 years agocmd/8c, cmd/8g, cmd/8l: fix Plan 9 warnings
David du Colombier [Mon, 9 Dec 2013 23:47:22 +0000 (18:47 -0500)]
cmd/8c, cmd/8g, cmd/8l: fix Plan 9 warnings

warning: src/cmd/8c/list.c:124 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:134 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:142 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:152 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:156 format mismatch d VLONG, arg 4
warning: src/cmd/8c/list.c:160 format mismatch d VLONG, arg 4
warning: src/cmd/8c/list.c:165 format mismatch d VLONG, arg 4
warning: src/cmd/8c/list.c:167 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:172 format mismatch d VLONG, arg 4
warning: src/cmd/8c/list.c:174 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:178 format mismatch d VLONG, arg 3
warning: src/cmd/8c/list.c:184 format mismatch d VLONG, arg 3

warning: src/cmd/8g/list.c:91 format mismatch d VLONG, arg 4
warning: src/cmd/8g/list.c:100 format mismatch d VLONG, arg 4
warning: src/cmd/8g/list.c:114 format mismatch d VLONG, arg 5
warning: src/cmd/8g/list.c:118 format mismatch d VLONG, arg 5
warning: src/cmd/8g/list.c:122 format mismatch d VLONG, arg 5
warning: src/cmd/8g/list.c:126 format mismatch d VLONG, arg 5
warning: src/cmd/8g/list.c:136 format mismatch d VLONG, arg 4

warning: src/cmd/8l/list.c:107 format mismatch d VLONG, arg 4
warning: src/cmd/8l/list.c:125 format mismatch ux VLONG, arg 4
warning: src/cmd/8l/list.c:128 format mismatch ux VLONG, arg 4
warning: src/cmd/8l/list.c:130 format mismatch d VLONG, arg 4
warning: src/cmd/8l/list.c:134 format mismatch d VLONG, arg 5
warning: src/cmd/8l/list.c:138 format mismatch d VLONG, arg 6
warning: src/cmd/8l/list.c:143 format mismatch d VLONG, arg 5
warning: src/cmd/8l/list.c:148 format mismatch d VLONG, arg 5
warning: src/cmd/8l/list.c:150 format mismatch d VLONG, arg 4
warning: src/cmd/8l/list.c:154 format mismatch d VLONG, arg 4
warning: src/cmd/8l/list.c:158 format mismatch d VLONG, arg 4
warning: src/cmd/8l/obj.c:132 format mismatch ux VLONG, arg 2

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

11 years agoruntime: do not use memmove in the Plan 9 signal handler
Anthony Martin [Mon, 9 Dec 2013 23:41:48 +0000 (18:41 -0500)]
runtime: do not use memmove in the Plan 9 signal handler

Fixes a regression introduced in revision 4cb93e2900d0.

That revision changed runtime·memmove to use SSE MOVOU
instructions for sizes between 17 and 256 bytes. We were
using memmove to save a copy of the note string during
the note handler. The Plan 9 kernel does not allow the
use of floating point in note handlers (which includes
MOVOU since it touches the XMM registers).

Arguably, runtime·memmove should not be using MOVOU when
GO386=387 but that wouldn't help us on amd64. It's very
important that we guard against any future changes so we
use a simple copy loop instead.

This change is extracted from CL 9796043 (since that CL
is still being ironed out).

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

11 years ago.hgignore: ignore liblink/anames?.c
Russ Cox [Mon, 9 Dec 2013 23:40:54 +0000 (18:40 -0500)]
.hgignore: ignore liblink/anames?.c

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

11 years agobuild: do not use the host's libbio on Plan 9
Anthony Martin [Mon, 9 Dec 2013 23:39:58 +0000 (18:39 -0500)]
build: do not use the host's libbio on Plan 9

R=jas, lucio.dere, rsc
CC=golang-dev
https://golang.org/cl/14604047

11 years agocmd/gc, runtime: correct a misnomer regarding dead value maps
Carl Shapiro [Mon, 9 Dec 2013 22:45:10 +0000 (14:45 -0800)]
cmd/gc, runtime: correct a misnomer regarding dead value maps

The funcdata symbol incorrectly named the dead value map the
dead pointer map.  The dead value map identifies all dead
values, including pointers and non-pointers, in a stack frame.
The purpose of this map is to allow the runtime to poison
locations of dead data to catch lost invariants.

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

11 years agocmd/gc: fix windows build, probably
Russ Cox [Mon, 9 Dec 2013 18:02:56 +0000 (13:02 -0500)]
cmd/gc: fix windows build, probably

TBR=iant
CC=golang-dev
https://golang.org/cl/39540043

11 years agocmd/6l: fix linux/amd64
Russ Cox [Mon, 9 Dec 2013 17:58:35 +0000 (09:58 -0800)]
cmd/6l: fix linux/amd64

TBR=iant
CC=golang-dev
https://golang.org/cl/39530043

11 years agocmd/dist, cmd/go: pass -fmessage-length always
Russ Cox [Mon, 9 Dec 2013 17:56:23 +0000 (12:56 -0500)]
cmd/dist, cmd/go: pass -fmessage-length always

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

11 years agocmd/gc: print more information for windows failure
Russ Cox [Mon, 9 Dec 2013 17:55:25 +0000 (12:55 -0500)]
cmd/gc: print more information for windows failure

TBR=iant
CC=golang-dev
https://golang.org/cl/39510043

11 years agocmd/ld: fix linux/386 build
Russ Cox [Mon, 9 Dec 2013 15:42:55 +0000 (07:42 -0800)]
cmd/ld: fix linux/386 build

TBR=iant
CC=golang-dev
https://golang.org/cl/39400044

11 years agocmd/dist, cmd/go: pass -fmessage-length=0 when using clang
Russ Cox [Mon, 9 Dec 2013 15:33:27 +0000 (10:33 -0500)]
cmd/dist, cmd/go: pass -fmessage-length=0 when using clang

That option turns off word wrapping of individual
error messages generated by clang. The wrapping
makes the errors harder to read and conflicts with the
idea of a terminal window that can be resized.

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

11 years agoliblink: fix Plan 9 build
David du Colombier [Mon, 9 Dec 2013 12:55:53 +0000 (07:55 -0500)]
liblink: fix Plan 9 build

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