1
0
mirror of https://github.com/golang/go synced 2024-10-03 18:21:21 -06:00
Commit Graph

16581 Commits

Author SHA1 Message Date
Josh Bleecher Snyder
3191a23515 go/doc: propagate types from unexported constants
When constants were declared using unexported constants,
the type information was lost when those constants were filtered out.
This CL propagates the type information of unexported constants
so that it is available for display.

This is a follow-up to CL 144110044, which fixed this problem
specifically for _ constants.

Updates #5397.

Change-Id: I3f0c767a4007d88169a5634ab2870deea4e6a740
Reviewed-on: https://go-review.googlesource.com/2091
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-06 00:24:13 +00:00
Shenghou Ma
43178697db math/big: panic if n <= 0 for ProbablyPrime
Fixes #9509

Change-Id: I3b86745d38e09093fe2f4b918d774bd6608727d7
Reviewed-on: https://go-review.googlesource.com/2313
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-05 23:11:35 +00:00
Brad Fitzpatrick
b70ddc0b51 runtime: only check whether the runtime is stale once during tests
Noticed while investigating the speed of the runtime tests, as part
of debugging while Plan 9's runtime tests are timing out on GCE.

Change-Id: I95f5a3d967a0b45ec1ebf10067e193f51db84e26
Reviewed-on: https://go-review.googlesource.com/2283
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-05 21:33:27 +00:00
Fazlul Shahriar
e6f76aac32 math: be consistent in how we document special cases
Change-Id: Ic6bc4af7bcc89b2881b2b9e7290aeb6fd54804e2
Reviewed-on: https://go-review.googlesource.com/2239
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-05 21:01:46 +00:00
Russ Cox
e6d3511264 Revert "liblink, cmd/ld, runtime: remove stackguard1"
This reverts commit ab0535ae3f.

I think it will remain useful to distinguish code that must
run on a system stack from code that can run on either stack,
even if that distinction is no
longer based on the implementation language.

That is, I expect to add a //go:systemstack comment that,
in terms of the old implementation, tells the compiler,
to pretend this function was written in C.

Change-Id: I33d2ebb2f99ae12496484c6ec8ed07233d693275
Reviewed-on: https://go-review.googlesource.com/2275
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-05 16:29:56 +00:00
Shenghou Ma
a1c9e10371 reflect: document that Values can't be compared directly
Fixes #9504.

Change-Id: I148f407ace3d1b4db3f19fbb8561d1ee6c4c13b3
Reviewed-on: https://go-review.googlesource.com/2273
Reviewed-by: Rob Pike <r@golang.org>
2015-01-05 09:11:44 +00:00
Mikio Hara
a1053ed610 crypto/x509: add missing copyright
Change-Id: Ida3b431a06527f6cd604ab4af5ce517959c8619b
Reviewed-on: https://go-review.googlesource.com/2306
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-01-05 07:32:02 +00:00
Mikio Hara
35132a6be8 crypto/x509: fix nacl build
Change-Id: Ie47c6460c1749aef3cf6d7c6ba44d43305d7ca7b
Reviewed-on: https://go-review.googlesource.com/2305
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-05 06:31:49 +00:00
Dave Cheney
682922908f crypto/x509: split certFiles definition by GOOS
This CL splits the (ever growing) list of ca cert locations by major unix
platforms (darwin, windows and plan9 are already handled seperately).
Although it is clear the unix variants cannot manage to agree on some standard
locations, we can avoid to some extent an artificial ranking of priority
amongst the supported GOOSs.

* Split certFiles definition by GOOS
* Include NetBSD ca cert location

Fixes #9285

Change-Id: I6df2a3fddf3866e71033e01fce43c31e51b48a9e
Reviewed-on: https://go-review.googlesource.com/2208
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-05 05:41:27 +00:00
Nigel Tao
0b52392ef7 image: use three-index slice for NewYCbCr.
This ensures that changing an image.YCbCr's Y values can't change its
chroma values, even after re-slicing up to capacity.

Change-Id: Icb626561522e336a3220e10f456c95330ae7db9e
Reviewed-on: https://go-review.googlesource.com/2209
Reviewed-by: Rob Pike <r@golang.org>
2015-01-05 03:32:15 +00:00
Andrew Gerrand
43ce5c0306 log: update doc comment
Fixes #9448.

Change-Id: I8e1d676688d9e9b2fa3519ebc530905f574a1b3e
Reviewed-on: https://go-review.googlesource.com/2088
Reviewed-by: Rob Pike <r@golang.org>
2015-01-05 01:21:52 +00:00
Shenghou Ma
9a5789d499 fmt: fix two typos
Change-Id: I7b65cf3b67bef8950115066d6d12b25cd0a5edfc
Reviewed-on: https://go-review.googlesource.com/2272
Reviewed-by: Rob Pike <r@golang.org>
2015-01-04 23:07:43 +00:00
Michael Hudson-Doyle
19f2bd8c2e cmd/go: be more careful when linking a test exe with gccgo
Previously, we ended up passing two compiled objects for the package
being tested when linking the test executable.  Somewhat by luck, this
worked most of the time but occasionally it did not.  This changes the
linking code to not pass two objects for the same ImportPath and to
always pass the object for the test version of the package and removes
some unecessary nil checks.

Change-Id: I7bbd3fc708f14672ee2cc6aed3397421fceb8a38
Reviewed-on: https://go-review.googlesource.com/1840
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-04 21:01:15 +00:00
Shenghou Ma
281ae92881 liblink: fix encoding of SETcc for amd64
liblink used to encode both SETEQ BP and SETEQ CH as 0f 94 c5,
however, SETEQ BP should have used a REX prefix.

Fixes #8545.

Change-Id: Ie59c990cdd0ec506cffe4318e9ad1b48db5e57dd
Reviewed-on: https://go-review.googlesource.com/2270
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-01-04 20:38:12 +00:00
Michael Fraenkel
48d63035ce reflect: set dir when creating a channel via ChanOf
Fixes #9135

Change-Id: I4d0e4eb52a3d64262f107eb7eae4096a6e47ac08
Reviewed-on: https://go-review.googlesource.com/2238
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-04 19:42:14 +00:00
Ian Lance Taylor
1ebfb082a7 runtime: remove unnecessary GOOS switch
Change-Id: I8f518e273c02110042b08f7c50c3d38a648c8b6e
Reviewed-on: https://go-review.googlesource.com/2281
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-04 19:41:05 +00:00
Mikio Hara
2958860ee8 net: add test cases for parsing ipv4-mapped ipv6 address
This CL adds missing ipv4-mapped ipv6 address test cases to TestParseIP.

Change-Id: I3144d2a88d409bd515cf52f8711d407bfa81ed68
Reviewed-on: https://go-review.googlesource.com/2205
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-04 10:28:00 +00:00
Matthew Dempsky
537ddc9456 runtime: fix slicecopy return value for zero-width elements
Fixes #8620

Change-Id: Idb49e586919d21d07e94a39ed9ebb0562f403460
Reviewed-on: https://go-review.googlesource.com/2221
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-04 01:59:59 +00:00
Shenghou Ma
865e5e98b6 runtime: fix TestCgoExternalThreadSIGPROF again
Shell out to `uname -r` this time, so that the test will compile
even if the platform doesn't have syscall.Sysctl.

Change-Id: I3a19ab5d820bdb94586a97f4507b3837d7040525
Reviewed-on: https://go-review.googlesource.com/2271
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-03 05:49:22 +00:00
Shenghou Ma
2cbe27a272 runtime: skip TestCgoExternalThreadSIGPROF on OS X 10.6
The test program requires static constructor, which in turn needs
external linking to work, but external linking never works on 10.6.

This should fix the darwin-{386,amd64} builders.

Change-Id: I714fdd3e35f9a7e5f5659cf26367feec9412444f
Reviewed-on: https://go-review.googlesource.com/2235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-03 03:18:46 +00:00
Josh Bleecher Snyder
17577e48c9 runtime: use SETEQ instead of JZ for cas
Change-Id: Ibabbca3988d39bdce584924173a912d45f50f0dd
Reviewed-on: https://go-review.googlesource.com/2243
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-02 19:06:36 +00:00
Josh Bleecher Snyder
8bbd80063b cmd/go: put user ldflags at the end of the linker invocation
If the user provided a key but no value via -ldflag -X,
another linker flag was used as the value.

Placing the user's flags at the end avoids this problem.
It also provides the user the opportunity to
override existing linker flags.

Fixes #8810.

Change-Id: I96f4190713dc9a9c29142e56658446fba7fb6bc8
Reviewed-on: https://go-review.googlesource.com/2242
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-02 18:36:44 +00:00
Martin Möhrmann
79c4fad8c2 os: replace itod on posix with general itoa and fix possible infinite recursion
Remove use of itod on posix systems and replace with call to itoa.
Build and use same itoa function on all systems.
Fix infinite recursion in iota function for the case -1<<63.

Change-Id: I89d7e742383c5c4aeef8780501c78a3e1af87a6f
Reviewed-on: https://go-review.googlesource.com/2213
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-02 16:21:18 +00:00
Alberto Donizetti
307e2706cb cmd/gc: update issue tracker link
Updated the issue tracker link the compiler prints out
when asking for a bug report after an internal error.

Change-Id: I092b118130f131c6344d9d058bea4ad6379032b8
Reviewed-on: https://go-review.googlesource.com/2218
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-02 15:45:17 +00:00
Shenghou Ma
cb1897a58c cmd/gc: give an error if only one argument is given to complex()
Fixes #8501

Change-Id: I0dbbdded7f7924351c3d1841d60cb5c934b295b7
Reviewed-on: https://go-review.googlesource.com/2143
Reviewed-by: Chris Manghane <cmang@golang.org>
2015-01-02 02:52:56 +00:00
David Crawshaw
8fa0cf1db2 runtime: remove unused export_test declarations
Change-Id: Iac28c4bbe949af5628cef8ecafdd59ab5d71e6cc
Reviewed-on: https://go-review.googlesource.com/2240
Reviewed-by: Keith Randall <khr@golang.org>
2015-01-01 18:44:36 +00:00
Mikio Hara
a877e81caa net: don't return io.EOF on reading data from datagram, raw sockets on windows
Preventing returning io.EOF on non-connection oriented sockets is
already applied to Unix variants. This CL applies it to Windows.

Update #4856.

Change-Id: I82071d40f617e2962d0540b9d1d6a10ea4cdb2ec
Reviewed-on: https://go-review.googlesource.com/2203
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-01-01 05:21:32 +00:00
Mikio Hara
a456801615 net: remove redundant test case for lookupIP with threadLimit
There is no reason to have the redundant test case TestDNSThreadLimt
because TestLookupIPDeadline does cover what we need to test with
-dnsflood flag and more.

Also this CL moves TestLookupIPDeadline into lookup_test.go to avoid
abusing to control the order of test case execution by using file name.

Change-Id: Ib417d7d3411c59d9352c03c996704d584368dc62
Reviewed-on: https://go-review.googlesource.com/2204
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-01 05:20:16 +00:00
Shenghou Ma
1f28238557 runtime: provide a dummy value of _SIGPROF on plan9 and windows
Fixes build on plan9 and windows.

Change-Id: Ic9b02c641ab84e4f6d8149de71b9eb495e3343b2
Reviewed-on: https://go-review.googlesource.com/2233
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-01-01 04:41:43 +00:00
Shenghou Ma
0b2a74e89c runtime/cgo: remove unused variable
I missed this one in golang.org/cl/2232 and only tested the patch
on openbsd/amd64.

Change-Id: I4ff437ae0bfc61c989896c01904b6d33f9bdf0ec
Reviewed-on: https://go-review.googlesource.com/2234
Reviewed-by: Minux Ma <minux@golang.org>
2015-01-01 03:14:56 +00:00
Shenghou Ma
77cd6197d7 runtime/cgo: initialize our pthread_create wrapper earlier on openbsd
This is a genuine bug exposed by our test for issue 9456: our wrapper
for pthread_create is not initialized until we initialize cgo itself,
but it is possible that a static constructor could call pthread_create,
and in that case, it will be calling a nil function pointer.

Fix that by also initializing the sys_pthread_create function pointer
inside our pthread_create wrapper function, and use a pthread_once to
make sure it is only initialized once.

Fix build for openbsd.

Change-Id: Ica4da2c21fcaec186fdd3379128ef46f0e767ed7
Reviewed-on: https://go-review.googlesource.com/2232
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-01-01 02:52:34 +00:00
Shenghou Ma
76b2f06ee5 cmd/gc: fix filename output format verb for -s
%lL will prepend the current directory to the filename, which is not
what we want here (as the file name is already absolute).

Fixes #9150.

Change-Id: I4c9386be6baf421393b92d9401a264b4692986d0
Reviewed-on: https://go-review.googlesource.com/2231
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-31 23:11:07 +00:00
Shenghou Ma
5da9c8cd0a runtime: ignore SIGPROF to foreign threads before cgocallback is fully initialized
Some libraries, for example, OpenBLAS, create work threads in a global constructor.
If we're doing cpu profiling, it's possible that SIGPROF might come to some of the
worker threads before we make our first cgo call. Cgocallback used to terminate the
process when that happens, but it's better to miss a couple profiling signals than
to abort in this case.

Fixes #9456.

Change-Id: I112b8e1a6e10e6cc8ac695a4b518c0f577309b6b
Reviewed-on: https://go-review.googlesource.com/2141
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-31 23:10:44 +00:00
Martin Möhrmann
241583a432 strconv: optimize decimal to string conversion
Avoid the decimal lookup in digits array and compute the decimal character value directly.
Reduce calls to 64bit division on 32bit plattforms by splitting conversion into smaller blocks.
Convert value to uintptr type when it can be represented by uintptr.

on darwin/386

benchmark               old ns/op     new ns/op     delta
BenchmarkFormatInt      8352          7466          -10.61%
BenchmarkAppendInt      4281          3401          -20.56%
BenchmarkFormatUint     2785          2251          -19.17%
BenchmarkAppendUint     1770          1223          -30.90%

on darwin/amd64

benchmark               old ns/op     new ns/op     delta
BenchmarkFormatInt      5531          5492          -0.71%
BenchmarkAppendInt      2435          2295          -5.75%
BenchmarkFormatUint     1628          1569          -3.62%
BenchmarkAppendUint     726           750           +3.31%

Change-Id: Ifca281cbdd62ab7d7bd4b077a96da99eb12cf209
Reviewed-on: https://go-review.googlesource.com/2105
Reviewed-by: Robert Griesemer <gri@golang.org>
2014-12-30 23:28:02 +00:00
Alan Donovan
fcd61eb07e go/parser: add {map,chan,interface} to expression lookahead tokens
+ tests that these parse:
  map[int]int{}[0]++
  interface{f()}(x).f()
  chan int(x) <- 0

Fixes #9474

Change-Id: If9fa57b3ab415ae7e93aa9935ec63edda8fe9d4f
Reviewed-on: https://go-review.googlesource.com/2178
Reviewed-by: Robert Griesemer <gri@golang.org>
2014-12-30 21:49:25 +00:00
Brad Fitzpatrick
f005d6e34a archive/tar: document Reader.Next's behavior at the end
Change-Id: I72f6d0fc66dbee3f832d2d960b99a166a5bb10c3
Reviewed-on: https://go-review.googlesource.com/2191
Reviewed-by: David Symonds <dsymonds@golang.org>
2014-12-30 21:38:37 +00:00
Anthony Martin
3d032d7653 runtime: consolidate arch-specific signal handlers on Plan 9
Change-Id: I4379418853c523fc9aaeb5d6f37bc96117841418
Reviewed-on: https://go-review.googlesource.com/1786
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2014-12-30 14:36:15 +00:00
Brad Fitzpatrick
4b96409aac net/http: support for setting trailers from a server Handler
We already had client support for trailers, but no way for a server to
set them short of hijacking the connection.

Fixes #7759

Change-Id: Ic83976437739ec6c1acad5f209ed45e501dbb93a
Reviewed-on: https://go-review.googlesource.com/2157
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-30 04:27:17 +00:00
Chris Manghane
5cc29ab95e cmd/gc: logical operators should produce untyped bool for untyped
operands

Fixes #6671 for cmd/gc.

Change-Id: I4907655b6e243960f2ceb544c63ea16513c7bd68
Reviewed-on: https://go-review.googlesource.com/1251
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-29 23:36:30 +00:00
Robert Griesemer
c85a2bf9c2 testing/iotest: fix copy/paste error in comment
Reported via unsupported GitHub pull request:
https://github.com/golang/go/pull/9436/

Change-Id: I12b00e8ccac700bb36b200196e2867fcc863fdf1
Reviewed-on: https://go-review.googlesource.com/2139
Reviewed-by: Alan Donovan <adonovan@google.com>
2014-12-29 19:05:37 +00:00
David du Colombier
29b4e34cf2 runtime: rename atoi to _atoi on Plan 9
Following change 2154, the goatoi function
was renamed atoi.

However, this definition conflicts with the
atoi function defined in the Plan 9 runtime,
which takes a []byte instead of a string.

This change fixes the build on Plan 9.

Change-Id: Ia0f7ca2f965bd5e3cce3177bba9c806f64db05eb
Reviewed-on: https://go-review.googlesource.com/2165
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-29 17:04:24 +00:00
Keith Randall
0bb8fc6614 runtime: remove go prefix from a few routines
They are no longer needed now that C is gone.

goatoi -> atoi
gofuncname/funcname -> funcname/cfuncname
goroundupsize -> already existing roundupsize

Change-Id: I278bc33d279e1fdc5e8a2a04e961c4c1573b28c7
Reviewed-on: https://go-review.googlesource.com/2154
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-29 15:18:29 +00:00
Shenghou Ma
ab0535ae3f liblink, cmd/ld, runtime: remove stackguard1
Now that we've removed all the C code in runtime and the C compilers,
there is no need to have a separate stackguard field to check for C
code on Go stack.

Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard.
Adjust liblink and cmd/ld as necessary.

Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33
Reviewed-on: https://go-review.googlesource.com/2144
Reviewed-by: Keith Randall <khr@golang.org>
2014-12-29 07:36:07 +00:00
Brad Fitzpatrick
26d5573949 net/smtp: add TLSConnectionState accessor
Fixes #9451

Change-Id: I0540e398b30c10779ac9d5a67a01d44bb6054a92
Reviewed-on: https://go-review.googlesource.com/2151
Reviewed-by: David Symonds <dsymonds@golang.org>
2014-12-28 21:35:58 +00:00
Emil Hessman
d4e48eeca1 encoding/gob: address go vet report
Use Fatalf for formatting directive rather than plain Fatal.

Change-Id: Iebd30cd6326890e9501746113a6d97480949e3d2
Reviewed-on: https://go-review.googlesource.com/2161
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-28 19:30:31 +00:00
Keith Randall
b1f29b2d44 runtime: get rid of goalg, no longer needed
The goalg function was a holdover from when we had algorithm
tables in both C and Go.  It is no longer needed.

Change-Id: Ia0c1af35bef3497a899f22084a1a7b42daae72a0
Reviewed-on: https://go-review.googlesource.com/2099
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-28 18:42:39 +00:00
Emil Hessman
2c987e1693 encoding/json: address go vet reports
The error message for decoding a unquoted value into a struct field with
the ,string option specified has two arguments when one is needed.
Make the error message take one argument and add a test in order to cover
the case when a unquoted value is specified.

Also add error value as the missing argument for Fatalf call in test.

Fixes the following go vet reports:

decode.go:602: wrong number of args for format in Errorf call: 1 needed but 2 args
decode_test.go:1088: missing argument for Fatalf("%v"): format reads arg 1, have only 0 args

Change-Id: Id036e10c54c4a7c1ee9952f6910858ecc2b84134
Reviewed-on: https://go-review.googlesource.com/2109
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2014-12-28 10:43:37 +00:00
Emil Hessman
b6e913806e cmd/pack: address go vet reports
Use log.Fatalf for formatting directives instead of log.Fatal

Change-Id: Ia207b320f5795c63cdfa71f92c19ca6d05cc833f
Reviewed-on: https://go-review.googlesource.com/2160
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-28 07:08:02 +00:00
Keith Randall
b2a950bb73 runtime: rename gothrow to throw
Rename "gothrow" to "throw" now that the C version of "throw"
is no longer needed.

This change is purely mechanical except in panic.go where the
old version of "throw" has been deleted.

sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go

Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3
Reviewed-on: https://go-review.googlesource.com/2150
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2014-12-28 06:16:16 +00:00
Guobiao Mei
ddef2d27fe net/http: use t.Fatalf rather than t.Fatal in cookie_test.go
Change-Id: I60bbb7deb7462d1ca884677b4f86bd54b20b3f35
Reviewed-on: https://go-review.googlesource.com/2140
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-27 23:52:37 +00:00
Martin Möhrmann
0668b595b6 strconv/itoa: add test to generate the longest output string possible by formatBits
The new test case produces the longest string representation possible and thereby uses
all of the 65 bytes in the buffer array used by the formatBits function.

Change-Id: I11320c4de56ced5ff098b7e37f1be08e456573e2
Reviewed-on: https://go-review.googlesource.com/2108
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-27 22:35:08 +00:00
Shenghou Ma
354467ffbb crypto/cipher: update docs for the Stream interface
Specify what will happen if len(dst) != len(src).

Change-Id: I66afa3730f637753b825189687418f14ddec3629
Reviewed-on: https://go-review.googlesource.com/1754
Reviewed-by: Adam Langley <agl@golang.org>
2014-12-26 20:57:43 +00:00
mattn
e26e3fa25a reflect, runtime: gofmt
Change-Id: I5437b3a36181373d8ff33225d7520ab321459de9
Reviewed-on: https://go-review.googlesource.com/2084
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-26 04:43:33 +00:00
Shenghou Ma
1c0c611fc2 cmd/ld: put .bss from external objects into real .bss section
Fixes #9359.

Change-Id: Iba62935b5a14de23d914f433a09a40417d7e88ed
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1889
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-26 01:05:02 +00:00
Dmitry Vyukov
ce9a4afa6f runtime: simplify procresize
Currently we do very a complex rebalancing of runnable goroutines
between queues, which tries to preserve scheduling fairness.
Besides being complex and error-prone, it also destroys all locality
of scheduling.

This change uses simpler scheme: leave runnable goroutines where
they are, during starttheworld start all Ps with local work,
plus start one additional P in case we have excessive runnable
goroutines in local queues or in the global queue.

The schedler must be able to operate efficiently w/o the rebalancing,
because garbage collections do not have to happen frequently.

The immediate need is execution tracing support: handling of
garabage collection which does stoptheworld/starttheworld several
times becomes exceedingly complex if the current execution can
jump between Ps during starttheworld.

Change-Id: I4fdb7a6d80ca4bd08900d0c6a0a252a95b1a2c90
Reviewed-on: https://go-review.googlesource.com/1951
Reviewed-by: Rick Hudson <rlh@golang.org>
2014-12-25 10:52:55 +00:00
Michael Matloob
c7eb9663aa regexp: fix typo in comment: s/onpass/onepass/
Change-Id: Idff57050a34d09e7fa9b77e9b53d61bb5ea2a71c
Reviewed-on: https://go-review.googlesource.com/2095
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-24 07:30:28 +00:00
Keith Randall
31f8310c45 reflect: fix func layout test for nacl build
This test code is ugly.  There must be a better way.
But for now, fix the build.

Change-Id: I33064145ea37f11abf040ec97caa87669be1a9fa
Reviewed-on: https://go-review.googlesource.com/2114
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-24 02:42:47 +00:00
Marko Tiikkaja
9371babdd8 database/sql: Remove unnecessary call to maybeOpenNewConnections
numCanOpen will never be larger than 0 in maybeOpenNewConnections() when this
code path is taken, so no new connections can ever be opened.

Change-Id: Id1302e8d9afb3a67be61b5e738fe07ef81d20fe0
Reviewed-on: https://go-review.googlesource.com/1550
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-24 02:39:12 +00:00
Martin Möhrmann
76cc881ef0 sort: simplify rotate and reduce calls to it
Move the checks for empty rotate changes
from the beginning of rotate to the callers.

Remove additional variable p used instead of existing m with same value.

Remove special casing of equal ranges (i==j) to exit early as no
work is saved vs checking (i!=j) and  making a single
swapRange call if this is false.

benchmark                   old ns/op      new ns/op      delta
BenchmarkStableString1K     417195         425218         +1.92%
BenchmarkStableInt1K        126661         124498         -1.71%
BenchmarkStableInt64K       10365014       10417438       +0.51%
BenchmarkStable1e2          132151         130648         -1.14%
BenchmarkStable1e4          42027428       40812649       -2.89%
BenchmarkStable1e6          8524772364     8430192391     -1.11%

Change-Id: Ia7642e9d31408496970c700f5843d53cc3ebe817
Reviewed-on: https://go-review.googlesource.com/2100
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 23:21:04 +00:00
Carlos Castillo
131758183f go/build: add variable expansion to cgo lines
When go parses #cgo lines, expand ${SRCDIR} into the path to the
source directory. This allows options to be passed to the
compiler and linker that involve file paths relative to the
source code directory. Without the expansion the paths would be
invalid when the current working directory changes.

Fixes #7891
Fixes #5428

Change-Id: I343a145a9771a5ccbaa958e4a1ecd1716fcae52d
Reviewed-on: https://go-review.googlesource.com/1756
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 20:35:49 +00:00
Keith Randall
108dbd0dc7 reflect: more function layout tests
Test more stuff:
1) flagNoPointers, an incorrect value was the cause of #9425
2) Total function layout size
3) gc program

Change-Id: I73f65fe740215938fa930d2f096febd9db0a0021
Reviewed-on: https://go-review.googlesource.com/2090
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 19:57:56 +00:00
Alexandre Cesaro
0d4ea0c70d mime/multipart: moved some code to mime/internal/quotedprintable
The code concerning quoted-printable encoding (RFC 2045) and its
variant for MIME headers (RFC 2047) is currently spread in
mime/multipart and net/mail. It is also not exported.

This commit is the first step to fix that issue. It moves the
quoted-printable decoding code from mime/multipart to
mime/internal/quotedprintable. The exposed API is unchanged.

Concerns #4943.

Change-Id: I11352afbb2edb4d6ef62870b9bc5c87c639eff12
Reviewed-on: https://go-review.googlesource.com/1810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 19:30:02 +00:00
David du Colombier
10be797578 runtime: fix exit on Plan 9
Add a nil byte at the end of the itoa buffer,
before calling gostringnocopy. This prevents
gostringnocopy to read past the buffer size.

Change-Id: I87494a8dd6ea45263882536bf6c0f294eda6866d
Reviewed-on: https://go-review.googlesource.com/2033
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2014-12-23 18:54:39 +00:00
Guobiao Mei
59cb2d9ca6 math/rand: fix example_test to show with the correct method
Originally it used r.Int63() to show "Uint32", and now we use the correct r.Uint32() method.

Fixes #9429

Change-Id: I8a1228f1ca1af93b0e3104676fc99000257c456f
Reviewed-on: https://go-review.googlesource.com/2069
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 17:24:24 +00:00
David du Colombier
a51b6ccfea cmd/dist: fatal shouldn't print errstr on Plan 9
During change 1864 discussion, Russ Cox pointed out
the fatal function shouldn't print errstr.

Change-Id: Icd71ec04be9c944bc235b8b198158465172e4fde
Reviewed-on: https://go-review.googlesource.com/2030
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 10:28:17 +00:00
Alex Brainman
20dce04742 runtime: remove thunk_windows.s
Change-Id: I171298e7942093e9cc82e3a0c4fcbb5b10298816
Reviewed-on: https://go-review.googlesource.com/1998
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-23 05:12:52 +00:00
Shenghou Ma
1050c4197a runtime: add comments for blank import of "unsafe"
Change-Id: Iaad548ea90d3b70341a723450d5e4d4c2b88856f
Reviewed-on: https://go-review.googlesource.com/2063
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 05:09:07 +00:00
Brad Fitzpatrick
1e4b642f8d cmd/api: work around Windows rename issue on the builders
More cmd/api/run.go hell.

Fixes #9407

Change-Id: If8fb446a2471d6372beb0534c9ab6824029b404c
Reviewed-on: https://go-review.googlesource.com/2054
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-23 04:55:44 +00:00
Shenghou Ma
e98f2179b1 runtime: fix build for arm and ppc64/ppc64le
Change-Id: I17ddcb541dfac8b1e48e01ee005563031b6ade2a
Reviewed-on: https://go-review.googlesource.com/2062
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 04:48:14 +00:00
Andrew Gerrand
24ea0330fe build: give freebsd longer to run tests
The freebsd-386 and freebsd-amd64 builders are timing out sometimes.
This will give them some more breathing room.

Change-Id: Ib65bd172cca046a52861759a4232d7b4b6514fa8
Reviewed-on: https://go-review.googlesource.com/1994
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 04:19:41 +00:00
Alex Brainman
7f4c26850a runtime: import unsafe in os_windows.go (fixes windows build)
Change-Id: I55419cb580e6d18cf1c17c3e7bb8777ed6d794e7
Reviewed-on: https://go-review.googlesource.com/1995
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 04:14:53 +00:00
Keith Randall
d11f411181 reflect: add kindNoPointers if a function layout has no pointers.
malloc checks kindNoPointers and if it is not set and the object
is one pointer in size, it assumes it contains a pointer.  So we
must set kindNoPointers correctly; it isn't just a hint.

Fixes #9425

Change-Id: Ia43da23cc3298d6e3d6dbdf66d32e9678f0aedcf
Reviewed-on: https://go-review.googlesource.com/2055
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-23 03:18:29 +00:00
Russ Cox
7a524a1036 runtime: remove thunk.s
Replace with uses of //go:linkname in Go files, direct use of name in .s files.
The only one that really truly needs a jump is reflect.call; the jump is now
next to the runtime.reflectcall assembly implementations.

Change-Id: Ie7ff3020a8f60a8e4c8645fe236e7883a3f23f46
Reviewed-on: https://go-review.googlesource.com/1962
Reviewed-by: Austin Clements <austin@google.com>
2014-12-23 03:17:22 +00:00
Ian Lance Taylor
8a853aa5cb runtime: correct ptrSize test in Linux version of sysReserve
Change-Id: I90a8ca51269528a307e0d6f52436fc7913cd7900
Reviewed-on: https://go-review.googlesource.com/1541
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-23 02:18:29 +00:00
Austin Clements
675eb72c28 runtime: run libc SIGSETXID and SIGCANCEL handlers on signal stack
These signals are used by glibc to broadcast setuid/setgid to all
threads and to send pthread cancellations.  Unlike other signals, the
Go runtime does not intercept these because they must invoke the libc
handlers (see issues #3871 and #6997).  However, because 1) these
signals may be issued asynchronously by a thread running C code to
another thread running Go code and 2) glibc does not set SA_ONSTACK
for its handlers, glibc's signal handler may be run on a Go stack.
Signal frames range from 1.5K on amd64 to many kilobytes on ppc64, so
this may overflow the Go stack and corrupt heap (or other stack) data.

Fix this by ensuring that these signal handlers have the SA_ONSTACK
flag (but not otherwise taking over the handler).

This has been a problem since Go 1.1, but it's likely that people
haven't encountered it because it only affects setuid/setgid and
pthread_cancel.

Fixes #9600.

Change-Id: I6cf5f5c2d3aa48998d632f61f1ddc2778dcfd300
Reviewed-on: https://go-review.googlesource.com/1887
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-23 01:33:36 +00:00
George Shammas
3ffc9756d1 net/http/cgi: Correctly pass down the REMOTE_PORT value for CGI requests.
Currently when we get a CGI or FCGI request, the remote port of the client
is hard coded to zero, despite nearly every webserver passing down the
REMOTE_PORT variable.

This was likely originally excluded because the CGI RFC (rfc3875) does not
mention anything about the remote port of the client. However every webserver
tested does pass REMOTE_PORT down. This includes Apache 2.2, Apache 2.4,
nginx and lighttpd.

Fixes #8351

Change-Id: I4c6366cb39f0ccc05e038bd31d85f93b76e8d0c8
Reviewed-on: https://go-review.googlesource.com/1750
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-23 01:33:26 +00:00
Keith Randall
53c5226f9f runtime: make stack frames fixed size by modifying goproc/deferproc.
Calls to goproc/deferproc used to push & pop two extra arguments,
the argument size and the function to call.  Now, we allocate space
for those arguments in the outargs section so we don't have to
modify the SP.

Defers now use the stack pointer (instead of the argument pointer)
to identify which frame they are associated with.

A followon CL might simplify funcspdelta and some of the stack
walking code.

Fixes issue #8641

Change-Id: I835ec2f42f0392c5dec7cb0fe6bba6f2aed1dad8
Reviewed-on: https://go-review.googlesource.com/1601
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-23 01:08:29 +00:00
Austin Clements
005ba4db82 cmd/9l: improve R_CALLPOWER error messages
Change-Id: I8670540a2a9647efbd8b072a54272a04c530e54b
Reviewed-on: https://go-review.googlesource.com/2001
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-22 23:57:39 +00:00
Mikio Hara
13e16b39fc syscall: fix the deprecated way of parsing routing message on openbsd
OpenBSD 5.5 changed its kernel ABI and OpenBSD 5.6 enabled it.
This CL works on both 5.5 and 5.6.

Fixes #9102.

Change-Id: I4a295be9ab8acbc99e550d8cb7e8f8dacf3a03c5
Reviewed-on: https://go-review.googlesource.com/1932
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2014-12-22 23:42:33 +00:00
Keith Randall
c6669e7af5 runtime: fix nacl build, hashmap overflow field offset was incorrect.
Change-Id: Ieb305b2a4d4ef28d70a8b8ece703f495c5af0529
Reviewed-on: https://go-review.googlesource.com/2051
Reviewed-by: Keith Randall <khr@golang.org>
2014-12-22 23:25:24 +00:00
Austin Clements
7e424ecdc1 cmd/5l,6l,8l: remove bogus dynsym section indexes
Previously, this code generated bogus section indexes for dynamic
symbols.  It turns out this didn't matter, since we only emit these
when generating an executable and in an executable it only matters
whether a symbol is defined or undefined, but it leads to perplexing
code full of mysterious constants.

Unfortunately, this happens too early to put in real section indexes,
so just use section index 1 to distinguish the symbol from an
undefined symbol.

Change-Id: I0e514604bf31f21683598ebd3e020b66acf767ef
Reviewed-on: https://go-review.googlesource.com/1720
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 23:00:15 +00:00
Austin Clements
326ceeabc4 cmd/ld: add a text generation pass
This will be used by ppc64 to add call stubs to the .text section.
ARM needs a similar pass to generate veneers for arm->thumb
transitions.

Change-Id: Iaee74036e60643a56fab15b564718f359c5910eb
Reviewed-on: https://go-review.googlesource.com/2004
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:47:05 +00:00
Austin Clements
6c78443b3e liblink: code for debugging bad returns
Disabled by default, but invaluable when you need it.

Change-Id: If4a75d11d14f70b6840d339aaec4b940dc406493
Reviewed-on: https://go-review.googlesource.com/2012
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:43:48 +00:00
Joe Shaw
11779ef420 syscall: update go.sys doc reference to golang.org/x/sys
Change-Id: Ie5a36dbcd809fc165f4198d47641d5a95878460c
Reviewed-on: https://go-review.googlesource.com/2000
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:41:17 +00:00
Keith Randall
cda0ea1c0e runtime: a better fallback hash
For arm and powerpc, as well as x86 without aes instructions.
Contains a mixture of ideas from cityhash and xxhash.

Compared to our old fallback on ARM, it's ~no slower on
small objects and up to ~50% faster on large objects.  More
importantly, it is a much better hash function and thus has
less chance of bad behavior.

Fixes #8737

benchmark                         old ns/op     new ns/op     delta
BenchmarkHash5                    173           181           +4.62%
BenchmarkHash16                   252           212           -15.87%
BenchmarkHash64                   575           419           -27.13%
BenchmarkHash1024                 7173          3995          -44.31%
BenchmarkHash65536                516940        313173        -39.42%
BenchmarkHashStringSpeed          300           279           -7.00%
BenchmarkHashBytesSpeed           478           424           -11.30%
BenchmarkHashInt32Speed           217           207           -4.61%
BenchmarkHashInt64Speed           262           231           -11.83%
BenchmarkHashStringArraySpeed     609           631           +3.61%

Change-Id: I0a9335028f32b10ad484966e3019987973afd3eb
Reviewed-on: https://go-review.googlesource.com/1360
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:41:01 +00:00
Keith Randall
fbc56cf050 runtime: hashmap: move overflow pointer to end of bucket
Pointers to zero-sized values may end up pointing to the next
object in memory, and possibly off the end of a span.  This
can cause memory leaks and/or confuse the garbage collector.

By putting the overflow pointer at the end of the bucket, we
make sure that pointers to any zero-sized keys or values don't
accidentally point to the next object in memory.

fixes #9384

Change-Id: I5d434df176984cb0210b4d0195dd106d6eb28f73
Reviewed-on: https://go-review.googlesource.com/1869
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 22:25:48 +00:00
Josh Bleecher Snyder
aaa4bf3720 cmd/gc: update hashmap code location in comments
Change-Id: I3b81f2e9eb29ee6349d758b68fe7951b34f15a81
Reviewed-on: https://go-review.googlesource.com/1974
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-22 22:25:26 +00:00
Brad Fitzpatrick
b68c0aec20 go/build: fix test on Windows
Change-Id: Icba46194bcbfd86b512eef2599242c715ad4e7d3
Reviewed-on: https://go-review.googlesource.com/2041
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2014-12-22 22:04:48 +00:00
Brad Fitzpatrick
a824ffcc93 go/build: fix field mismatch in unkeyed struct literal
Fixes #9409

Change-Id: I2404cd8bf3ebb07f4b6a2b3e1d58ab69b9f1e8d8
Reviewed-on: https://go-review.googlesource.com/2040
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2014-12-22 21:53:50 +00:00
David Crawshaw
401b20234c syscall: check recorded version of ppid instead of 1
Handles the case where the parent is pid 1 (common in docker
containers).

Attempted and failed to write a test for this.

Fixes #9263.

Change-Id: I5c6036446c99e66259a4fab1660b6a594f875020
Reviewed-on: https://go-review.googlesource.com/1372
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 21:21:10 +00:00
Josh Bleecher Snyder
2a617d46f3 sort: reduce leaf calls in Stable
Move the symMerge recursion stopping condition
from the beginning of symMerge to the callers.

This halves the number of calls to symMerge
while running 'go test sort'.

benchmark                   old ns/op      new ns/op      delta
BenchmarkStable1e6          8358117060     7954143849     -4.83%
BenchmarkStable1e4          40116117       38583285       -3.82%
BenchmarkStableInt1K        119150         115182         -3.33%
BenchmarkStableInt64K       9799845        9515475        -2.90%
BenchmarkStableString1K     388901         393516         +1.19%
BenchmarkStable1e2          124917         123618         -1.04%

Change-Id: I7ba2ca277f213b076fe6830e1139edb47ac53800
Reviewed-on: https://go-review.googlesource.com/1820
Reviewed-by: Robert Griesemer <gri@golang.org>
2014-12-22 21:17:43 +00:00
Stan Schwertly
a48e789635 encoding/binary: check for unsigned integers in intDataSize.
intDataSize ignores unsigned integers, forcing reads/writes to miss the fast path.

Fixes #8956

Change-Id: Ie79b565b037db3c469aa1dc6d0a8a5a9252d5f0a
Reviewed-on: https://go-review.googlesource.com/1777
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 20:14:59 +00:00
Austin Clements
1e93125aa6 cmd/ld: clean up nested if when loading bind local syms
Change-Id: I15269722ca3d2654a9dd7a3f8a89ad375dc9bee0
Reviewed-on: https://go-review.googlesource.com/1759
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 20:02:16 +00:00
Brad Fitzpatrick
45eaf500fc cmd/api: fix race in run.go with multiple builders on a machine
Fixes #9407

Change-Id: I765e8009c7ee22473ac8c2d81c7f6c8ec9866c51
Reviewed-on: https://go-review.googlesource.com/1980
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2014-12-22 19:40:32 +00:00
Peter Armitage
47c7cf4357 syscall: fs_nacl: Unlock() should be deferred.
Change-Id: Iea08b8f4e74a8cd4b4d317273046457c8db956a1
Reviewed-on: https://go-review.googlesource.com/1640
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 19:36:22 +00:00
Austin Clements
ab9ec2e401 liblink: remove class from %#D formatter on 6l
This was a copy-paste error from 9l.  Besides incorrectly referring to
cnames9, 6l doesn't even use a->class, so simply remove this.

Fixes #9320

Change-Id: I0e3440c9dae1c3408eb795b3645f9f1dd8f50aed
Reviewed-on: https://go-review.googlesource.com/1516
Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-22 19:25:52 +00:00
Bryan Ford
2e0a1a7573 encoding/base64: add unpadded encodings, and test all encodings.
Some applications use unpadded base64 format, omitting the trailing
'=' padding characters from the standard base64 format, either to
minimize size or (more justifiably) to avoid use of the '=' character.
Unpadded flavors are standard and documented in section 3.2 of RFC 4648.

To support these unpadded flavors, this change adds two predefined
encoding variables, RawStdEncoding and RawURLEncoding, for unpadded
encodings using the standard and URL character set, respectively.
The change also adds a function WithPadding() to customize the padding
character or disable padding in a custom Encoding.

Finally, I noticed that the existing base64 test-suite was only
exercising the StdEncoding, and not referencing URLEncoding at all.
This change adds test-suite functionality to exercise all four encodings
(the two existing ones and the two new unpadded flavors),
although it still doesn't run *every* test on all four encodings.

Naming: I used the "Raw" prefix because it's more concise than "Unpadded"
and seemed just as expressive, but I have no strong preferences here.
Another short alternative prefix would be "Min" ("minimal" encoding).

Change-Id: Ic0423e02589b39a6b2bb7d0763bd073fd244f469
Reviewed-on: https://go-review.googlesource.com/1511
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-22 16:05:23 +00:00
Rob Pike
f3c85c507b fmt: fix bug in scanning of hex strings
Couldn't handle a hex string terminated by anything
other than spaces. Easy to fix.

Fixes #9124.

Change-Id: I18f89a0bd99a105c9110e1ede641873bf9daf3af
Reviewed-on: https://go-review.googlesource.com/1538
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-22 04:08:32 +00:00
Alex Brainman
79a4a779a7 syscall: clean up TestStdcallAndCDeclCallbacks to have no warnings
Fixes #9188

Change-Id: Ifbf5d9fa78a4f4ceb7f92d42494fe37fa7878c45
Reviewed-on: https://go-review.googlesource.com/1930
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-22 00:31:57 +00:00
Michalis Kargakis
bc611a31a5 flag: Check for Set error
Check for Set error when a boolean flag isn't explicitly given a value.

Fixes #9345

Change-Id: I97a1289f8cf27567d1a726ebe5ef167c800f357c
Reviewed-on: https://go-review.googlesource.com/1897
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2014-12-22 00:17:07 +00:00