1
0
mirror of https://github.com/golang/go synced 2024-11-17 17:34:46 -07:00
Commit Graph

42708 Commits

Author SHA1 Message Date
Josh Bleecher Snyder
5abab1da2c cmd/compile: use ellipses in dec64 rules
Passes toolstash-check -all.

Change-Id: I1b56c3b00e7fb7875165b337a93d5fce158b9df0
Reviewed-on: https://go-review.googlesource.com/c/go/+/217010
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-25 00:34:32 +00:00
Josh Bleecher Snyder
088aad5ff6 cmd/compile: use ellipses in wasm rules
Also, explicitly zero AuxInt in some ops (like Div),
to make it clear why they do not use an ellipsis.

Passes toolstash-check -all.

Change-Id: I2294d10e47d904d03e489e6ca43d46679323f75d
Reviewed-on: https://go-review.googlesource.com/c/go/+/217009
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-25 00:34:24 +00:00
Josh Bleecher Snyder
1bda9b001f cmd/compile: use ellipses in MIPS rules
Passes toolstash-check -all.

Change-Id: I14db0acb9b531029c613fa31bc076928651b6448
Reviewed-on: https://go-review.googlesource.com/c/go/+/217007
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 23:32:38 +00:00
Andrew Bonventre
917c7a6fc9 Revert "cmd/go/internal/modload: record the replacement for the module containing package main in BuildInfo"
This reverts CL 220645 (commit e092fc352a).

Reason for revert: Seems to have broken windows/amd64 longtest

Change-Id: Iffa8c882524250e5845514bc827fcd8927645a44
Reviewed-on: https://go-review.googlesource.com/c/go/+/220722
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-02-24 23:29:37 +00:00
Josh Bleecher Snyder
2bfa8c37c3 cmd/compile: use ellipses in ARM64 rules
Also, explicitly zero AuxInt in some ops (like Div),
to make it clear why they do not use an ellipsis.

Passes toolstash-check -all.

Change-Id: Iea0e807949f0899c43d2d21b9551a2cf00a829b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/217006
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 23:26:05 +00:00
Josh Bleecher Snyder
5749c0eb5b cmd/compile: use ellipses in ARM rules
Passes toolstash-check -all.

Change-Id: I390789ca5bfe45967ed156590f2690c91d416187
Reviewed-on: https://go-review.googlesource.com/c/go/+/217005
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 22:14:01 +00:00
Josh Bleecher Snyder
7c0f540b00 cmd/compile: use ellipses in 386 rules
Passes toolstash-check -all.

Change-Id: I8ca47b7b7987cb81edaded23331f25c40a8e80dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/217004
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 22:13:48 +00:00
Keith Randall
1cfe8e91b6 cmd/compile: use ADDQ instead of LEAQ when we can
The address calculations in the example end up doing x << 4 + y + 0.
Before this CL we use a SHLQ+LEAQ. Since the constant offset is 0,
we can use SHLQ+ADDQ instead.

Change-Id: Ia048c4fdbb3a42121c7e1ab707961062e8247fca
Reviewed-on: https://go-review.googlesource.com/c/go/+/209959
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 21:33:53 +00:00
Keith Randall
4f074b58d2 runtime/cgo: fix unsetenv wrapper
The wrapper takes a pointer to the argument, not the argument itself.

Fixes #36705

Change-Id: I566d4457d00bf5b84e4a8315a26516975f0d7e10
Reviewed-on: https://go-review.googlesource.com/c/go/+/215942
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 21:32:48 +00:00
Tobias Klauser
28c501b7b3 doc/go1.14: document that freebsd/arm64 requires FreeBSD 12.0 or later
Updates #24715
Updates #37345

Change-Id: I787a9b2ab1c68e1d379aac0a31bdf6217f04f911
Reviewed-on: https://go-review.googlesource.com/c/go/+/220426
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-02-24 20:58:33 +00:00
Bryan C. Mills
5c7dbf40e1 misc/cgo/testshared: explicitly set GOBIN (instead of unsetting it)
If GOBIN is set in the GOENV file, then merely unsetting it in the
process environment is not sufficient. We can instead either set GOBIN
explicitly, or disable GOENV explicitly. For now, we (semi-arbitrary)
choose the former.

Fixes #37390

Change-Id: Iec54532c804b70546d695105cd89e9169eac5dbb
Reviewed-on: https://go-review.googlesource.com/c/go/+/220652
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 20:47:43 +00:00
Keith Randall
bc98e35b53 cmd/compile: avoid memmove -> SSA move rewrite when size is negative
We should panic in this situation. Rewriting to a SSA op just leads
to a compiler panic.

Fixes #36259

Change-Id: I6e0bccbed7dd0fdac7ebae76b98a211947947386
Reviewed-on: https://go-review.googlesource.com/c/go/+/212405
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2020-02-24 20:23:14 +00:00
Bryan C. Mills
e092fc352a cmd/go/internal/modload: record the replacement for the module containing package main in BuildInfo
Fixes #37392

Change-Id: I2cb051e6f556b0af95e059611dda3f62e7c1f21a
Reviewed-on: https://go-review.googlesource.com/c/go/+/220645
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-02-24 20:11:21 +00:00
Alessandro Arzilli
363cd66d60 cmd/compile: assign correct declaration line to DIE of captured vars
Fixes the declaration line reported in the DW_AT_decl_line for
variables captured in a closure.

Fixes #36542

Change-Id: I228d32b57121fd62c4615c2ef71a6e8da616a1e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/214637
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
2020-02-24 20:00:38 +00:00
Keith Randall
afd691c579 runtime: special case interface hashing for pointers
Interfaces often contain pointers. Implement a fast path for this case.

name                   old time/op  new time/op  delta
MapInterfaceString-16  21.4ns ±19%  20.5ns ±10%     ~     (p=0.361 n=10+10)
MapInterfacePtr-16     25.8ns ± 8%  17.3ns ± 7%  -33.11%  (p=0.000 n=10+9)

Fixes #37086

Change-Id: Ice52820e6259a3edeafcbbbeb25b1e363bef00d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/219338
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-24 19:41:31 +00:00
Dmitri Shuralyov
1c0d664128 doc/go1.14: remove draft notice
Use consistent indentation for one of the paragraphs.

Include issue number in the visible text, so it is easier to read.

Fixes #36878

Change-Id: Iab857b26b1d27b0137e981126207089db108d530
Reviewed-on: https://go-review.googlesource.com/c/go/+/220646
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-02-24 19:15:22 +00:00
Bryan C. Mills
78a608d785 cmd/go/internal/modfetch: delete unused isVendoredPackage function
This function is apparently unused since CL 204917.

Updates #35290
Updates #37397

Change-Id: Id7f5f5d5176fdbd1c5c6227e81d0854ceafc3f12
Reviewed-on: https://go-review.googlesource.com/c/go/+/220640
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-02-24 19:06:40 +00:00
Robert Griesemer
d243408ae5 go/types: report correct argument types for make() built-in calls
Change Checker.index to return the type and constant index value
rather than just a boolean valid flag and the constant value.
While at it, rename some variables and simplify the control flow.

Adjust all uses of Checker.index to new signature. In code for
make() built-in, collect type information for signature reporting.

Fixes #37393.

Change-Id: Id70196faa9539ed5a0d6b59e0f3ea05e05f2f6a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/220585
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 16:55:58 +00:00
Ian Lance Taylor
3093959ee1 runtime: remove mcache field from m
Having an mcache field in both m and p is confusing, so remove it from m.
Always use mcache field from p. Use new variable mcache0 during bootstrap.

Change-Id: If2cba9f8bb131d911d512b61fd883a86cf62cc98
Reviewed-on: https://go-review.googlesource.com/c/go/+/205239
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2020-02-24 16:39:52 +00:00
Milan Patel
7802b55176 reflect: update Select to panic early on excessive input cases
The runtime implementation of select has an upper limit on the number of
select cases that are supported in order to maintain low stack memory
usage. Rather than support an arbitrary number of select cases, we've
opted to panic early with a useful message pointing the user directly
at the problem.

Fixes #37350

Change-Id: Id129ba281ae120387e681ef96be8adcf89725840
Reviewed-on: https://go-review.googlesource.com/c/go/+/220583
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 16:34:27 +00:00
Dmitri Shuralyov
821b799482 test: clean up run.go
• Inline check function because it's more readable.
• Delete toolPath because it was unused.
• Use strings.TrimPrefix because it's simpler.
• Remove out variable because its value was unused.
• Rename serr to err because it's more consistent.

Change-Id: I084fb4f8b399578834d5eea29a673c386cf3a357
Reviewed-on: https://go-review.googlesource.com/c/go/+/218701
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
2020-02-24 16:13:21 +00:00
Tobias Klauser
90c71cec5b runtime: remove unused _F_SETFL const on linux
This constant is only used on libc-based platforms (aix, darwin,
solaris).

Change-Id: Ic57d1fe3b1501c5b552eddb9aba11f1e02510082
Reviewed-on: https://go-review.googlesource.com/c/go/+/220421
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 15:55:01 +00:00
Katie Hockman
4e8badbbc2 crypto/cipher: require non-zero nonce size for AES-GCM
Also fix typo in crypto/cipher/gcm_test.go.

Fixes #37118

Change-Id: I8544d1eeeb1f0336cebb977b8c5bfa5e4c5ad8c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/218500
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-02-24 15:45:26 +00:00
Jordan Liggitt
84afaa9e94 encoding/json: limit max nesting depth
Limit the maximum nesting depth when parsing to protect against stack
overflow, permitted by https://tools.ietf.org/html/rfc7159#section-9

A nesting depth limit of 10,000 was chosen to be a conservative
balance between avoiding stack overflow and avoiding impacting
legitimate JSON documents.

10,000 is less than 1% of the experimental stack depth limit
with the default stack size:
* On 64-bit systems, the default stack limit is 1GB,
  which allows ~2,800,000 frames of recursive parsing
* On 32-bit systems, the default stack limit is 250MB,
  which allows ~1,100,000 frames of recursive parsing

Fixes #31789

Change-Id: I4f5a90e89dcb4ab1a957ad9d02e1fa0efafaccf6
Reviewed-on: https://go-review.googlesource.com/c/go/+/199837
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2020-02-24 14:35:19 +00:00
Tamir Duberstein
531b6d3126 cmd/link: code cleanup in macho_combine_dwarf.go
- remove global variables
- add missing error checks
- add missing (*os.File).Close calls
- null-check text section correctly
- reduce some variable scopes
- use bytes.Buffer instead of appended slice
- reduce integer casting

Change-Id: Ib9ad41adefed4d61047f53e27046389182eef786
Reviewed-on: https://go-review.googlesource.com/c/go/+/218501
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2020-02-24 13:25:13 +00:00
Daniel Martí
218f4572f5 text/template: make reflect.Value indirections more robust
Always shadow or modify the original parameter name. With code like:

	func index(item reflect.Value, ... {
		v := indirectInterface(item)

It was possible to incorrectly use 'item' and 'v' later in the function,
which could result in subtle bugs. This is precisely the kind of mistake
that led to #36199.

Instead, don't keep both the old and new reflect.Value variables in
scope. Always shadow or modify the original variable.

While at it, simplify the signature of 'length', to receive a
reflect.Value directly and save a few redundant lines.

Change-Id: I01416636a9d49f81246d28b91aca6413b1ba1aa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/212117
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Roberto Clapis <robclap8@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
2020-02-24 09:16:18 +00:00
Tobias Klauser
31acdcc701 syscall: use dup3 in forkAndExecInChild1 if available
The dup3 syscall is available since Linux 2.6.27. Fall back to dup2 (if
available) if dup3 returns ENOSYS.

This allows to omit the additional fcntl call to mark the dup'ed fd as
close-on-exec.

Change-Id: If318b593edd783f2aa988534c6062498e7119ddb
Reviewed-on: https://go-review.googlesource.com/c/go/+/220422
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 08:31:48 +00:00
Tobias Klauser
87c0db9916 misc/cgo: correct GOOS in skip message
Tests are skipped on linux/ppc64, not aix/ppc64.

Change-Id: I6b91b89f24d76b0f9be3eaf816f81ad4246e418f
Reviewed-on: https://go-review.googlesource.com/c/go/+/220423
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 08:30:59 +00:00
Robert Griesemer
151ccd4bdb go/types: report correct number of arguments for make() built-in calls
Also: Added test cases for (separate) issue #37393.
      To be enabled when that issue is fixed.

Fixes #37349.
Updates #37393.

Change-Id: Ib78cb0614c0b396241af06a3aa5d37d8045c2f2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/220584
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 02:36:05 +00:00
Alberto Donizetti
ec4c9db210 hash/maphash: add package-level example
Change-Id: I05c7ca644410822a527e94a7a8b883a0f8b0a4ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/220420
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-02-24 01:59:55 +00:00
Changkun Ou
402ea9e4f9 time: add Ticker.Reset
This CL implements Ticker.Reset method in time package.

Benchmark:
name                 time/op
TickerReset-12       6.41µs ±10%
TickerResetNaive-12  95.7µs ±12%

Fixes #33184

Change-Id: I4cbd31796efa012b2a297bb342158f11a4a31fef
Reviewed-on: https://go-review.googlesource.com/c/go/+/220424
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 01:50:28 +00:00
Masahiro Furudate
0f2a1574b0 testing: change benchmark example function
Change to rand.Int, a function that the compiler cannot reliably eliminate.
Fix output to actual benchmark values.

Fixes #37341

Change-Id: Ifb5bf49b826ae0bdb4bf9de5a472ad0eaa54569c
Reviewed-on: https://go-review.googlesource.com/c/go/+/220397
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-24 01:25:54 +00:00
Ian Lance Taylor
5bd145413a time: don't get confused about day 31 when parsing 002
The 002 parsing code had a bug that mishandled day 31.

Fixes #37387

Change-Id: Ia5a492a4ddd09a4bc232ce9582aead42d5099bdd
Reviewed-on: https://go-review.googlesource.com/c/go/+/220637
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-02-23 18:06:08 +00:00
Andrew Bonventre
b0863ce0e6 Revert "time: add Ticker.Reset"
This reverts CL 217362 (6e5652bebede2d53484a872f6d1dfeb498b0b50c.)

Reason for revert: Causing failures on arm64 bots. See #33184 for more info

Change-Id: I72ba40047e4138767d95aaa68842893c3508c52f
Reviewed-on: https://go-review.googlesource.com/c/go/+/220638
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-23 17:58:14 +00:00
Tobias Klauser
576cc530c9 misc/cgo: enable testso and testsovar on mips64x
External linking on mips64 was implemented in CL 19803 and CL 19809

Updates #12560
Updates #14126

Change-Id: I2cc127d71173aade56ad181bdd947355a76b3e46
Reviewed-on: https://go-review.googlesource.com/c/go/+/217017
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-02-23 17:08:17 +00:00
Changkun Ou
6e5652bebe time: add Ticker.Reset
This CL implements Ticker.Reset method in time package.

Benchmark:
name                 time/op
TickerReset-12       6.41µs ±10%
TickerResetNaive-12  95.7µs ±12%

Fixes #33184

Change-Id: I12c651f81e452541bcbbc748b45f038aae1f8dae
Reviewed-on: https://go-review.googlesource.com/c/go/+/217362
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-23 16:09:02 +00:00
Sam Chen
ebe49b2c29 doc: remove extra br tags
Change-Id: I6db784c67dde058ddaae8d73b295ee02583a1ed4
GitHub-Last-Rev: fea8e66c8a
GitHub-Pull-Request: golang/go#37375
Reviewed-on: https://go-review.googlesource.com/c/go/+/220577
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-23 01:23:41 +00:00
Cuong Manh Le
dad553d92f cmd/compile: consistently use OXXX for works relate to Op
Passes toolstash-check.

Change-Id: I8ff2a702c445e98c227913369c139a5ef4a04916
Reviewed-on: https://go-review.googlesource.com/c/go/+/211397
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-02-22 17:58:24 +00:00
Jon Johnson
e9956791bf encoding/json: fix broken link to json.org
This updates the link to a newer image.

Change-Id: Ibdfe8c57d9217a325bcfde98cb6f952ca63d588a
GitHub-Last-Rev: f5970ba395
GitHub-Pull-Request: golang/go#36938
Reviewed-on: https://go-review.googlesource.com/c/go/+/217297
Reviewed-by: Toshihiro Shiino <shiino.toshihiro@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2020-02-22 17:39:09 +00:00
Hajime Hoshi
35b80575b8 syscall: release a js.Func object in fsCall
(This is a reland of golang.org/cl/217417.)

A js.Func object in fsCall was created for each call but never
released. This CL fixes this.

Change-Id: Ifc0efb997c9b3e04641839691ccc04de61ef28d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/220537
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-02-22 16:12:46 +00:00
Josh Bleecher Snyder
1894842b75 cmd/compile: allow values with aux Sym to fault on nil args
And use this newfound power to more precisely describe some PPC64 ops.

Change-Id: Idb2b669d74fbab5f3508edf19f7e3347306b0daf
Reviewed-on: https://go-review.googlesource.com/c/go/+/217002
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2020-02-22 15:33:55 +00:00
vovapi
638df87fa4 hash/maphash: don't discard data on random seed init
Hash initializes seed on the first usage of seed or state with initSeed.
initSeed uses SetSeed which discards accumulated data.
This causes hash to return different sums for the same data in the first use
and after reset.
This CL fixes this issue by separating the seed set from data discard.

Fixes #37315

Change-Id: Ic7020702c2ce822eb700af462e37efab12f72054
GitHub-Last-Rev: 48b2f963e8
GitHub-Pull-Request: golang/go#37328
Reviewed-on: https://go-review.googlesource.com/c/go/+/220259
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2020-02-22 15:25:30 +00:00
Ian Lance Taylor
7ee3b63c8b runtime: mark testCallersEqual as a test helper
Change-Id: I25e6fb733618b0a7af8adc69be85f3503810acf4
Reviewed-on: https://go-review.googlesource.com/c/go/+/213658
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2020-02-22 04:32:05 +00:00
Ian Lance Taylor
059a5ac3eb test: add test that gccgo fails to compile
Change-Id: I14d31bb62fd0e26a84f8781644c40918404f5f3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/213899
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-02-22 04:31:41 +00:00
Ian Lance Taylor
f9c51e353f time: remove unnecessary trailing slash from "/etc/"
Fixes #36640

Change-Id: I2049b572347da1cb967f5a3f2bc342b310216435
Reviewed-on: https://go-review.googlesource.com/c/go/+/215519
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-02-22 04:31:20 +00:00
Ian Lance Taylor
5912f4fc37 runtime: really wait for goroutines in testSemaHandoff
The code has a comment saying that it waited for the goroutines,
but it didn't actually do so.

Change-Id: Icaeb40613711053a9f443cc34143835560427dda
Reviewed-on: https://go-review.googlesource.com/c/go/+/219277
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-02-22 04:08:12 +00:00
Cuong Manh Le
af686da46f cmd/compile: allow print/println(f()) where f() is multi-value
Fixes #35576

Change-Id: Ia128f412120069e9f8813e9e910e62644f950bfb
Reviewed-on: https://go-review.googlesource.com/c/go/+/207118
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-02-22 03:34:22 +00:00
Johan Jansson
d67d044310 crypto/tls: update ExampleDial with a valid root
When run as a separate program, the code in ExampleDial panicked due to
an expired certificate. Fixed this problem by replacing the expired
certificate with a valid one.

Also added a comment in the certificate to give a hint about why it
might fail in the future.

Fixes #35706

Change-Id: I3d300f7bccae050e4b73ded28b8029aa04b480bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/212601
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-02-21 23:20:22 +00:00
Filippo Valsorda
4045de378b crypto/tls: clarify TLS 1.0/1.1 CertificateRequestInfo.SignatureSchemes
This CL should not change the logic at all, but it took me a while to
figure out why we use these specific SignatureSchemes, so reformulate
the comment.

Change-Id: If519a58264209e6575417be07668e92ead0e772f
Reviewed-on: https://go-review.googlesource.com/c/go/+/208225
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2020-02-21 23:18:43 +00:00
Cherry Zhang
3e4e644433 cmd/dist: test cgo internal linking PIE
On platforms where internal linking PIE is supported, run
misc/cgo/test with that configuration.

Change-Id: Ia09631b07cc469c85818e1494093d802ea9d69a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/218838
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-02-21 23:11:00 +00:00