1
0
mirror of https://github.com/golang/go synced 2024-11-14 09:00:21 -07:00
Commit Graph

31258 Commits

Author SHA1 Message Date
Ian Lance Taylor
fded5dbb2f runtime: don't crash if signal delivered on g0 stack
Also, if we changed the gsignal stack to match the stack we are
executing on, restore it when returning from the signal handler, for
safety.

Fixes #18255.

Change-Id: Ic289b36e4e38a56f8a6d4b5d74f68121c242e81a
Reviewed-on: https://go-review.googlesource.com/34239
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-12-12 19:19:59 +00:00
Brad Fitzpatrick
265e547658 doc: remove Reddit as an official space where Code of Conduct applies
Fixes #18289

Change-Id: I047e98cc36b861ef15292170aeaff8bc29243cab
Reviewed-on: https://go-review.googlesource.com/34281
Reviewed-by: Russ Cox <rsc@golang.org>
2016-12-12 18:09:42 +00:00
Shenghou Ma
0716fefad3 doc: mention Go requires OpenBSD 5.9 or above in go1.8.html
Change-Id: Ia19e4d2f319002b5b26e50258436f5c4bd281cc7
Reviewed-on: https://go-review.googlesource.com/34113
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-12 01:31:50 +00:00
Joel Sing
f91ddaabe6 runtime, syscall: update openbsd for changes to syskill
Change the openbsd runtime to use the current sys_kill and sys_thrkill
system calls.

Prior to OpenBSD 5.9 the sys_kill system call could be used with both
processes and threads. In OpenBSD 5.9 this functionality was split into
a sys_kill system call for processes (with a new syscall number) and a
sys_thrkill system call for threads. The original/legacy system call was
retained in OpenBSD 5.9 and OpenBSD 6.0, however has been removed and
will not exist in the upcoming OpenBSD 6.1 release.

Note: This change is needed to make Go work on OpenBSD 6.1 (to be
released in May 2017) and should be included in the Go 1.8 release.
This change also drops support for OpenBSD 5.8, which is already an
unsupported OpenBSD release.

Change-Id: I525ed9b57c66c0c6f438dfa32feb29c7eefc72b0
Reviewed-on: https://go-review.googlesource.com/34093
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-12 01:30:39 +00:00
Martin Möhrmann
cbcc1db41c fmt: undo clearflags in catchPanic after error message has been printed
Fixes #18282

Change-Id: I024ca4a03bbbcccd48a0a6245bc3ec22c6a90288
Reviewed-on: https://go-review.googlesource.com/34254
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: Rob Pike <r@golang.org>
2016-12-11 21:59:59 +00:00
David Crawshaw
ab5a2173f9 cmd/link: limit darwin dynlink symbol exports
The pclntable contains pointers to functions. If the function symbol
is exported in a plugin, and there is a matching symbol in the host
binary, then the pclntable of a plugin ends up pointing at the
function in the host module.

This doesn't work because the traceback code expects the pointer to
be in the same module space as the PC value.

So don't export functions that might overlap with the host binary.
This way the pointer stays in its module.

Updates #18190

Change-Id: Ifb77605b35fb0a1e7edeecfd22b1e335ed4bb392
Reviewed-on: https://go-review.googlesource.com/34196
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-10 17:03:45 +00:00
Robert Griesemer
2d429f01bd [dev.inline] cmd/compile/internal/syntax: add predicates to syntax.Pos
This moves syntax.Pos closer to cmd/internal/src.Pos so that
we can more easily replace src.Pos with syntax.Pos going forward.

Change-Id: I9f93a65fecb4c22591edca4b9d6cda39cf0e872e
Reviewed-on: https://go-review.googlesource.com/34270
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-10 01:21:20 +00:00
Martin Kreichgauer
4c71af71b4 crypto/x509: marshal certificate revocation times in UTC (Zulu time).
This is required by RFC 5280.

Fixes #16686

Change-Id: I291c68dd97410a4f7ae7c4e524b91a2493ac50a9
Reviewed-on: https://go-review.googlesource.com/34245
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-10 00:49:22 +00:00
Robert Griesemer
a0c5405c18 [dev.inline] cmd/compile/internal/syntax: add tests for //line directives
Change-Id: I77dc73bfe79e43bbadf85d7eb3c5f8990ec72023
Reviewed-on: https://go-review.googlesource.com/34248
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 23:34:30 +00:00
Robert Griesemer
f3b56de4d2 [dev.inline] cmd/compile/internal/syntax: report byte offset rather then rune count for column value
This will only become user-visible if error messages show column information.
Per the discussion in #10324.

For #10324.

Change-Id: I5959c1655aba74bb1a22fdc261cd728ffcfa6912
Reviewed-on: https://go-review.googlesource.com/34244
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 23:34:24 +00:00
Joe Tsai
8c190e5854 io: update documentation on LimitedReader
Specify that that LimitedReader returns EOF when the underlying
R returns EOF even if bytes remaining, N > 0.

Fixes #18271

Change-Id: I990a7135f1d31488d535238ae061d42ee96bacb7
Reviewed-on: https://go-review.googlesource.com/34249
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-09 23:19:06 +00:00
David Lazar
48d029fe43 [dev.inline] cmd/internal/obj: rename Prog.Lineno to Prog.Pos
Change-Id: I7585d85907869f5a286b36936dfd035f1e8e9906
Reviewed-on: https://go-review.googlesource.com/34197
Run-TryBot: David Lazar <lazard@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2016-12-09 20:35:56 +00:00
David Lazar
ad4efedc6c [dev.inline] cmd/internal/obj: use src.Pos in obj.Prog
This will let us use the src.Pos struct to thread inlining
information through to obj.

Change-Id: I96a16d3531167396988df66ae70f0b729049cc82
Reviewed-on: https://go-review.googlesource.com/34195
Run-TryBot: David Lazar <lazard@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2016-12-09 20:25:10 +00:00
Brad Fitzpatrick
454c234397 database/sql: use complete sentences in new docs
Change-Id: Icb842a80cab2b07b9ace1e8e14c4a19c48a92c43
Reviewed-on: https://go-review.googlesource.com/34247
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
2016-12-09 20:19:06 +00:00
Joe Tsai
c586630d99 doc: update go1.8.html
Made many minor changes so that the document is consistent with itself.

Some more noticeable changes:
* CL/34141: Revert "testing: add T.Context method"
* CL/33630: net/http: document restrictions on ETag as expected by ServeContent

Change-Id: I39ae5e55c56e374895c115e6852998c940beae35
Reviewed-on: https://go-review.googlesource.com/34243
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-09 19:50:39 +00:00
Raul Silvera
c6228ef7e2 runtime/pprof: track locations for goroutine profiles
Must add locations to the profile when generating a profile.proto.
This fixes #18229

Change-Id: I49cd63a30759d3fe8960d7b7c8bd5a554907f8d1
Reviewed-on: https://go-review.googlesource.com/34028
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-09 19:14:26 +00:00
Brad Fitzpatrick
3a067cc812 api: remove testing Context accessors from go1.8.txt
Fixes the build.

Updates #18199

Change-Id: Ibf029ba9f9293d1f3d49c1c8773fc262159a5d5b
Reviewed-on: https://go-review.googlesource.com/34242
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-09 06:45:08 +00:00
Brad Fitzpatrick
3c0466136d go/build: clarify Context.HasSubdir docs
Fixes #17888

Change-Id: I7490b95a03b810a0f7ed1f07f37d7c7b3ac036be
Reviewed-on: https://go-review.googlesource.com/34240
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2016-12-09 05:09:13 +00:00
Austin Clements
2eb976eb2a doc/go1.8: mention trace tool changes
Fixes #18234.

Change-Id: I0f18992ea14e13f283873ac295f0b49d6b7dd8b2
Reviewed-on: https://go-review.googlesource.com/34191
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2016-12-09 04:04:56 +00:00
Joe Tsai
4bf7d1e722 Revert "testing: add T.Context method"
This reverts commit 26827bc2fe.

Fixes #18199

Change-Id: I42e292cb4e3d740a4fbb5d0380c6ee15ac742092
Reviewed-on: https://go-review.googlesource.com/34141
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-09 04:04:11 +00:00
Daniel Theophanes
e12ce1e400 database/sql: document that drivers may not return right after cancel
Fixes #18168

Change-Id: Idbfe3d4daedd93c7caf6f1770ecd988e9af39949
Reviewed-on: https://go-review.googlesource.com/34144
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-09 03:15:22 +00:00
Brad Fitzpatrick
9ad47c4f67 doc: add http.NoBody and Transport change to go1.8.html
Fixes #18257

Change-Id: Iafba5aa0a0641cfe36351bb0e4b57f20257fdc4e
Reviewed-on: https://go-review.googlesource.com/34210
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-09 03:13:35 +00:00
Robert Griesemer
4b8895e2dd [dev.inline] cmd/compile/internal/syntax: remove gcCompat uses in scanner
- make the scanner unconditionally gc compatible
- consistently use "invalid" instead "illegal" in errors

Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33896/.

Change-Id: I4c4253e7392f3311b0d838bbe503576c9469b203
Reviewed-on: https://go-review.googlesource.com/34237
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 01:35:23 +00:00
Robert Griesemer
3d5df64b3f [dev.inline] cmd/compile/internal/syntax: use syntax.Pos for all external positions
- use syntax.Pos in syntax.Error (rather than line, col)
- use syntax.Pos in syntax.PragmaHandler (rather than just line)
- update uses
- better documentation in various places

Also:
- make Pos methods use Pos receiver (rather than *Pos)

Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33891/.
With minor adjustments to noder.go to make merge compile.

Change-Id: I5507cea6c2be46a7677087c1aeb69382d31033eb
Reviewed-on: https://go-review.googlesource.com/34236
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 01:35:14 +00:00
Robert Griesemer
54ef0447fe [dev.inline] cmd/compile/internal/syntax: clean up error and pragma handling
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33873/.

- simplify error handling in source.go
  (move handling of first error into parser, where it belongs)

- clean up error handling in scanner.go

- move pragma and position base handling from scanner
  to parser where it belongs

- have separate error methods in parser to avoid confusion
  with handlers from scanner.go and source.go

- (source.go) and (scanner.go, source.go, tokens.go)
  may be stand-alone packages if so desired, which means
  these files are now less entangled and easier to maintain

Change-Id: I81510fc7ef943b78eaa49092c0eab2075a05878c
Reviewed-on: https://go-review.googlesource.com/34235
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-09 01:35:03 +00:00
Robert Griesemer
e97c8a592f [dev.inline] cmd/compile/internal/syntax: simplified position code
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33805/.

Change-Id: I859d9bd5f2256ca78f7b24b330290f7ae600854d
Reviewed-on: https://go-review.googlesource.com/34234
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-09 01:35:00 +00:00
Robert Griesemer
00efa446e1 cmd/compile/internal/obj: remove superfluous addvarint parameter and assignment
Change-Id: I395625dca9b719290c52d2c46f60b53e8fb3abc4
Reviewed-on: https://go-review.googlesource.com/34139
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-09 01:04:29 +00:00
Robert Griesemer
32bf2829a1 [dev.inline] cmd/compile/internal/syntax: process //line pragmas in scanner
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33764/.

Minor adjustment in noder.go to make merge compile again.

Change-Id: Ib5029b52b59944f207b0f2438c8a5aa576eb25b8
Reviewed-on: https://go-review.googlesource.com/34233
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-09 00:43:04 +00:00
Robert Griesemer
8d20b25779 [dev.inline] cmd/compile/internal/syntax: introduce general position info for nodes
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33758/.
Minor adjustments in noder.go to fix merge.

Change-Id: Ibe429e327c7f8554f8ac205c61ce3738013aed98
Reviewed-on: https://go-review.googlesource.com/34231
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 00:42:42 +00:00
Robert Griesemer
eaca0e0529 [dev.inline] cmd/internal/src: introduce NoPos and use it instead Pos{}
Using a variable instead of a composite literal makes
the code independent of implementation changes of Pos.

Per David Lazar's suggestion.

Change-Id: I336967ac12a027c51a728a58ac6207cb5119af4a
Reviewed-on: https://go-review.googlesource.com/34148
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-12-09 00:35:07 +00:00
Brad Fitzpatrick
4c4201f0e2 all: make spelling consistent
Fixes #17938

Change-Id: Iad12155f4976846bd4a9a53869f89e40e5b3deb3
Reviewed-on: https://go-review.googlesource.com/34147
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2016-12-08 23:22:37 +00:00
Robert Griesemer
c10499b539 [dev.inline] cmd/compile/internal/ssa: another round of renames from line -> pos (cleanup)
Mostly mechanical renames. Make variable names consistent with use.

Change-Id: Iaa89d31deab11eca6e784595b58e779ad525c8a3
Reviewed-on: https://go-review.googlesource.com/34146
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2016-12-08 23:10:30 +00:00
Brad Fitzpatrick
51a75a01f8 doc: remove pprof TODOs from go1.8.html
There is nothing notable to mention as far as users are concerned.

Fixes #17929 (another bug tracks the remaining TODO item)

Change-Id: Id39f787581ed9d2ecd493126bb7ca27836816d4b
Reviewed-on: https://go-review.googlesource.com/34145
Reviewed-by: Michael Matloob <matloob@golang.org>
2016-12-08 22:03:08 +00:00
Robert Griesemer
cfd17f51c8 [dev.inline] cmd/compile/internal/ssa: rename various fields from Line to Pos
This is a mostly mechanical rename followed by manual fixes where necessary.

Change-Id: Ie5c670b133db978f15dc03e50dc2da0c80fc8842
Reviewed-on: https://go-review.googlesource.com/34137
Reviewed-by: David Lazar <lazard@golang.org>
2016-12-08 21:36:52 +00:00
Robert Griesemer
eab3707d6d [dev.inline] cmd/compile: rename various fields from Lineno to Pos
Various minor adjustments.

Change-Id: Iedfb97989f7bedaa3e9e8993b167e05f162434a7
Reviewed-on: https://go-review.googlesource.com/34136
Reviewed-by: David Lazar <lazard@golang.org>
2016-12-08 21:35:18 +00:00
Robert Griesemer
82d0caea2c [dev.inline] cmd/internal/src: make Pos implementation abstract
Adjust cmd/compile accordingly.

This will make it easier to replace the underlying implementation.

Change-Id: I33645850bb18c839b24785b6222a9e028617addb
Reviewed-on: https://go-review.googlesource.com/34133
Reviewed-by: David Lazar <lazard@golang.org>
2016-12-08 21:31:28 +00:00
Robert Griesemer
24597c080b [dev.inline] cmd/compile: introduce cmd/internal/src.Pos type for line numbers
This is a step toward chosing a different position representation.
By introducing an explicit type, it will be easier to make the
transition step-wise while ensuring everything keeps running.

This has been reviewed via https://go-review.googlesource.com/#/c/34025/.

Change-Id: Ibceddcd62d8f346321ac3250e3940e9c436ed684
Reviewed-on: https://go-review.googlesource.com/34132
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Lazar <lazard@golang.org>
2016-12-08 21:26:25 +00:00
Brad Fitzpatrick
9296d4efe7 net/http: don't retry Transport requests if they have a body
This rolls back https://golang.org/cl/27117 partly, softening it so it
only retries POST/PUT/DELETE etc requests where there's no Body (nil
or NoBody). This is a little useless, since most idempotent requests
have a body (except maybe DELETE), but it's late in the Go 1.8 release
cycle and I want to do the proper fix.

The proper fix will look like what we did for http2 and only retrying
the request if Request.GetBody is defined, and then creating a new request
for the next attempt. See https://golang.org/cl/33971 for the http2 fix.

Updates #15723
Fixes #18239
Updates #18241

Change-Id: I6ebaa1fd9b19b5ccb23c8d9e7b3b236e71cf57f3
Reviewed-on: https://go-review.googlesource.com/34134
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
2016-12-08 21:08:00 +00:00
Michael Hudson-Doyle
67b2927990 cmd/link: do not mark go.plugin.tabs as reachable in non-plugins
Fixes #18250

Change-Id: I4f61591356ddb4a906c206ad8456d1839daf7b91
Reviewed-on: https://go-review.googlesource.com/34170
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-12-08 20:01:23 +00:00
Joe Tsai
291254414b io: fix MultiReader panic on nil reader.
The combination of two prior CLs can cause panics:
* CL/17873: make chained multiReader Read more efficient
* CL/28533: make MultiReader nil exhausted Readers for earlier GC

The first CL allows MultiReader to "inherit" another MultiReader's list of Readers
for efficiency reasons. This is problematic when combined with the
later CL since that can set prior Readers in that list to nil for GC reasons.
This causes panics when two MultiReaders are used together (even synchronously).

To fix this, rather than setting consumed Readers as nil, we set them with
a special eofReader that always returns EOF.

Fixes #18232

Change-Id: I2a9357ab217e3d54d38ea9022d18e4d14f4182d3
Reviewed-on: https://go-review.googlesource.com/34140
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-08 17:29:33 +00:00
Ian Lance Taylor
d4b46aa1b8 os: document that Rename does not replace an existing directory
Fixes #18240.

Change-Id: Ife951e2c1320b3f1362c85642615b24fd4291189
Reviewed-on: https://go-review.googlesource.com/34135
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-08 01:36:44 +00:00
Brad Fitzpatrick
f28eea89e0 doc: misc go1.8.html fixes
Change-Id: I929f66b713525f5273cf0fe09579835603279b58
Reviewed-on: https://go-review.googlesource.com/34023
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-07 22:04:49 +00:00
Ian Lance Taylor
51a6d3e074 test: add bug501.go, a gccgo compiler crash
Change-Id: I271707dee03fd97cd37bfb116eb00a5532034b57
Reviewed-on: https://go-review.googlesource.com/34020
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-07 21:55:00 +00:00
Austin Clements
01c6a19e04 runtime: add number of forced GCs to MemStats
This adds a counter for the number of times the application forced a
GC by, e.g., calling runtime.GC(). This is useful for detecting
applications that are overusing/abusing runtime.GC() or
debug.FreeOSMemory().

Fixes #18217.

Change-Id: I990ab7a313c1b3b7a50a3d44535c460d7c54f47d
Reviewed-on: https://go-review.googlesource.com/34067
Reviewed-by: Russ Cox <rsc@golang.org>
2016-12-07 20:59:16 +00:00
David Crawshaw
d4177877c6 cmd/internal/obj: regenerate relocation strings
Change-Id: Ib9ba8f0b8785f1b0ddb29214beb8674dc06f7422
Reviewed-on: https://go-review.googlesource.com/34111
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-07 20:28:36 +00:00
Lynn Boger
6623988eb7 cmd/link: fix sym sect when splitting text on ppc64le
While processing a symbol for a function, if it is determined
that a function would make the text section too large then
a new text section is created and the address of the function
is in the new text section.  But the symbol for the function
is marked as being in the previous text section, causing
incorrect codegen for the function and leading to a segv if
that function is called.  This adds code to set the sym.Sect
field to the new section if a new one is created.  Note that
this problem only happens at the point where a new section is
created.

Fixes #18218

Change-Id: Ic21ae11368d9d88ff6d5d3977f9ea72fe6477ed1
Reviewed-on: https://go-review.googlesource.com/34069
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-07 18:19:02 +00:00
Brad Fitzpatrick
be8a6fd2e3 crypto/x509: reduce test's sought number of system certs
150 is too high for some people.

Reports of 132, 145, 149 on OS X.

Fixes #18203

Change-Id: I559639aba7e87e07d1a1249f8b212b3f34a078ab
Reviewed-on: https://go-review.googlesource.com/34019
Reviewed-by: Russ Cox <rsc@golang.org>
2016-12-07 17:09:37 +00:00
Keith Randall
1ea60c136a runtime: on stack copy, adjust BP
When we copy the stack, we need to adjust all BPs.
We correctly adjust the ones on the stack, but we also
need to adjust the one that is in g.sched.bp.

Like CL 33754, no test as only kernel-gathered profiles will notice.
Tests will come (in 1.9) with the implementation of #16638.

The invariant should hold that every frame pointer points to
somewhere within its stack.  After this CL, it is mostly true, but
something about cgo breaks it.  The runtime checks are disabled
until I figure that out.

Update #16638
Fixes #18174

Change-Id: I6023ee64adc80574ee3e76491d4f0fa5ede3dbdb
Reviewed-on: https://go-review.googlesource.com/33895
Reviewed-by: Austin Clements <austin@google.com>
2016-12-07 16:59:25 +00:00
Odin Ugedal
8e0c4639f1 fmt: remove unnecessary else statement
Change-Id: If30ccfcf56d56fb40102ad567a980793bd39f320
Reviewed-on: https://go-review.googlesource.com/34071
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-07 16:52:47 +00:00
Russ Cox
850e55b8c0 crypto/*: document use or non-use of constant-time algorithms
Fixes #16821.

Change-Id: I63d5f3d7cfba1c76259912d754025c5f3cbe4a56
Reviewed-on: https://go-review.googlesource.com/31573
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-07 16:34:50 +00:00