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

28624 Commits

Author SHA1 Message Date
Rob Pike
86b0310185 text/template: clarify the default formatting used for values
Fixes #16105.

Change-Id: I94467f2adf861eb38f3119ad30d46a87456d5305
Reviewed-on: https://go-review.googlesource.com/24281
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-21 02:15:44 +00:00
Ian Lance Taylor
252eda470a cmd/pprof: don't use offset if we don't have a start address
The test is in the runtime package because there are other tests of
pprof there. At some point we should probably move them all into a pprof
testsuite.

Fixes #16128.

Change-Id: Ieefa40c61cf3edde11fe0cf04da1debfd8b3d7c0
Reviewed-on: https://go-review.googlesource.com/24274
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-21 01:44:38 +00:00
Ian Lance Taylor
09834d1c08 runtime: panic with the right error on iface conversion
A straight conversion from a type T to an interface type I, where T does
not implement I, should always panic with an interface conversion error
that shows the missing method.  This was not happening if the conversion
was done once using the comma-ok form (the result would not be OK) and
then again in a straight conversion.  Due to an error in the runtime
package the second conversion was failing with a nil pointer
dereference.

Fixes #16130.

Change-Id: I8b9fca0f1bb635a6181b8b76de8c2385bb7ac2d2
Reviewed-on: https://go-review.googlesource.com/24284
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michel Lespinasse <walken@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2016-06-21 01:43:42 +00:00
Ian Lance Taylor
659b9a19aa runtime: set PPROF_TMPDIR before running pprof
Fixes #16121.

Change-Id: I7b838fb6fb9f098e6c348d67379fdc81fb0d69a4
Reviewed-on: https://go-review.googlesource.com/24270
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
2016-06-20 23:58:59 +00:00
Andrew Gerrand
109823ec93 cmd/go: for generate, use build context values for GOOS/GOARCH
Fixes #16120

Change-Id: Ia352558231e00baab5c698e93d7267564c07ec0c
Reviewed-on: https://go-review.googlesource.com/24242
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-20 23:55:43 +00:00
Ian Lance Taylor
e1a6e71e74 test: add missing copyright notice
Change-Id: I2a5353203ca2958fa37fc7a5ea3f22ad4fc62b0e
Reviewed-on: https://go-review.googlesource.com/24282
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2016-06-20 23:46:33 +00:00
Andrew Gerrand
349f0fb89a doc: update architectures on source install instructions
Fixes #16099

Change-Id: I334c1f04dfc98c4a07e33745819d890b5fcb1673
Reviewed-on: https://go-review.googlesource.com/24243
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2016-06-20 21:59:22 +00:00
Mikio Hara
20fd1bb8bd doc/go1.7.html: don't mention obsolete RFC
Change-Id: Ia978c10a97e4c24fd7cf1fa4a7c3bd886d20bbf8
Reviewed-on: https://go-review.googlesource.com/24241
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-20 01:44:37 +00:00
Emmanuel Odeke
153d31da16 doc/go1.7.html: net/http RFC 2616 conformation + timeoutHandler on empty body
- Mention RFC 2616 conformation in which the server now only sends one
"Transfer-Encoding" header when "chunked" is explicitly set.
- Mention that a timeout handler now sends a 200 status code on
encountering an empty response body instead of sending back 0.

Change-Id: Id45e2867390f7e679ab40d7a66db1f7b9d92ce17
Reviewed-on: https://go-review.googlesource.com/24250
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-20 00:54:17 +00:00
Alex Brainman
691c5c1568 debug/pe: handle files with no string table
pecoff.doc (https://goo.gl/ayvckk) in section 5.6 says:

Immediately following the COFF symbol table is the COFF string table.
The position of this table is found by taking the symbol table address
in the COFF header, and adding the number of symbols multiplied by
the size of a symbol.

So it is unclear what to do when symbol table address is 0.
Lets assume executable does not have any string table.

Added new test with executable with no symbol table. The

gcc -s testdata\hello.c -o testdata\gcc-386-mingw-no-symbols-exec.

command was used to generate the executable.

Fixes #16084

Change-Id: Ie74137ac64b15daadd28e1f0315f3b62d1bf2059
Reviewed-on: https://go-review.googlesource.com/24200
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-19 05:18:09 +00:00
Michael Munday
f3d54789f7 cmd/compile: use power5 instructions for uint64 to float casts
Use the same technique as mips64 for these casts (CL 22835).

We could use the FCFIDU instruction for ppc64le however it seems
better to keep it the same as ppc64 for now.

Updates #15539, updates #16004.

Change-Id: I550680e485327568bf3238c4615a6cc8de6438d7
Reviewed-on: https://go-review.googlesource.com/24191
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-17 19:15:29 +00:00
Austin Clements
9e8fa1e99c runtime: eliminate poisonStack checks
We haven't used poisonStack since we switched to 1-bit stack maps
(4d0f3a1), but the checks are still there. However, nothing prevents
us from genuinely allocating an object at this address on 32-bit and
causing the runtime to crash claiming that it's found a bad pointer.

Since we're not using poisonStack anyway, just pull it out.

Fixes #15831.

Change-Id: Ia6ef604675b8433f75045e369f5acd4644a5bb38
Reviewed-on: https://go-review.googlesource.com/24211
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2016-06-17 15:18:39 +00:00
Austin Clements
fca9fc52c8 runtime: fix stale comment in lfstack
Change-Id: I6ef08f6078190dc9df0b2df4f26a76456602f5e8
Reviewed-on: https://go-review.googlesource.com/24176
Reviewed-by: Rick Hudson <rlh@golang.org>
2016-06-16 19:45:33 +00:00
Austin Clements
79f2f008a3 cmd/dist: make zosarch.go deterministic
Currently zosarch.go is written out in non-deterministic map order.
Sort the keys and write it out in sorted order to make the generated
file contents deterministic.

Change-Id: Id490f0e8665a2c619c5a7a00a30f4fc64f333258
Reviewed-on: https://go-review.googlesource.com/24174
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-16 19:32:33 +00:00
Hana Kim
c3818e56d0 internal/trace: err if binary is not supplied for old trace
Change-Id: Id25c90993c4cbb7449d7031301b6d214a67d7633
Reviewed-on: https://go-review.googlesource.com/24134
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-16 16:22:03 +00:00
Ian Lance Taylor
ea2ac3fe5f runtime: remove useless loop from CgoCCodeSIGPROF test program
I verified that the test fails if I undo the change that it tests for.

Updates #14732.

Change-Id: Ib30352580236adefae946450ddd6cd65a62b7cdf
Reviewed-on: https://go-review.googlesource.com/24151
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-16 03:52:18 +00:00
Matthew Dempsky
d78d0de4d1 go/ast: fix comments misinterpreted as documentation
The comments describing blocks of Pos/End implementations for various
nodes types are being misinterpreted as documentation for BadDecl,
BadExpr, BadStmt, and ImportSpec's Pos methods.

Change-Id: I935b0bc38dbc13e9305f3efeb437dd3a6575d9a1
Reviewed-on: https://go-review.googlesource.com/24152
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-06-15 20:40:38 +00:00
Ian Lance Taylor
26d6dc6bf8 runtime: if the test program hangs, try to get a stack trace
This is an attempt to get more information for #14809, which seems to
occur rarely.

Updates #14809.

Change-Id: Idbeb136ceb57993644e03266622eb699d2685d02
Reviewed-on: https://go-review.googlesource.com/24110
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
2016-06-15 15:03:48 +00:00
Cherry Zhang
48cc3c4b58 syscall: skip TestUnshare if kernel does not support net namespace
Fixes #16056.

Change-Id: Ic3343914742713851b8ae969b101521f25e85e7b
Reviewed-on: https://go-review.googlesource.com/24132
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-15 11:41:49 +00:00
Andrew Gerrand
0ec62565f9 net/http: pass through server side Transfer-Encoding headers
Fixes #16063

Change-Id: I2e8695beb657b0aef067e83f086828d8857787ed
Reviewed-on: https://go-review.googlesource.com/24130
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-15 03:10:47 +00:00
Sameer Ajmani
c4692da923 context: document how to release resources associated with Contexts.
Some users don't realize that creating a Context with a CancelFunc
attaches a subtree to the parent, and that that subtree is not released
until the CancelFunc is called or the parent is canceled.  Make this
clear early in the package docs, so that people learning about this
package have the right conceptual model.

Change-Id: I7c77a546c19c3751dd1f3a5bc827ad106dd1afbf
Reviewed-on: https://go-review.googlesource.com/24090
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-15 00:30:46 +00:00
Ian Lance Taylor
68697a3e82 net: don't run TestLookupDotsWithLocalSource in short mode
Do run it on the builders, though.

Fixes #15881.

Change-Id: Ie42204d553cb18547ffd6441afc261717bbd9205
Reviewed-on: https://go-review.googlesource.com/24111
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-14 22:50:09 +00:00
Mikio Hara
9208ed3224 os: fix blockUntilWaitable on freebsd/{386,arm}
The previous fix was wrong because it had two misunderstandings on
freebsd32 calling convention like the following:
- 32-bit id1 implies that it is the upper half of 64-bit id, indeed it
  depends on machine endianness.
- 32-bit ARM calling convension doesn't conform to freebsd32_args,
  indeed it does.

This change fixes the bugs and makes blockUntilWaitable work correctly
on freebsd/{386,arm}.

Fixes #16064.

Change-Id: I820c6d01d59a43ac4f2ab381f757c03b14bca75e
Reviewed-on: https://go-review.googlesource.com/24064
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-14 22:39:56 +00:00
David Crawshaw
af0fc83985 cmd/compile, etc: handle many struct fields
This adds 8 bytes of binary size to every type that has methods. It is
the smallest change I could come up with for 1.7.

Fixes #16037

Change-Id: Ibe15c3165854a21768596967757864b880dbfeed
Reviewed-on: https://go-review.googlesource.com/24070
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-14 15:32:34 +00:00
Ian Lance Taylor
53242e49b1 crypto/x509: don't ignore asn1.Marshal error
I don't see how the call could fail, so, no test. Just a code cleanup in
case it can fail in the future.

Fixes #15987.

Change-Id: If4af0d5e7d19cc8b13fb6a4f7661c37fb0015e83
Reviewed-on: https://go-review.googlesource.com/23860
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2016-06-14 05:17:57 +00:00
Ian Lance Taylor
0deb49f9c0 cmd/go: include .syso files even if CGO_ENABLED=0
A .syso file may include information that should go into the object file
that is not object code, and should be included even if not using cgo.
The example in the issue is a Windows manifest file.

Fixes #16050.

Change-Id: I1f4f3f80bb007e84d153ca2d26e5919213ea4f8d
Reviewed-on: https://go-review.googlesource.com/24032
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2016-06-14 03:44:27 +00:00
Ian Lance Taylor
9273e25ecc cmd/go: remove obsolete comment referring to deleted parameter
The dir parameter was removed in https://golang.org/cl/5732045.

Fixes #15503.

Change-Id: I02a6d8317233bea08633715a095ea2514822032b
Reviewed-on: https://go-review.googlesource.com/24011
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-14 03:33:45 +00:00
Mikio Hara
cab87a60de os: fix build on freebsd/arm
Change-Id: I21fad94ff94e342ada18e0e41ca90296d030115f
Reviewed-on: https://go-review.googlesource.com/24061
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-14 01:42:36 +00:00
Mikio Hara
5d876e3e2e os: use wait6 to avoid wait/kill race on freebsd
This change is a followup to https://go-review.googlesource.com/23967
for FreeBSD.

Updates #13987.
Updates #16028.

Change-Id: I0f0737372fce6df89d090fe9847305749b79eb4c
Reviewed-on: https://go-review.googlesource.com/24021
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-13 22:13:56 +00:00
Mikio Hara
ccd9a55609 os: use waitid to avoid wait/kill race on darwin
This change is a followup to https://go-review.googlesource.com/23967
for Darwin.

Updates #13987.
Updates #16028.

Change-Id: Ib1fb9f957fafd0f91da6fceea56620e29ad82b00
Reviewed-on: https://go-review.googlesource.com/24020
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-13 22:13:12 +00:00
Ian Lance Taylor
84d8aff94c runtime: collect stack trace if SIGPROF arrives on non-Go thread
Fixes #15994.

Change-Id: I5aca91ab53985ac7dcb07ce094ec15eb8ec341f8
Reviewed-on: https://go-review.googlesource.com/23891
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-13 21:43:19 +00:00
Keith Randall
5701174c52 cmd/link: put padding between functions, not at the end of a function
Functions should be declared to end after the last real instruction, not
after the last padding byte. We achieve this by adding the padding while
assembling the text section in the linker instead of adding the padding
to the function symbol in the compiler. This change makes dtrace happy.

TODO: check that this works with external linking

Fixes #15969

Change-Id: I973e478d0cd34b61be1ddc55410552cbd645ad62
Reviewed-on: https://go-review.googlesource.com/24040
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-13 14:05:52 +00:00
David Chase
595426c0d9 cmd/compile: fix OASWB rewriting in racewalk
Special case for rewriting OAS inits omitted OASWB, added
that and OAS2FUNC.  The special case cannot be default case,
that causes racewalk to fail in horrible ways.

Fixes #16008.

Change-Id: Ie0d2f5735fe9d8255a109597b36d196d4f86703a
Reviewed-on: https://go-review.googlesource.com/23954
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-12 23:58:25 +00:00
Dmitri Shuralyov
2ba3d5fc96 cmd/go: remove invalid space in import comment docs
Generate package comment in alldocs.go using line comments rather than
general comments. This scales better, general comments cannot contain the
"*/" character sequence. Line comments do not have any restrictions on
the comment text that can be contained.

Remove the dependency on sed, which is not cross-platform, not go-gettable
external command.

Remove trailing whitespace from usage string in test.go. It's unnecessary.

Fixes #16030.

Change-Id: I3c0bc9955e7c7603c3d1fb4878218b0719d02e04
Reviewed-on: https://go-review.googlesource.com/23968
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-12 04:13:07 +00:00
Keith Randall
c83e6f50d9 runtime: aeshash, xor seed in earlier
Instead of doing:

x = input
one round of aes on x
x ^= seed
two rounds of aes on x

Do:

x = input
x ^= seed
three rounds of aes on x

This change provides some additional seed-dependent scrambling
which should help prevent collisions.

Change-Id: I02c774d09c2eb6917cf861513816a1024a9b65d7
Reviewed-on: https://go-review.googlesource.com/23577
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-11 00:35:47 +00:00
Ian Lance Taylor
cea29c4a35 os: on GNU/Linux use waitid to avoid wait/kill race
On systems that support the POSIX.1-2008 waitid function, we can use it
to block until a wait will succeed. This avoids a possible race
condition: if a program calls p.Kill/p.Signal and p.Wait from two
different goroutines, then it is possible for the wait to complete just
before the signal is sent. In that case, it is possible that the system
will start a new process using the same PID between the wait and the
signal, causing the signal to be sent to the wrong process. The
Process.isdone field attempts to avoid that race, but there is a small
gap of time between when wait returns and isdone is set when the race
can occur.

This CL avoids that race by using waitid to wait until the process has
exited without actually collecting the PID. Then it sets isdone, then
waits for any active signals to complete, and only then collects the PID.

No test because any plausible test would require starting enough
processes to recycle all the process IDs.

Update #13987.
Update #16028.

Change-Id: Id2939431991d3b355dfb22f08793585fc0568ce8
Reviewed-on: https://go-review.googlesource.com/23967
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-10 18:10:14 +00:00
Robert Griesemer
e980a3d885 go/parser: document that parse functions need valid token.FileSet
+ panic with explicit error if no file set it provided

(Not providing a file set is invalid use of the API; panic
is the appropriate action rather than returning an error.)

Fixes #16018.

Change-Id: I207f5b2a2e318d65826bdd9522fce46d614c24ee
Reviewed-on: https://go-review.googlesource.com/24010
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-10 17:43:35 +00:00
Ian Lance Taylor
fee02d270b cmd/go: clarify go get documentation
Make the documentation for `go get` match the documentation for `go
install`, since `go get` essentially invokes `go install`.

Update #15825.

Change-Id: I374d80efd301814b6d98b86b7a4a68dd09704c92
Reviewed-on: https://go-review.googlesource.com/23925
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-10 04:12:50 +00:00
Michael Munday
5f3eb43288 syscall: add a padding field to EpollEvent on s390x
Fixes #16021.

Change-Id: I55df38bbccd2641abcb54704115002a9aa04325d
Reviewed-on: https://go-review.googlesource.com/23962
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-10 03:54:43 +00:00
Jess Frazelle
8042bfe347 encoding/csv: update doc about comments whitespace
This patch updates the doc about comments whitespace for the
encoding/csv package to reflect that leading whitespace before
the hash will treat the line as not a comment.

Fixes #13775.

Change-Id: Ia468c75b242a487b4b2b4cd3d342bfb8e07720ba
Reviewed-on: https://go-review.googlesource.com/23302
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-10 01:00:09 +00:00
Cherry Zhang
cbc26869b7 runtime: set $sp before $pc in gdb python script
When setting $pc, gdb does a backtrace using the current value of $sp,
and it may complain if $sp does not match that $pc (although the
assignment went through successfully).

This happens with ARM SSA backend: when setting $pc it prints
> Cannot access memory at address 0x0

As well as occasionally on MIPS64:
> warning: GDB can't find the start of the function at 0xc82003fe07.
> ...

Setting $sp before setting $pc makes it happy.

Change-Id: Idd96dbef3e9b698829da553c6d71d5b4c6d492db
Reviewed-on: https://go-review.googlesource.com/23940
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2016-06-09 20:02:59 +00:00
Keith Randall
e3f1c66f31 cmd/compile: for tail calls in stubs, ensure args are alive
The generated code for interface stubs sometimes just messes
with a few of the args and then tail-calls to the target routine.
The args that aren't explicitly modified appear to not be used.
But they are used, by the thing we're tail calling.

Fixes #16016

Change-Id: Ib9b3a8311bb714a201daee002885fcb59e0463fa
Reviewed-on: https://go-review.googlesource.com/23960
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2016-06-09 19:32:51 +00:00
Ian Lance Taylor
1bdf1c3024 cmd/cgo: fix use of unsafe argument in new deferred function
The combination of https://golang.org/cl/23650 and
https://golang.org/cl/23675 did not work--they were tested separately
but not together.

The problem was that 23650 introduced deferred argument checking, and
the deferred function loses the type that 23675 started requiring. The
fix is to go back to using an empty interface type in a deferred
argument check.

No new test required--fixes broken build.

Change-Id: I5ea023c5aed71d70e57b11c4551242d3ef25986d
Reviewed-on: https://go-review.googlesource.com/23961
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2016-06-09 19:05:19 +00:00
Ian Lance Taylor
837984f372 cmd/cgo: use function arg type for _cgoCheckPointerN function
When cgo writes a _cgoCheckPointerN function to handle unsafe.Pointer,
use the function's argument type rather than interface{}. This permits
type errors to be detected at build time rather than run time.

Fixes #13830.

Change-Id: Ic7090905e16b977e2379670e0f83640dc192b565
Reviewed-on: https://go-review.googlesource.com/23675
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2016-06-09 16:02:03 +00:00
Ian Lance Taylor
894803c11e time: document that RFC822/1123 don't parse all RFC formats
Fixes #14505.

Change-Id: I46196b26c9339609e6e3ef9159de38c5b50c2a1b
Reviewed-on: https://go-review.googlesource.com/23922
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-09 15:32:48 +00:00
Kenny Grant
e2a30b8ffb time: genzabbrs.go skips Feb when checking months
getAbbrs looks like it is checking each month looking for a change
in the time zone abbreviation, but starts in Dec of the previous year
and skips the month of February because of the overflow rules for
AddDate. Changing the day to 1 starts at Jan 1 and tries all months
in the current year. This isn't very important or likely to change
output as zones usually span several months. Discovered when
looking into time.AddDate behavior when adding months.

Change-Id: I685254c8d21c402ba82cc4176e9a86b64ce8f7f7
Reviewed-on: https://go-review.googlesource.com/23322
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-09 15:31:08 +00:00
Jason Barnett
6662897b2a crypto/subtle: expand abbreviation to eliminate confusion
Change-Id: I68d66fccf9cc8f7137c92b94820ce7d6f478a185
Reviewed-on: https://go-review.googlesource.com/23310
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-09 15:30:48 +00:00
Ian Lance Taylor
a8c6c4837c os: document that the runtime can write to standard error
Fixes #15970.

Change-Id: I3f7d8316069a69d0e3859aaa96bc1414487fead0
Reviewed-on: https://go-review.googlesource.com/23921
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-09 13:47:13 +00:00
Ian Lance Taylor
763883632e cmd/go: only run TestGoGetHTTPS404 where it works
The test TestGoGetHTTPS404 downloads a package that does not build on
every OS, so change it to only run where the package builds. It's not
great for the test to depend on an external package, but this is an
improvement on the current situation.

Fixes #15644.

Change-Id: I1679cee5ab1e61a5b26f4ad39dc8a397fbc0da69
Reviewed-on: https://go-review.googlesource.com/23920
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-09 03:48:34 +00:00
Cherry Zhang
f3689d1382 cmd/compile: nilcheck interface value in go/defer interface call for SSA
This matches the behavior of the legacy backend.

Fixes #15975 (if this is the intended behavior)

Change-Id: Id277959069b8b8bf9958fa8f2cbc762c752a1a19
Reviewed-on: https://go-review.googlesource.com/23820
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-08 20:35:53 +00:00