]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agosyscall: gofmt
Mikio Hara [Fri, 6 Feb 2015 05:54:28 +0000 (14:54 +0900)]
syscall: gofmt

And the silence of the git-codereview.

Change-Id: If3f7fe2de2ab4c1756f3cef8267199049d468b31
Reviewed-on: https://go-review.googlesource.com/3983
Reviewed-by: Minux Ma <minux@golang.org>
10 years agomisc/ios: add README and wrapper script to ease cross-compiling for darwin/arm
Shenghou Ma [Fri, 26 Dec 2014 06:24:42 +0000 (01:24 -0500)]
misc/ios: add README and wrapper script to ease cross-compiling for darwin/arm

Fixes #837.

Change-Id: I2d601504addbd220b304d32d587144d2a702f753
Reviewed-on: https://go-review.googlesource.com/2127
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/dist, make.bash: darwin/arm support
Shenghou Ma [Fri, 26 Dec 2014 06:22:41 +0000 (01:22 -0500)]
cmd/dist, make.bash: darwin/arm support

cmd/dist: recognize darwin/arm as (host) goos/goarches. also hard
          code GOARM=7 for darwin/arm.
make.bash: don't pass -mmacosx-version-min=10.6 when building for
           darwin/arm.

Change-Id: If0ecd84a5179cd9bb61b801ac1899adc45f12f75
Reviewed-on: https://go-review.googlesource.com/2126
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agomisc/cgo/test: skip test7978 when using unsupported compilers
Shenghou Ma [Fri, 26 Dec 2014 06:20:29 +0000 (01:20 -0500)]
misc/cgo/test: skip test7978 when using unsupported compilers

On Darwin/ARM, because libSystem doesn't provide functions for
__sync_fetch_and_add, and only clang can inline that function,
skip the test when building with GCC.

Change-Id: Id5e9d8f9bbe1e6bcb2f381f0f66cf68aa95277c7
Reviewed-on: https://go-review.googlesource.com/2125
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agoruntime/cgo: darwin/arm cgo support
Shenghou Ma [Fri, 26 Dec 2014 06:17:42 +0000 (01:17 -0500)]
runtime/cgo: darwin/arm cgo support

Change-Id: I936be12eed95b99d1d20ed16fb785182e1817b33
Reviewed-on: https://go-review.googlesource.com/2124
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agosyscall: darwin/arm support
Shenghou Ma [Fri, 26 Dec 2014 06:09:07 +0000 (01:09 -0500)]
syscall: darwin/arm support

Change-Id: Id6f7fa12084204bc3a200f423c7966ce2a0b63a0
Reviewed-on: https://go-review.googlesource.com/2123
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agosync/atomic: darwin/arm support
Shenghou Ma [Fri, 26 Dec 2014 06:08:23 +0000 (01:08 -0500)]
sync/atomic: darwin/arm support

Change-Id: I213a8ab0b8c027a7b73567aeefdca73fd10eae28
Reviewed-on: https://go-review.googlesource.com/2122
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agoruntime: darwin/arm support
Shenghou Ma [Fri, 26 Dec 2014 06:07:10 +0000 (01:07 -0500)]
runtime: darwin/arm support

Change-Id: I63110daad2d62ae72ab1f33a40464d76e6205627
Reviewed-on: https://go-review.googlesource.com/2121
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agoliblink, cmd/ld, cmd/5l: darwin/arm support
Shenghou Ma [Fri, 26 Dec 2014 05:15:07 +0000 (00:15 -0500)]
liblink, cmd/ld, cmd/5l: darwin/arm support

liblink:
 - set dummy value for ctxt->tlsoffset.
cmd/ld:
 - always do external linking when using cgo on darwin/arm,
   as our linker might not generate codesign-compatible binary.
cmd/5l:
 - support generate ARM Mach-O binaries
 - add machoreloc1() that translate our internal relocation to
   macho relocations used by external linking.

Change-Id: Ic5454aeb87009aaf8f1453ec7fe33e6da55d5f06
Reviewed-on: https://go-review.googlesource.com/3273
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agolib9: provide alterantive implementation of ldexp and frexp
Shenghou Ma [Fri, 26 Dec 2014 05:08:51 +0000 (00:08 -0500)]
lib9: provide alterantive implementation of ldexp and frexp

Libc on Darwin/ARM has a buggy implementation of ldexp and frexp
that could not handle denormal numbers.

Also disable VFP runfast (flush-to-zero) mode so that the gc
compiler can correctly handle denormal constants used in math and
strconv tests.

Change-Id: Ie64220b882f414e0b37f406f38181c3586104d46
Reviewed-on: https://go-review.googlesource.com/2119
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agoliblink, cmd/ld, runtime: set the type of runtime.tlsg in runtime
Shenghou Ma [Fri, 26 Dec 2014 05:48:33 +0000 (00:48 -0500)]
liblink, cmd/ld, runtime: set the type of runtime.tlsg in runtime

In the old code, liblink, cmd/ld and runtime all have code determine
whether runtime.tlsg is an actual variable or a placeholder for TLS
relocation. This change consolidate them into one: the runtime/tls_arm.s
will ultimately determine the type of that variable.

Change-Id: I3b3f80791a1db4c2b7318f81a115972cd2237e43
Reviewed-on: https://go-review.googlesource.com/2118
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agocmd/cgo: detect misuse of generated _cgo_export.h
Shenghou Ma [Thu, 5 Feb 2015 19:16:13 +0000 (14:16 -0500)]
cmd/cgo: detect misuse of generated _cgo_export.h

Fixes #9742.

Change-Id: Ifedf7ff9465bc49534b708d414c8e435ee9ce6cd
Reviewed-on: https://go-review.googlesource.com/3970
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agotest: check for build constraints only upto the first blank line
Rahul Chaudhry [Tue, 3 Feb 2015 18:52:18 +0000 (10:52 -0800)]
test: check for build constraints only upto the first blank line

The main issue is that the misc/cgo/{stdio,life} tests are silently
getting skipped when invoked from run.bash.

run.go should ignore any build tags after the first blank line in
source file. It already checks for test actions only upto the first
blank line. Build tags must be specified in the same block.

See http://golang.org/cl/3675 for background.

Change-Id: Id8abf000119e3335f7250d8ef34aac7811fc9dff
Reviewed-on: https://go-review.googlesource.com/3812
Reviewed-by: Minux Ma <minux@golang.org>
10 years agotest: chdir before running go tool, cleanup afterwards.
Rahul Chaudhry [Tue, 3 Feb 2015 20:41:52 +0000 (12:41 -0800)]
test: chdir before running go tool, cleanup afterwards.

issue9355 generated a file a.[568] in test/ directory and left it there.
For tests like these, it is best to chdir to a test specific directory
before generating any temporary files, since the tests are running
in parallel and might otherwise race with each other for the same files.

Change-Id: I58d96256d4d8ee3fda70d81077f19006064a7425
Reviewed-on: https://go-review.googlesource.com/3813
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agoimage: fix obsolete reference in PalettedImage doc comment
Andrew Ekstedt [Mon, 26 Jan 2015 08:39:49 +0000 (00:39 -0800)]
image: fix obsolete reference in PalettedImage doc comment

PalettedColorModel was renamed to color.Palette
over three years ago by https://golang.org/cl/5132048.

Change-Id: I0204ade10eabff45620fda2990fed428c65d871e
Reviewed-on: https://go-review.googlesource.com/3305
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
10 years agoreflect: for struct tags, reject control chars (including tabs) in keys,
Nigel Tao [Thu, 5 Feb 2015 04:23:52 +0000 (15:23 +1100)]
reflect: for struct tags, reject control chars (including tabs) in keys,
and empty keys. Also reject malformed (quoted) values.

See also https://go-review.googlesource.com/3952

Change-Id: Ice6de33b09f9904b28e410a680a90aa6c8c76fed
Reviewed-on: https://go-review.googlesource.com/3953
Reviewed-by: Rob Pike <r@golang.org>
10 years agostrconv: fix internal documentation (clarification, typos)
Robert Griesemer [Tue, 3 Feb 2015 00:42:40 +0000 (16:42 -0800)]
strconv: fix internal documentation (clarification, typos)

Change-Id: I7514e643a6a81ca715adbf6f8d19d3b2dd43fe6c
Reviewed-on: https://go-review.googlesource.com/3810
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: add "smoke test" for big.Float division
Robert Griesemer [Thu, 5 Feb 2015 01:17:38 +0000 (17:17 -0800)]
math/big: add "smoke test" for big.Float division

Change-Id: Ica419a1215ca33dc1cff1e9e4137f204591e3cee
Reviewed-on: https://go-review.googlesource.com/3942
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: more Float conversion tests
Robert Griesemer [Thu, 5 Feb 2015 00:31:59 +0000 (16:31 -0800)]
math/big: more Float conversion tests

Change-Id: Ia30886569141ca2e0321bea6ee1d5c9e0f79d6f9
Reviewed-on: https://go-review.googlesource.com/3941
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: simplified formatting logic
Robert Griesemer [Wed, 4 Feb 2015 23:16:45 +0000 (15:16 -0800)]
math/big: simplified formatting logic

Change-Id: I4329c44b829fcd77e4f1a1d45904f0f8a280a595
Reviewed-on: https://go-review.googlesource.com/3940
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agonet/http: Fix typo in MaxBytesReader comment
Erik Aigner [Thu, 5 Feb 2015 07:07:18 +0000 (08:07 +0100)]
net/http: Fix typo in MaxBytesReader comment

Change-Id: Ida064ff422d077d508ef94f52fc813daa6277a99
Reviewed-on: https://go-review.googlesource.com/3933
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agocmd/5a: prepare reglist correctly
Russ Cox [Thu, 5 Feb 2015 10:29:26 +0000 (05:29 -0500)]
cmd/5a: prepare reglist correctly

This was working when 5a was built on x86 because REG_R0 = 32,
and a 32-bit shift on x86 uses only the low 32 bits of the shift count.

On ARM, the shift clamping is different.

Moving to Go will avoid these differing shift semantics.
I tripped over and fixed this bug in new5a the same way earlier tonight.

Change-Id: Id56aa0bb1830ccf250960f843e0acb8a0409e87d
Reviewed-on: https://go-review.googlesource.com/3961
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agoexpvar: fix build
Dmitry Vyukov [Thu, 5 Feb 2015 13:50:11 +0000 (16:50 +0300)]
expvar: fix build

Change-Id: I6ee7aa76673e51576b5a84c512b22a0f8af5b02f
Reviewed-on: https://go-review.googlesource.com/3966
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
10 years agoexpvar: Add benchmarks for perf sensitive operations
Evan Phoenix [Fri, 30 Jan 2015 23:31:47 +0000 (15:31 -0800)]
expvar: Add benchmarks for perf sensitive operations

These benchmarks are only for functions commonly used in loops. The
other functions are typically used for inspection or setup and thus are
not performance sensitive.

Change-Id: I8d0a0ba2d8234ecacb40fa3aa9077bf93c8fe89c
Reviewed-on: https://go-review.googlesource.com/3680
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
10 years agoRevert "liblink, cmd/5a: fix reglist parsing/printing after changing REG_R0 to 32"
Russ Cox [Thu, 5 Feb 2015 10:23:26 +0000 (10:23 +0000)]
Revert "liblink, cmd/5a: fix reglist parsing/printing after changing REG_R0 to 32"

This reverts commit da4abda2a1718c74b39134764ae6f694041a25e4.

Change-Id: Ifd09b3dae0af0c7cef5fbbc332c63e78dc90d6b1
Reviewed-on: https://go-review.googlesource.com/3960
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/ld: always set timestamp in PE header to 0
Shenghou Ma [Mon, 2 Feb 2015 23:53:24 +0000 (18:53 -0500)]
cmd/ld: always set timestamp in PE header to 0

Fixes #9756.

Change-Id: If4ee6fe10f8f90294ff9c5e7480371494094b111
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/3740
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
10 years agoliblink, cmd/5a: fix reglist parsing/printing after changing REG_R0 to 32
Shenghou Ma [Thu, 5 Feb 2015 02:30:22 +0000 (21:30 -0500)]
liblink, cmd/5a: fix reglist parsing/printing after changing REG_R0 to 32

Fixes #9759.

Change-Id: I263f1251b9401371231374551c4f71c70cb6e359
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/3931
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agocmd/pack: simplify the testing logic slightly
Rob Pike [Wed, 4 Feb 2015 21:50:08 +0000 (13:50 -0800)]
cmd/pack: simplify the testing logic slightly

Followup to https://go-review.googlesource.com/3910

We only need 1000 iteratinons.

Change-Id: Ib63ae53105176abec77bad9609d638aeda7bcd61
Reviewed-on: https://go-review.googlesource.com/3901
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agomath/big: first version of Float %e, %f, %g, %G formatting working
Robert Griesemer [Wed, 4 Feb 2015 01:37:01 +0000 (17:37 -0800)]
math/big: first version of Float %e, %f, %g, %G formatting working

Change-Id: I10efa3bc8bc7f41100feabe17837f805a42d7eb6
Reviewed-on: https://go-review.googlesource.com/3842
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: fix %b format so it matches strconf %b format for non-zero values
Robert Griesemer [Tue, 3 Feb 2015 23:13:26 +0000 (15:13 -0800)]
math/big: fix %b format so it matches strconf %b format for non-zero values

(For zero values the strconv %b format prints the bias-adjusted exponent;
there's no bias in Float.)

Change-Id: I6f4dda9c3a50d02eac375cfe2c927c1540aae865
Reviewed-on: https://go-review.googlesource.com/3841
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: implemented decimal rounding for Float-to-string conversion
Robert Griesemer [Tue, 3 Feb 2015 22:29:03 +0000 (14:29 -0800)]
math/big: implemented decimal rounding for Float-to-string conversion

Change-Id: Id508ca2f6c087861e8c6bc536bc39e54dce09825
Reviewed-on: https://go-review.googlesource.com/3840
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agoruntime: support panic/print logging in android-L.
Hyang-Ah Hana Kim [Sat, 24 Jan 2015 22:51:42 +0000 (17:51 -0500)]
runtime: support panic/print logging in android-L.

In android-L, logging is done through the logd daemon.
If logd daemon is available, send logging to logd.
Otherwise, fallback to the legacy mechanism (/dev/log files).

This change adds access/socket/connect calls to interact with the logd.

Fixes golang/go#9398.

Change-Id: I3c52b81b451f5862107d7c675f799fc85548486d
Reviewed-on: https://go-review.googlesource.com/3350
Reviewed-by: David Crawshaw <crawshaw@golang.org>
10 years agogo1.5.txt: array generation support in testing/quick
Josh Bleecher Snyder [Wed, 4 Feb 2015 17:32:44 +0000 (09:32 -0800)]
go1.5.txt: array generation support in testing/quick

Change-Id: I00f18a8c62a8d63822d7e07fee1ac5f088cc9587
Reviewed-on: https://go-review.googlesource.com/3866
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
10 years agoRevert "runtime: bound defer pools"
Russ Cox [Wed, 4 Feb 2015 16:56:34 +0000 (11:56 -0500)]
Revert "runtime: bound defer pools"

This reverts commit 805907115352801a54f987fc9079251b478cce3f.

Conflicts:
src/runtime/proc1.go (resolved by hand)

Change-Id: Ic62e3e802f0007ff9012b37bc5fd41fcafc153d0
Reviewed-on: https://go-review.googlesource.com/3885
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
10 years agoliblink: require use of TYPE_ADDR, not TYPE_CONST
Russ Cox [Fri, 30 Jan 2015 04:35:14 +0000 (23:35 -0500)]
liblink: require use of TYPE_ADDR, not TYPE_CONST

Add Addr-checking for all Progs on input to liblink, in liblink/pass.c,
including requiring use of TYPE_ADDR, not TYPE_CONST.
Update compilers and assemblers to satisfy checks.

Change-Id: Idac36b9f6805f0451cb541d2338992ca5eaf3963
Reviewed-on: https://go-review.googlesource.com/3801
Reviewed-by: Austin Clements <austin@google.com>
10 years agotesting/quick: support generation of array types in Value
Chris Kastorff [Wed, 4 Feb 2015 12:43:00 +0000 (04:43 -0800)]
testing/quick: support generation of array types in Value

Generating array types like [4]int would fail even though the int type
is generatable. Allow generating values of array types when the inner
type is generatable.

Change-Id: I7d71b3c18edb3737e2fec1ddf5e36c9dc8401971
Reviewed-on: https://go-review.googlesource.com/3865
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
10 years agocmd/go, make: remove ccflags
Josh Bleecher Snyder [Wed, 4 Feb 2015 00:17:08 +0000 (16:17 -0800)]
cmd/go, make: remove ccflags

cc is no more.

Change-Id: I8d1bc0d2e471cd9357274204c9bc1fa67cbc272d
Reviewed-on: https://go-review.googlesource.com/3833
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
10 years agocmd/go: add 9g and 9l to documentation
Josh Bleecher Snyder [Wed, 4 Feb 2015 00:19:05 +0000 (16:19 -0800)]
cmd/go: add 9g and 9l to documentation

Change-Id: I274c438ab168278dfbb34ada3ed9a7f7c66b66ef
Reviewed-on: https://go-review.googlesource.com/3834
Reviewed-by: Minux Ma <minux@golang.org>
10 years agonet: remove the dregs of old built-in poll server
Mikio Hara [Wed, 4 Feb 2015 09:00:52 +0000 (18:00 +0900)]
net: remove the dregs of old built-in poll server

We don't need placeholders for the old built-in poll server any more.

Change-Id: I3a510aec6a30bc2ac97676c400177cdfe557b8dc
Reviewed-on: https://go-review.googlesource.com/3863
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
10 years agoruntime: cleanup some left-overs of the C past
Dmitry Vyukov [Tue, 3 Feb 2015 08:20:58 +0000 (11:20 +0300)]
runtime: cleanup some left-overs of the C past

Change-Id: I3e280ca7d922f6ab14b2477361327ed076a95779
Reviewed-on: https://go-review.googlesource.com/3743
Reviewed-by: Keith Randall <khr@golang.org>
10 years agonet: update TDDO
Mikio Hara [Wed, 4 Feb 2015 02:27:08 +0000 (11:27 +0900)]
net: update TDDO

The issue #8432 has been marked as an issue for golang.org/x/net.

Change-Id: Ia39abd99b685c820ea6169ee6505b16028e7e77f
Reviewed-on: https://go-review.googlesource.com/3836
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agoruntime: bound defer pools
Dmitry Vyukov [Tue, 3 Feb 2015 05:58:04 +0000 (08:58 +0300)]
runtime: bound defer pools

The unbounded list-based defer pool can grow infinitely.
This can happen if a goroutine routinely allocates a defer;
then blocks on one P; and then unblocked, scheduled and
frees the defer on another P.
The scenario was reported on golang-nuts list.

We've been here several times. Any unbounded local caches
are bad and grow to infinite size. This change introduces
central defer pool; local pools become fixed-size
with the only purpose of amortizing accesses to the
central pool.

Change-Id: Iadcfb113ccecf912e1b64afc07926f0de9de2248
Reviewed-on: https://go-review.googlesource.com/3741
Reviewed-by: Keith Randall <khr@golang.org>
10 years agocmd/gc: don't copy string in range []byte(str)
Dmitry Vyukov [Tue, 3 Feb 2015 17:50:58 +0000 (20:50 +0300)]
cmd/gc: don't copy string in range []byte(str)

Using benchmark from the issue:

benchmark                    old ns/op     new ns/op     delta
BenchmarkRangeStringCast     2162          1152          -46.72%

benchmark                    old allocs     new allocs     delta
BenchmarkRangeStringCast     1              0              -100.00%

Fixes #2204

Change-Id: I92c5edd2adca4a7b6fba00713a581bf49dc59afe
Reviewed-on: https://go-review.googlesource.com/3790
Reviewed-by: Keith Randall <khr@golang.org>
10 years agoruntime: fix RuntimeGogoBytes on windows/amd64
Austin Clements [Wed, 4 Feb 2015 02:14:47 +0000 (21:14 -0500)]
runtime: fix RuntimeGogoBytes on windows/amd64

Before 3c0fee1, runtime.gogo was just long enough to align to 64 bytes
on OSs with short get_tls implementations and 80 bytes on OSs with
longer get_tls implementations (Windows, Solaris, and Plan 9).
3c0fee1 added a few instructions, which pushed it to 80 on most OSs,
including Windows and Plan 9, and 96 on Solaris.

Fixes #9770.

Change-Id: Ie84810657c14ab16dce9f0e0a932955251b0bf33
Reviewed-on: https://go-review.googlesource.com/3850
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
10 years agogo/doc: don't treat _ consts as exported
Josh Bleecher Snyder [Tue, 3 Feb 2015 23:12:26 +0000 (15:12 -0800)]
go/doc: don't treat _ consts as exported

golang.org/cl/144110044 made _ consts treated
as exported as a small, safe fix for #5397.
It also introduced issue #9615.

golang.org/cl/2091 then fixed the underlying issue,
which was missing type information when the type
was specified only for _.

This cl reverts the original fix.

Fixes #9615.

Change-Id: I4815ad8292bb5bec18beb8c131b48949d9af8876
Reviewed-on: https://go-review.googlesource.com/3832
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agocrypto/tls: add support for AES_256_GCM_SHA384 cipher suites specified in RFC5289
Jacob H. Haven [Wed, 4 Feb 2015 00:15:18 +0000 (16:15 -0800)]
crypto/tls: add support for AES_256_GCM_SHA384 cipher suites specified in RFC5289

Generalizes PRF calculation for TLS 1.2 to support arbitrary hashes (SHA-384 instead of SHA-256).
Testdata were all updated to correspond with the new cipher suites in the handshake.

Change-Id: I3d9fc48c19d1043899e38255a53c80dc952ee08f
Reviewed-on: https://go-review.googlesource.com/3265
Reviewed-by: Adam Langley <agl@golang.org>
10 years agocmd/dist: fix whitespace and comment typo in arm vfp detection
Josh Bleecher Snyder [Tue, 3 Feb 2015 22:09:53 +0000 (14:09 -0800)]
cmd/dist: fix whitespace and comment typo in arm vfp detection

Follow-up to cl 2682.

Change-Id: I06a589e782af821e4fa46a7c34d9a549de47fa60
Reviewed-on: https://go-review.googlesource.com/3830
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agonet/http: remove unused switchReader type
Blake Gentry [Tue, 3 Feb 2015 20:01:29 +0000 (12:01 -0800)]
net/http: remove unused switchReader type

Change-Id: Ic8a01d06ffc6c80beaf6dee9e7242dcbb7425e71
Reviewed-on: https://go-review.googlesource.com/3822
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoinclude: restore use of signal.h on windows (fixes build)
Alex Brainman [Tue, 3 Feb 2015 23:07:16 +0000 (10:07 +1100)]
include: restore use of signal.h on windows (fixes build)

Change-Id: Ifd983cf50b1ccbe64a45d3b3ad171ef67f608033
Reviewed-on: https://go-review.googlesource.com/3831
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agocrypto/x509/pkix: Parse and add additional elements in a DN
Paul van Brouwershaven [Mon, 5 Jan 2015 11:15:18 +0000 (11:15 +0000)]
crypto/x509/pkix: Parse and add additional elements in a DN

Additional elements in a DN can be added in via ExtraNames. This
option can also be used for sorting DN elements in a custom order.

Change-Id: Ie408d332de913dc2a33bdd86433be38abb7b55be
Reviewed-on: https://go-review.googlesource.com/2257
Reviewed-by: Adam Langley <agl@golang.org>
10 years agoruntime: Change memprofrate to memprofilerate
Lynn Boger [Tue, 3 Feb 2015 18:13:31 +0000 (12:13 -0600)]
runtime:  Change memprofrate to memprofilerate

Use memprofilerate in GODEBUG instead of memprofrate to be
consistent with other uses.

Change-Id: Iaf6bd3b378b1fc45d36ecde32f3ad4e63ca1e86b
Reviewed-on: https://go-review.googlesource.com/3800
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agomath/big: implement precise Float to decimal conversion (core functionality)
Robert Griesemer [Tue, 3 Feb 2015 00:31:13 +0000 (16:31 -0800)]
math/big: implement precise Float to decimal conversion (core functionality)

Change-Id: Ic0153397922ded28a5cb362e86ecdfec42e92163
Reviewed-on: https://go-review.googlesource.com/3752
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: fix typos
Robert Griesemer [Sat, 31 Jan 2015 00:33:31 +0000 (16:33 -0800)]
math/big: fix typos

Change-Id: Icb1490f97584d61823339ae809b88d423b185e64
Reviewed-on: https://go-review.googlesource.com/3751
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: build Float.Format on top of Float.Append
Robert Griesemer [Fri, 30 Jan 2015 23:57:38 +0000 (15:57 -0800)]
math/big: build Float.Format on top of Float.Append

Change-Id: I444eec24467f827caa5c88a1c5ae5bce92508b98
Reviewed-on: https://go-review.googlesource.com/3750
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agoliblink: define fixed A-numbers for common instructions
Russ Cox [Fri, 30 Jan 2015 01:19:07 +0000 (20:19 -0500)]
liblink: define fixed A-numbers for common instructions

This makes names like ANOP, ATEXT, AGLOBL, ACALL, AJMP, ARET
available for use by architecture-independent processing passes.

On arm and ppc64, the alternate names are now aliases for the
official ones (ABL for ACALL, AB or ABR for AJMP, ARETURN for ARET).

Change-Id: Id027771243795af2b3745199c645b6e1bedd7d18
Reviewed-on: https://go-review.googlesource.com/3577
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: place DATA size in from3.offset always
Russ Cox [Fri, 30 Jan 2015 00:42:01 +0000 (19:42 -0500)]
liblink: place DATA size in from3.offset always

Like the TEXT/GLOBL flags, this was split between from.scale and reg,
neither of which is appropriate.

Change-Id: I2a16ef066a53b6edb7afb16cce108c0d1d26389c
Reviewed-on: https://go-review.googlesource.com/3576
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: the zero Prog is now valid and ready for use
Russ Cox [Thu, 29 Jan 2015 21:16:24 +0000 (16:16 -0500)]
liblink: the zero Prog is now valid and ready for use

Use AXXX instead of AGOK (neither is a valid instruction but AXXX is zero)
for the initial setting of Prog.as, and now there are no non-zero default
field settings.

Remove the arch-specific zprog/zprg in favor of a single global zprog.
Remove the arch-specific prg constructor in favor of emallocz(sizeof(Prog)).

Change-Id: Ia73078726768333d7cdba296f548170c1bea9498
Reviewed-on: https://go-review.googlesource.com/3575
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: remove dead computation of p->back in span6/span8
Russ Cox [Thu, 29 Jan 2015 20:35:56 +0000 (15:35 -0500)]
liblink: remove dead computation of p->back in span6/span8

Originally, when this code was part of 6l/8l, every new
Prog was constructed starting with zprg, which set back=2,
and then this code walked over the list setting back=1 for
backward branches, back=0 otherwise. The initial back=2
setting was used to identify forward branches (the branched-to
instruction had back == 2 since it hadn't yet been set to 0 or 1).

When the code was extracted into liblink and linked directly
with 6a/6g/8a/8g, those programs created the Prog struct
and did not set back=2, breaking this backward branch detection.

No one noticed, because the next loop recomputes the information.
The only requirement for the next loop is that p->back == 0 or 1 for
each of the Progs in the list.

The initialization of the zprg with back=2 would cause problems
in this second loop, for the few liblink-internally-generated instructions
that are created by copying zprg, except that the first loop was
making sure that back == 0 or 1.

The first loop's manipulation of p->back can thus be deleted,
provided we also delete the zprg.back = 2 initializations.

This is awful and my fault. I apologize.

While we're here, remove the .scale = 1 from the zprg init too.
Anything that sets up a scaled index should set the scale itself.
(And mostly those come from outside liblink anyway.)

Tested by checking that all generated code is bit-for-bit
identical to before this CL.

Change-Id: I7f6e0b33ce9ccd5b7dc25e0f00429fedd0957c8c
Reviewed-on: https://go-review.googlesource.com/3574
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: renumber ARM conditions to make C_SCOND_NONE == 0
Russ Cox [Thu, 29 Jan 2015 20:18:22 +0000 (15:18 -0500)]
liblink: renumber ARM conditions to make C_SCOND_NONE == 0

A step toward making the zero Prog useful.

Change-Id: I427b98b1ce9bd8f093da825aa4bb83244fc01903
Reviewed-on: https://go-review.googlesource.com/3573
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: place TEXT/GLOBL flags in p->from3 always
Russ Cox [Thu, 29 Jan 2015 19:58:54 +0000 (14:58 -0500)]
liblink: place TEXT/GLOBL flags in p->from3 always

Before, amd64 and 386 stored the flags in p->from.scale
and arm and ppc64 stored the flags in p->reg.
Both caused special cases in printing and in handling of the
addresses.

To avoid possible conflicts with the real meaning of p->from
and to avoid storing a non-register value in a reg field,
use from3 to hold a TYPE_CONST value giving the flags.

There is still a special case for printing, because the flags
are specified without a $, and normally a TYPE_CONST prints
with a $. But that's much less special than what came before.

This allows us to remove the textflag and settextflag methods
from LinkArch. They are no longer architecture-specific.

Change-Id: I931da8e1ecd92e127cd9aa44ef5a73c42e730110
Reviewed-on: https://go-review.googlesource.com/3572
Reviewed-by: Austin Clements <austin@google.com>
10 years agoliblink: use same TEXT $frame-arg encoding for all architectures
Russ Cox [Thu, 29 Jan 2015 17:26:21 +0000 (12:26 -0500)]
liblink: use same TEXT $frame-arg encoding for all architectures

Change-Id: I3417a8c5ddd7f405939edc9fdef086e4741495a1
Reviewed-on: https://go-review.googlesource.com/3571
Reviewed-by: Austin Clements <austin@google.com>
10 years agocmd/9a: fix GLOBL instruction
Russ Cox [Thu, 29 Jan 2015 18:50:19 +0000 (13:50 -0500)]
cmd/9a: fix GLOBL instruction

Because it was lumped in with the TEXT instruction,
the high 32 bits of the 64-bit constant holding the size
were always set to 0x80000000 (ArgsSizeUnknown).
This only worked because cmd/9l was reading the 64-bit
value into an int32.

While we're here, fix 5a.
It wasn't as much of a problem there because
the two values were being stored in two different fields.
But it was still wrong.

Change-Id: I69a2214c7be939530d499e29cfdc3b26720ac05a
Reviewed-on: https://go-review.googlesource.com/3570
Reviewed-by: Austin Clements <austin@google.com>
10 years agocmd/gc: fix capturing by value for range statements
Dmitry Vyukov [Thu, 29 Jan 2015 15:33:19 +0000 (18:33 +0300)]
cmd/gc: fix capturing by value for range statements

Kindly detected by race builders by failing TestRaceRange.
ORANGE typecheck does not increment decldepth around body.

Change-Id: I0df5f310cb3370a904c94d9647a9cf0f15729075
Reviewed-on: https://go-review.googlesource.com/3507
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/gc: typecheck type switch variables
Dmitry Vyukov [Fri, 30 Jan 2015 08:23:22 +0000 (11:23 +0300)]
cmd/gc: typecheck type switch variables

Type switch variables was not typechecked.
Previously it lead only to a minor consequence:

switch unsafe.Sizeof = x.(type) {

generated an inconsistent error message.
But capturing by value functionality now requries typechecking of all ONAMEs.

Fixes #9731

Change-Id: If037883cba53d85028fb97b1328696091b3b7ddd
Reviewed-on: https://go-review.googlesource.com/3600
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: fix nosplit stack overflow
Dmitry Vyukov [Thu, 29 Jan 2015 09:47:30 +0000 (12:47 +0300)]
runtime: fix nosplit stack overflow

The overflow happens only with -gcflags="-N -l"
and can be reproduced with:

$ go test -gcflags="-N -l" -a -run=none net

runtime.cgocall: nosplit stack overflow
504 assumed on entry to runtime.cgocall
480 after runtime.cgocall uses 24
472 on entry to runtime.cgocall_errno
408 after runtime.cgocall_errno uses 64
400 on entry to runtime.exitsyscall
288 after runtime.exitsyscall uses 112
280 on entry to runtime.exitsyscallfast
152 after runtime.exitsyscallfast uses 128
144 on entry to runtime.writebarrierptr
88 after runtime.writebarrierptr uses 56
80 on entry to runtime.writebarrierptr_nostore1
24 after runtime.writebarrierptr_nostore1 uses 56
16 on entry to runtime.acquirem
-24 after runtime.acquirem uses 40

Move closure creation into separate function so that
frames of writebarrierptr_shadow and writebarrierptr_nostore1
are overlapped.

Fixes #9721

Change-Id: I40851f0786763ee964af34814edbc3e3d73cf4e7
Reviewed-on: https://go-review.googlesource.com/3418
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: fix false race report during tracing
Dmitry Vyukov [Tue, 3 Feb 2015 10:01:09 +0000 (13:01 +0300)]
runtime: fix false race report during tracing

Currently race detector produces the following reports on pprof tests:

WARNING: DATA RACE
Read by goroutine 4:
  runtime/pprof_test.TestTraceStartStop()
      src/runtime/pprof/trace_test.go:38 +0x1da
  testing.tRunner()
      src/testing/testing.go:448 +0x13a

Previous write by goroutine 5:
  bytes.(*Buffer).grow()
      src/bytes/buffer.go:102 +0x190
  bytes.(*Buffer).Write()
      src/bytes/buffer.go:127 +0x75
  runtime/pprof.func·002()
      src/runtime/pprof/pprof.go:633 +0xae

Trace writer goroutine synchronizes with StopTrace
using trace.shutdownSema runtime semaphore.
But race detector does not see that synchronization
and so produces false reports.
Teach race detector about the synchronization.

Change-Id: I1219817325d4e16b423f29a0cbee94c929793881
Reviewed-on: https://go-review.googlesource.com/3746
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: rearrange framepointer check condition
Austin Clements [Tue, 3 Feb 2015 14:18:15 +0000 (09:18 -0500)]
runtime: rearrange framepointer check condition

The test for the framepointer experiment flag is cheaper and more
branch-predictable than the other parts of this conditional, so move
it first.  This is also more readable.

(Originally, the flag check required parsing the experiments string,
which is why it was done last.  Now that flag is cached.)

Change-Id: I84e00fa7e939e9064f0fa0a4a6fe00576dd61457
Reviewed-on: https://go-review.googlesource.com/3782
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoruntime: use 2*regSize for saved frame pointer check
Austin Clements [Tue, 3 Feb 2015 14:09:56 +0000 (09:09 -0500)]
runtime: use 2*regSize for saved frame pointer check

Previously, we checked for a saved frame pointer by looking for a
2*ptrSize gap between the argument pointer and the locals pointer.
The intent of this check was to look for a two stack slot gap (caller
IP and saved frame pointer), but stack slots are regSize, not ptrSize.

Correct this by checking instead for a 2*regSize gap.

On most platforms, this made no difference because ptrSize==regSize.
However, on amd64p32 (nacl), the saved frame pointer check incorrectly
fired when there was no saved frame pointer because the one stack slot
for the caller IP left an 8 byte gap, which is 2*ptrSize (but not
2*regSize) on amd64p32.

Fixes #9760.

Change-Id: I6eedcf681fe5bf2bf924dde8a8f2d9860a4d758e
Reviewed-on: https://go-review.googlesource.com/3781
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoruntime: add missing \n to error message
Austin Clements [Tue, 3 Feb 2015 13:35:38 +0000 (08:35 -0500)]
runtime: add missing \n to error message

Change-Id: Ife7d30f4191e6a8aaf3a442340d277989f7a062d
Reviewed-on: https://go-review.googlesource.com/3780
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agonet: case insensitivity of DNS labels in built-in stub resolver
Mikio Hara [Mon, 2 Feb 2015 12:09:23 +0000 (21:09 +0900)]
net: case insensitivity of DNS labels in built-in stub resolver

This change adds support for case insensitivity of DNS labels to
built-in DNS stub resolver as described in RFC 4343.

Fixes #9215.

Change-Id: Ia752fe71866a3bfa3ea08371985b799d419ddea3
Reviewed-on: https://go-review.googlesource.com/3685
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agonet/http: remove redundant strings.TrimPrefix
Erik Aigner [Mon, 2 Feb 2015 07:52:41 +0000 (08:52 +0100)]
net/http: remove redundant strings.TrimPrefix

We already checked for the prefix with strings.HasPrefix

Change-Id: I33852fd19ffa92aa33b75b94b4bb505f4043a54a
Reviewed-on: https://go-review.googlesource.com/3691
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoinclude: fix arm build one more time
Dave Cheney [Fri, 30 Jan 2015 15:19:50 +0000 (02:19 +1100)]
include: fix arm build one more time

Fourth time's the charm.

Actually this doesn't fix the build, there is a
crash after go_bootstrap is compiled which looks
like it is related to auxv parsing.

Change-Id: Id00e2dfbe7bae42856f996065d3fb90b820e29a8
Reviewed-on: https://go-review.googlesource.com/3610
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoruntime: Add memprofrate value to GODEBUG
Lynn Boger [Wed, 28 Jan 2015 18:28:59 +0000 (12:28 -0600)]
runtime: Add memprofrate value to GODEBUG

Add memprofrate as a value recognized in GODEBUG.  The
value provided is used as the new setting for
runtime.MemProfileRate, allowing the user to
adjust memory profiling.

Change-Id: If129a247683263b11e2dd42473cf9b31280543d5
Reviewed-on: https://go-review.googlesource.com/3450
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agocmd/6g, liblink, runtime: support saving base pointers
Austin Clements [Wed, 14 Jan 2015 16:09:50 +0000 (11:09 -0500)]
cmd/6g, liblink, runtime: support saving base pointers

This adds a "framepointer" GOEXPERIMENT that that makes the amd64
toolchain maintain base pointer chains in the same way that gcc
-fno-omit-frame-pointer does.  Go doesn't use these saved base
pointers, but this does enable external tools like Linux perf and
VTune to unwind Go stacks when collecting system-wide profiles.

This requires support in the compilers to not clobber BP, support in
liblink for generating the BP-saving function prologue and unwinding
epilogue, and support in the runtime to save BPs across preemption, to
skip saved BPs during stack unwinding and, and to adjust saved BPs
during stack moving.

As with other GOEXPERIMENTs, everything from the toolchain to the
runtime must be compiled with this experiment enabled.  To do this,
run make.bash (or all.bash) with GOEXPERIMENT=framepointer.

Change-Id: I4024853beefb9539949e5ca381adfdd9cfada544
Reviewed-on: https://go-review.googlesource.com/2992
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: eliminate uses of BP on amd64
Austin Clements [Tue, 27 Jan 2015 23:29:02 +0000 (18:29 -0500)]
runtime: eliminate uses of BP on amd64

Any place that clobbers BP in the runtime can potentially interfere
with frame pointer unwinding with GOEXPERIMENT=framepointer.  This
change eliminates uses of BP in the runtime to address this problem.
We have spare registers everywhere this occurs, so there's no downside
to eliminating BP.  Where possible, this uses the same new register as
the amd64p32 runtime, which doesn't use BP due to restrictions placed
on it by NaCL.

One nice side effect of this is that it will let perf/VTune unwind the
call stack even through a call to systemstack, which will let us get
really good call graphs from the garbage collector.

Change-Id: I0ffa14cb4dd2b613a7049b8ec59df37c52286212
Reviewed-on: https://go-review.googlesource.com/3390
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: rename m.gcing to m.preemptoff and make it a string
Austin Clements [Fri, 30 Jan 2015 20:30:41 +0000 (15:30 -0500)]
runtime: rename m.gcing to m.preemptoff and make it a string

m.gcing has become overloaded to mean "don't preempt this g" in
general.  Once the garbage collector is preemptible, the one thing it
*won't* mean is that we're in the garbage collector.

So, rename gcing to "preemptoff" and make it a string giving a reason
that preemption is disabled.  gcing was never set to anything but 0 or
1, so we don't have to worry about there being a stack of reasons.

Change-Id: I4337c29e8e942e7aa4f106fc29597e1b5de4ef46
Reviewed-on: https://go-review.googlesource.com/3660
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: update a few "onM"s in comments to say "systemstack"
Austin Clements [Wed, 28 Jan 2015 16:51:04 +0000 (11:51 -0500)]
runtime: update a few "onM"s in comments to say "systemstack"

Commit 656be31 replaced onM with systemstack, but missed updating a
few comments that still referred to onM.  Update these.

Change-Id: I0efb017e9a66ea0adebb6e1da6e518ee11263f69
Reviewed-on: https://go-review.googlesource.com/3664
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/9g: note suboptimal copy code
Austin Clements [Fri, 30 Jan 2015 16:18:24 +0000 (11:18 -0500)]
cmd/9g: note suboptimal copy code

9g generates needlessly complex code for small copies.  There are a
few other things that need to be improved about the copy code, so for
now just note the problem.

Change-Id: I0f1de4b2f9197a2635e27cc4b91ecf7a6c11f457
Reviewed-on: https://go-review.googlesource.com/3665
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agogo/printer: clearer logic (clenaup)
Robert Griesemer [Mon, 2 Feb 2015 19:02:09 +0000 (11:02 -0800)]
go/printer: clearer logic (clenaup)

Change-Id: I278ce47b38ec5732d981aec06b71f9ee5747c3bb
Reviewed-on: https://go-review.googlesource.com/3730
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agogo/printer: set prefix correctly when all comment lines blank
Dmitri Shuralyov [Mon, 2 Feb 2015 09:28:10 +0000 (01:28 -0800)]
go/printer: set prefix correctly when all comment lines blank

In stripCommonPrefix, the prefix was correctly calculated in all cases,
except one. That unhandled case is when there are more than 2 lines,
but all lines are blank (other than the first and last lines,
which contain /* and */ respectively).
This change detects that case and correctly sets the prefix calculated
from the last line. This is consistent with the (correct) behavior
that happens when there's at least one non-blank line.
That fixes issue #9751 that occurs for problematic input,
where cmd/gofmt and go/source would insert extra indentation on
every format operation. It also allows go/printer itself to print
such parsed files in an expected way.

Fixes #9751.

Change-Id: Id3dfb945beb59ffad3705085a3c285fca30a5f87
Reviewed-on: https://go-review.googlesource.com/3684
Reviewed-by: Robert Griesemer <gri@golang.org>
10 years agoos: fix TestMkdirAllAtSlash on Plan 9
David du Colombier [Mon, 2 Feb 2015 16:40:47 +0000 (17:40 +0100)]
os: fix TestMkdirAllAtSlash on Plan 9

Since CL 3676, the TestMkdirAllAtSlash test
depends on syscall.EROFS, which isn't defined
on Plan 9.

This change works around this issue by
defining a system dependent isReadonlyError
function.

Change-Id: If972fd2fe4828ee3bcb8537ea7f4ba29f7a87619
Reviewed-on: https://go-review.googlesource.com/3696
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agocmd/gc: always treat the output parameters as having been assigned in capturevars.
Shenghou Ma [Sat, 31 Jan 2015 07:50:56 +0000 (02:50 -0500)]
cmd/gc: always treat the output parameters as having been assigned in capturevars.

Fixes #9738.

Change-Id: Iab75de2d78335d4e31c3dce6a0e1826d8cddf5f3
Reviewed-on: https://go-review.googlesource.com/3690
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
10 years agonet: failed not faild
David Crawshaw [Mon, 2 Feb 2015 11:33:06 +0000 (11:33 +0000)]
net: failed not faild

Change-Id: Iea4221186325783db2029b07af1409015ddeda99
Reviewed-on: https://go-review.googlesource.com/3695
Reviewed-by: Dave Cheney <dave@cheney.net>
10 years agoos: don't silently skip test
Dave Cheney [Sat, 31 Jan 2015 03:48:14 +0000 (14:48 +1100)]
os: don't silently skip test

This is a followup to CL 3676.

Rather than silently returning from the test, a pass,
use the Skip facility to mark the test as skipped.

Change-Id: I90d237e770150bf8d69f14fb09874e70894a7f86
Reviewed-on: https://go-review.googlesource.com/3682
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
10 years agoos: allow EROFS in TestMkdirAllAtSlash
Rahul Chaudhry [Fri, 30 Jan 2015 23:07:11 +0000 (15:07 -0800)]
os: allow EROFS in TestMkdirAllAtSlash

On some systems (e.g. ChromeOS), / is mounted read-only.
This results in error code syscall.EROFS, which I guess
is just as valid as syscall.EACCES for this test.

Change-Id: I9188d5437a1b5ac1daa9c68b95b8dcb447666ca3
Reviewed-on: https://go-review.googlesource.com/3676
Reviewed-by: Ian Lance Taylor <iant@golang.org>
10 years agomath/big: split float conversion routines and tests into separate files
Robert Griesemer [Fri, 30 Jan 2015 22:53:53 +0000 (14:53 -0800)]
math/big: split float conversion routines and tests into separate files

No other functional changes.

Change-Id: I7e0bb7452c6a265535297ec7ce6a629f1aff695c
Reviewed-on: https://go-review.googlesource.com/3674
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: split rat conversion routines and tests into separate files
Robert Griesemer [Fri, 30 Jan 2015 22:20:04 +0000 (14:20 -0800)]
math/big: split rat conversion routines and tests into separate files

No other functional changes.

Change-Id: I8be1fc488caa4f3d4c00afcb8c00475bfcd10709
Reviewed-on: https://go-review.googlesource.com/3673
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: split int conversion routines and tests into separate files
Robert Griesemer [Fri, 30 Jan 2015 22:25:55 +0000 (14:25 -0800)]
math/big: split int conversion routines and tests into separate files

No other functional changes.

Change-Id: If0d9e6208d53478e70d991b6926ea196b2cccf2e
Reviewed-on: https://go-review.googlesource.com/3672
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: split nat conversion routines and tests into separate files
Robert Griesemer [Fri, 30 Jan 2015 22:12:21 +0000 (14:12 -0800)]
math/big: split nat conversion routines and tests into separate files

No functional changes.

Change-Id: Ibbb705b167603d30467f3ebb83a3bb39845306a5
Reviewed-on: https://go-review.googlesource.com/3671
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agomath/big: parsing of fractions and floats in mantissa bases other than 10
Robert Griesemer [Thu, 29 Jan 2015 01:11:15 +0000 (17:11 -0800)]
math/big: parsing of fractions and floats in mantissa bases other than 10

Change-Id: I1eaebf956a69e0958201cc5e0a9beefa062c71e1
Reviewed-on: https://go-review.googlesource.com/3454
Reviewed-by: Alan Donovan <adonovan@google.com>
10 years agodoc: add log.SetOutput to go1.5.txt
Andrew Gerrand [Fri, 30 Jan 2015 16:01:14 +0000 (16:01 +0000)]
doc: add log.SetOutput to go1.5.txt

Change-Id: I257211f10b334eb4828be96cd434d588bfb1a378
Reviewed-on: https://go-review.googlesource.com/3605
Reviewed-by: Rob Pike <r@golang.org>
10 years agolog: add SetOutput method on Logger
Andrew Gerrand [Mon, 19 Jan 2015 03:54:53 +0000 (14:54 +1100)]
log: add SetOutput method on Logger

Fixes #9629

Change-Id: I66091003b97742ca6d857fe51d609833ab727216
Reviewed-on: https://go-review.googlesource.com/3023
Reviewed-by: Rob Pike <r@golang.org>
10 years agocmd/pack: make a test less disk-intensive in short mode
Brad Fitzpatrick [Thu, 29 Jan 2015 12:45:56 +0000 (13:45 +0100)]
cmd/pack: make a test less disk-intensive in short mode

Fixes #9656

Change-Id: I1158636683492ef12eeafb12e257d205026adc3f
Reviewed-on: https://go-review.googlesource.com/3175
Reviewed-by: Minux Ma <minux@golang.org>
10 years agodoc: remove redundant images
Andrew Gerrand [Tue, 27 Jan 2015 08:50:00 +0000 (19:50 +1100)]
doc: remove redundant images

These are no longer used by anything.

Change-Id: I50c971418b07cafc983242833a196ba2028a2723
Reviewed-on: https://go-review.googlesource.com/3603
Reviewed-by: Rob Pike <r@golang.org>
10 years agoliblink: fix arm build again
Dave Cheney [Fri, 30 Jan 2015 05:20:46 +0000 (16:20 +1100)]
liblink: fix arm build again

Another attempt to fix the arm build by moving the include of signal.h
to cmd/lex.c, unless we are building on plan9.

Obviously if we had a plan9/arm builder this would probably not work, but
this is only a temporary measure until the c2go transition is complete.

Change-Id: I7f8ae27349b2e7a09c55db03e02a01939159a268
Reviewed-on: https://go-review.googlesource.com/3566
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agoruntime: fix system memory allocator on plan9
Dmitry Vyukov [Fri, 30 Jan 2015 11:36:12 +0000 (14:36 +0300)]
runtime: fix system memory allocator on plan9

The following line in sysFree:
n += (n + memRound) &^ memRound
doubles value of n (n += n).
Which is wrong and can lead to memory corruption.

Fixes #9712

Change-Id: I3c141b71da11e38837c09408cf4f1d22e8f7f36e
Reviewed-on: https://go-review.googlesource.com/3602
Reviewed-by: David du Colombier <0intro@gmail.com>
10 years agoruntime: fix trace ticks frequency on windows
Dmitry Vyukov [Thu, 29 Jan 2015 12:26:15 +0000 (15:26 +0300)]
runtime: fix trace ticks frequency on windows

Change-Id: I8c7fcc7705070bc9979e39d08a4c9b2870087a08
Reviewed-on: https://go-review.googlesource.com/3500
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
10 years agocmd/5l, cmd/9l: more ucontext.h fixes
Russ Cox [Fri, 30 Jan 2015 04:57:48 +0000 (23:57 -0500)]
cmd/5l, cmd/9l: more ucontext.h fixes

Change-Id: I32cad7358f5bfd8e107179653bdc55a69fbe772a
Reviewed-on: https://go-review.googlesource.com/3579
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/5l, cmd/8g: fix build failures
Russ Cox [Fri, 30 Jan 2015 04:49:27 +0000 (23:49 -0500)]
cmd/5l, cmd/8g: fix build failures

REG_R0 etc are defined in <ucontext.h> on ARM systems.
Possible use of uninitialized n in 8g/reg.c.

Change-Id: I6e8ce83a6515ca2b779ed8a344a25432db629cc2
Reviewed-on: https://go-review.googlesource.com/3578
Reviewed-by: Russ Cox <rsc@golang.org>
10 years agocmd/dist: update for portable Prog, Addr
Russ Cox [Mon, 26 Jan 2015 20:16:24 +0000 (15:16 -0500)]
cmd/dist: update for portable Prog, Addr

There are no D_ names anymore.

Change-Id: Id3f1ce5efafb93818e5fd16c47ff48bbf61b5339
Reviewed-on: https://go-review.googlesource.com/3520
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>