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

51231 Commits

Author SHA1 Message Date
Ian Lance Taylor
0e4b878258 doc/go1.18: mention debug/plan9obj.ErrNoSymbols
For #47694
For #48052

Change-Id: I136be9b498033309d876099aae16bad330555416
Reviewed-on: https://go-review.googlesource.com/c/go/+/373774
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2021-12-23 19:58:13 +00:00
Cherry Mui
af3b8cf502 cmd/go: remove MallocNanoZone environment variable workaround
We added a workaround in runtime/race. This should not be
necessary now.

Updates #49138.

Change-Id: Ia2010e4acc95c4ddf5f463ab2919401d893c0bac
Reviewed-on: https://go-review.googlesource.com/c/go/+/374314
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-23 18:58:36 +00:00
zhangjian
ed766b6ffb cmd/compile/internal/ir: fix a typo in node.go
README.md -> HACKING.md

Change-Id: I63909b86b2e6f8d9a34622f5d2b05048c79cd698
GitHub-Last-Rev: afaab8f05e
GitHub-Pull-Request: golang/go#50326
Reviewed-on: https://go-review.googlesource.com/c/go/+/374274
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-23 17:27:50 +00:00
Carl Johnson
d2ce939604 doc/go1.18: fix broken HTML in net/http.MaxBytesHandler
For #47694

Sorry about that! I guess the autocompleter in VSCode auto-closed the paragraph and I didn't notice.

Change-Id: I1e834e47deb708cd5285d26201a442305f8c3b24
GitHub-Last-Rev: ab88731551
GitHub-Pull-Request: golang/go#50305
Reviewed-on: https://go-review.googlesource.com/c/go/+/374014
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-22 23:31:40 +00:00
Cherry Mui
8cfcee1fff runtime: handle stray profiling signal better
In c-archive mode, when we turn off profiling, we  restore the
previous handler for SIGPROF, and ignore SIGPROF signals if no
handler was installed. So if a pending signal lands after we
remove the Go signal handler, it will not kill the program.

In the current code there is a small window, where we can still
receive signals but we are set to not handling the signal. If a
signal lands in this window (possibly on another thread), it will
see that we are not handling this signal and no previous handler
installed, and kill the program. To avoid this race, we set the
previous handler to SIG_IGN (ignoring the signal) when turning on
profiling. So when turning off profiling we'll ignore the signal
even if a stray signal lands in the small window.

Fixes #43828.

Change-Id: I304bc85a93ca0e63b0c0d8e902b097bfdc8e3f1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/374074
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-22 20:47:09 +00:00
Ian Lance Taylor
0f3becf62f doc/go1.18: list new net/netip and net functions and methods
For #46518
For #47694

Change-Id: I4848556674baf85ceec350645d9eddcd83f1b2e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/373834
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-12-22 18:43:55 +00:00
Ian Lance Taylor
d7b035f930 doc/go1.18: mention testing.F in testing package section
For #47694

Change-Id: I27d88d864319bd8dbabfa6675a6abf2f74c50717
Reviewed-on: https://go-review.googlesource.com/c/go/+/373914
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
2021-12-22 18:38:41 +00:00
Ian Lance Taylor
90fb5a4f97 doc/go1.18: document {text,html}/template {break,continue} commands
For #20531
For #47694

Change-Id: Iaefaa0a8982eabf59cd6a53120c8af9124d60d1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/373915
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-22 00:11:21 +00:00
Carl Johnson
ebac50e9ce doc/go1.18: add net/http.MaxBytesHandler
For #47694

Change-Id: Ifab2c2720ec2ccef175a0e14a95f8df0437eb009
GitHub-Last-Rev: f3c2f12c7b
GitHub-Pull-Request: golang/go#50250
Reviewed-on: https://go-review.googlesource.com/c/go/+/373015
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 23:09:59 +00:00
Tobias Klauser
3fb17cfd17 os: enable TestPipeThreads on FreeBSD
This test works on FreeBSD since CL 165801 was submitted.

Updates #19093

Change-Id: I45ffeb403c1de4385cdb21b9647f21976061e1ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/373358
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-21 22:43:13 +00:00
Ian Lance Taylor
60f2c12a85 doc/go1.18: mention new go/types/Config.Context field
For #47694
For #47916

Change-Id: Ieeffaf161da744adfdb4da8aac58a64c109ebcab
Reviewed-on: https://go-review.googlesource.com/c/go/+/373775
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-21 22:26:48 +00:00
Filippo Valsorda
a1ce5503c7 all: update vendored golang.org/x/crypto for cryptobyte fix
Fixes #49678

Change-Id: I47dd959a787180a67856e60dfa6eba3ddd045972
Reviewed-on: https://go-review.googlesource.com/c/go/+/373360
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
2021-12-21 19:17:52 +00:00
Ian Lance Taylor
9502339561 doc/go1.18: mention new debug/elf.R_PPC64_RELATIVE constant
For #47694

Change-Id: I9f4838100741d3ba13e9374e70466fa405c6e4d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/372634
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 18:43:00 +00:00
Ian Lance Taylor
cfb0cc3552 cmd/link: use SHT_INIT_ARRAY for .init_array section
Fixes #50295

Change-Id: If55ebcd5f2af724da7c9c744458a56d21a7ddde7
Reviewed-on: https://go-review.googlesource.com/c/go/+/373734
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-12-21 18:34:03 +00:00
Jing维
2d1d548081 reflect: update relative path in comment
Fix it to avoid misunderstanding.

Change-Id: I2a09cb9edfa8077c5c0c35e07000c0c7dc72755e
GitHub-Last-Rev: ae49d512eb
GitHub-Pull-Request: golang/go#50260
Reviewed-on: https://go-review.googlesource.com/c/go/+/373334
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 03:55:43 +00:00
Reilly Watson
b5e06545b3 net/http: fix link to ResponseWriter trailer example
The links to this example were using an underscore separator
instead of a hyphen, and incorrect casing.

Fixes #50279

Change-Id: I35d76a8a78cd708b7505ff1a70f7dacddaf43efd
Reviewed-on: https://go-review.googlesource.com/c/go/+/373514
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 03:54:36 +00:00
“kinggo”
4dfbb89f58 runtime: typo fix cyle -> cycle
Change-Id: I213fa8aa9b9c2537a189677394ddd30c62312518
GitHub-Last-Rev: ccafdee944
GitHub-Pull-Request: golang/go#50268
Reviewed-on: https://go-review.googlesource.com/c/go/+/373336
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Zhuo Meng <mzh@golangcn.org>
2021-12-21 01:51:23 +00:00
Cherry Mui
e087949090 runtime: check the correct environment variable in TestCgoCallbackGC
The test checks RUNTIME_TESTING_SHORT, whereas the test runner
actually set RUNTIME_TEST_SHORT. Check the correct one.

Updates #32023.

Change-Id: Ie8ab00e1f5b8c02112a9aa1ee0e56028185c8a44
Reviewed-on: https://go-review.googlesource.com/c/go/+/373614
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-21 01:10:17 +00:00
Andrew LeFevre
15550625c3 net/netip: add a fuzz test
This is a pretty straight port of the fuzz test at https://github.com/inetaf/netaddr.

The MarshalText methods of netip.Addr and net.IP, the Is* methods of netip.Addr
and net.IP and the MarshalText and String methods of netip.Addr are also
checked to ensure that they behave the same way.

Fixes #49367

Change-Id: I44abb01f2a7af45f39597992a1fc7ff0305728fa
GitHub-Last-Rev: c2323b0ae1
GitHub-Pull-Request: golang/go#50108
Reviewed-on: https://go-review.googlesource.com/c/go/+/371055
Trust: Matt Layher <mdlayher@gmail.com>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2021-12-20 23:46:23 +00:00
Ian Lance Taylor
6713b5dbbc cmd/doc: don't log on constraint type elements
Fixes #50256

Change-Id: I2327a0b28f8173c801ed2946bec8083967667027
Reviewed-on: https://go-review.googlesource.com/c/go/+/373314
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-20 23:32:14 +00:00
Dan Kortschak
9901d9e87a all: fix spelling errors found by misspell
Change-Id: Icedd0c3d49259d5aee249ecb33374e9b78e0c275
Reviewed-on: https://go-review.googlesource.com/c/go/+/373376
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-20 23:30:58 +00:00
Cherry Mui
59d04d104d cmd/internal/obj/riscv: mark stack bounds check prologue nonpreemptible
This is similar to CL 207350, for RISCV64.

May fix #50263.
Updates #35470.

Change-Id: I0d39e195e8254d65fa1aca1cdf1fc553aa8b7cba
Reviewed-on: https://go-review.googlesource.com/c/go/+/373434
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-20 23:02:08 +00:00
Robert Griesemer
7c94355b73 go/types: better error message when using comparable in union
This is a port of CL 372674 from types2 to go/types with
minor adjustments for error handling.

For #49602.

Change-Id: I726081325a2ff2d5690d11ddc8a830bbcbd8ab33
Reviewed-on: https://go-review.googlesource.com/c/go/+/372954
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-20 15:13:56 +00:00
Robert Griesemer
a2004de088 go/types, types2: delay "does not satisfy comparable" error until needed
Fixes #49112.

Change-Id: I8effbca7bcbb257b18fd4d3d1914fd10d4afaaae
Reviewed-on: https://go-review.googlesource.com/c/go/+/372594
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-20 15:13:38 +00:00
clamyang
87b2a54827 runtime: mgc.go typo fix: becuse -> because
Change-Id: I5019d5b9520e47a99a6136f615b6c9468073cc3c
GitHub-Last-Rev: 1a5392925a
GitHub-Pull-Request: golang/go#50239
Reviewed-on: https://go-review.googlesource.com/c/go/+/373055
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-12-19 20:16:45 +00:00
Cherry Mui
c5fee935bb cmd/link: force eager binding when using plugins on darwin
When building/using plugins on darwin, we need to use flat
namespace so the same symbol from the main executable and the
plugin can be resolved to the same address. Apparently, when using
flat namespace the dynamic linker can hang at forkExec when
resolving a lazy binding. Work around it by forcing early bindings.

Fixes #38824.

Change-Id: I983aa0a0960b15bf3f7871382e8231ee244655f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/372798
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-17 16:05:31 +00:00
Ian Lance Taylor
529939072e doc/go1.18: document union element restriction
For #47694

Change-Id: I9af871a4a45b002e72629904011aac8f076617f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/372974
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-17 03:59:09 +00:00
Robert Griesemer
3c495839fe spec: describe constraint parsing ambiguity and work-around more precisely
The new description matches the implementation (CL 370774).

Also, in the section on type constraints, use "defines" instead of
"determines" because the constraint interface defines the type set
which is precisely the set of acceptable type arguments.

For #49482.

Change-Id: I6f30f49100e8ba8bec0a0f1b450f88cae54312eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/372874
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 03:28:06 +00:00
Robert Griesemer
2bdf34f3e8 spec: clarify that comparable cannot be a union element
For #49602.

Change-Id: I0d3ff8f087dffb3409918494147fd1dceff7514d
Reviewed-on: https://go-review.googlesource.com/c/go/+/372694
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 03:28:05 +00:00
Bryan C. Mills
55a25aa6ca net: lengthen arbitrary SetDeadline timeout by a few orders of magnitude
The "someTimeout" constant in the net test is “just to test that
net.Conn implementations don't explode when their SetFooDeadline
methods are called”. It was set to 10 seconds, which is short enough
that it could actually matter on some platforms.

Since the point of the constant is just to make sure methods don't
explode, we should set it to be at least a couple of orders of
magnitude longer than the test: then it is guaranteed not to have any
unintended side-effects.

Fixes #50227

Change-Id: If97ae7bef5e7f16b336d09ccc37f5ea2ea7e70b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/372796
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 02:00:14 +00:00
Bryan C. Mills
63077bfcf5 os/exec: skip TestContextCancel on netbsd/arm64
For #42061

Change-Id: I3b4c774ad9e375d4bfef1cfb4336c35ed30a6430
Reviewed-on: https://go-review.googlesource.com/c/go/+/372795
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 01:59:32 +00:00
Robert Griesemer
2e6e9df2c1 go/types, types2: use compiler error message for undefined operators
For #48712.

Change-Id: I1596fe8688f093e0e92cf5b8d5501aac8631324e
Reviewed-on: https://go-review.googlesource.com/c/go/+/372894
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-17 00:14:53 +00:00
Robert Griesemer
c3561dd346 cmd/compile/internal/types2: better error message when using comparable in union
Fixes #49602.

Change-Id: I3499f8a485a2c8ec8afc74c5ef7b20d42c943a05
Reviewed-on: https://go-review.googlesource.com/c/go/+/372674
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-17 00:14:51 +00:00
Robert Griesemer
33a1a93a92 cmd/compile/internal/syntax: fix parsing of type parameter lists
The parser cannot distinguish a type parameter list of the form

[P *T ] or
[P (T)]

where T is not a type literal from an array length specification
P*T (product) or P(T) (constant-valued function call) and thus
interprets these forms as the start of array types.

This ambiguity must be resolved explicitly by placing *T inside
an interface, adding a trailing comma, or by leaving parentheses
away where possible.

This CL adjusts the parser such that these forms are
interpreted as (the beginning) of type parameter lists
if the token after P*T or P(T) is a comma, or if T is
a type literal.

This CL also adjusts the printer to print a comma if
necessary to avoid this ambiguity, and adds additional
printer tests.

Fixes #49482

Change-Id: I36328e2a7d9439c39ba0349837c445542549e84e
Reviewed-on: https://go-review.googlesource.com/c/go/+/370774
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-17 00:14:49 +00:00
Michael Matloob
0c24038d22 cmd/go: update go work docs
Change-Id: If28cc02a5a6f9bf2c7f2550de77ca0b31c1b35ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/372494
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2021-12-16 23:52:17 +00:00
Dan Scales
1387b5e91d cmd/compile: only avoid escaping package paths for "go.shape"
We have code that intends to avoid escaping the package path for
built-in packages. But it is hard to determine which packages are
built-in from a general rule, and we really only want to avoid escaping
for the "go.shape" package (since that gives ugly shape type names). So,
fix the code to only avoid escaping the package path specifically for
the "go.shape" package.

Fixes #50200

Change-Id: Ibaedd7690b99a173007c608c5dfa783ef82b326d
Reviewed-on: https://go-review.googlesource.com/c/go/+/372934
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-12-16 22:41:31 +00:00
Andre Marianiello
b1a53ece68 cmd/go/internal/vcs: prevent Git signatures from breaking commit time parsing
When a user has showSignature=true set in their Git config and the
commit in question has a signature, the git-show command will output
information about that signature. When this happens, the logic that
tries to parsing a timestamp from the git-show output chokes on this
signature information and the build stamping fails. This change prevents
commit signature information from being displayed even if
showSignature=true, preventing this issue.

Change-Id: I98d0a6fdd1e90dd1b91e0394713b6eb286a69d1a
GitHub-Last-Rev: 610706e23e
GitHub-Pull-Request: golang/go#49790
Reviewed-on: https://go-review.googlesource.com/c/go/+/367034
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 22:39:00 +00:00
Bryan C. Mills
d01cd8fa1d misc/cgo/testcarchive: log command output more consistently
Also check that executables exist immediately after building them
in parallel tests.

The parallel tests in this package occasionally fail with
"no such file or directory", implying that either the build
command failed to actually write out the binary or something
concurrently deleted it.

This is purely a shot in the dark, but I'm hoping that perhaps
the stderr output from one of these commands will shed some
light on the underlying failure mode.

For #49693

Change-Id: I2e768190c56053550879b89a3ac88c027d4741dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/369034
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 22:15:57 +00:00
Bryan C. Mills
d93677ad7e net/http/pprof: skip TestDeltaProfile on openbsd/arm
It is observed to be flaky on the only openbsd/arm builder.
Skipping on that platform until someone can investigate.

For #50218

Change-Id: Id3a6dc12b93b3cec67870d8d81bd608c4589c952
Reviewed-on: https://go-review.googlesource.com/c/go/+/372794
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 22:15:22 +00:00
Bryan C. Mills
ae695cd93f cmd/go: add missing cgo condition in TestScript/mod_list_compiled_concurrent
Updates #50205

Change-Id: I60d2e32c2cd84599f4a0126e4da4f1d61bd29b51
Reviewed-on: https://go-review.googlesource.com/c/go/+/372799
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-16 21:08:09 +00:00
Michael Matloob
ea26ce7cec cmd/go: examine dependencies of main modules in workspace mode
To make sure that we properly pull in everything in all, because
different main modules can interfere with each others' pruning.

Fixes #49763
Change-Id: I0756993d8ae9919ccb27ec460d579d348c38ec3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/370663
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 21:02:37 +00:00
zhouguangyuan
1d3a5b4aea reflect: fix name of type parameter
Fixes #50208

Change-Id: Ib0aff56341adb98ff6831c5badd1603ebf002b79
Reviewed-on: https://go-review.googlesource.com/c/go/+/372774
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
2021-12-16 15:44:40 +00:00
Keith Randall
7f2314530e cmd/compile: don't re-typecheck while importing
The imported code is already typechecked. NodAddrAt typechecks its
argument, which is unnecessary here and leads to errors when
typechecking unexported field references in other packages' code.

Mark the node is question as already typechecked, so we don't
retypecheck it.

Fixes #50148

Change-Id: I9789e3e7dd4d58ec095675e27b1c98389f7a0c44
Reviewed-on: https://go-review.googlesource.com/c/go/+/371554
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 00:34:10 +00:00
Keith Randall
d107aa2cd1 cmd/compile: upgrade ssa to do (int or float) -> complex
Generic instantiations can produce conversions from constant
literal ints or floats to complex values. We could constant literals
during instantiation, but it is just as easy to upgrade the code
generator to do the conversions.

Fixes #50193

Change-Id: I24bdc09226c8e868f6282e0e4057ba6c3ad5c41a
Reviewed-on: https://go-review.googlesource.com/c/go/+/372514
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 00:33:58 +00:00
Dan Scales
6e7c691218 test: add simpler test for issue 50109
Thanks to the simpler test case for issue 50109. I'm keeping the old
test case in place, since it's not too complex, and may be useful for
testing other things as well.

Updates #50109

Change-Id: I80cdbd1da473d0cc4dcbd68e45bab7ddb6f9263e
Reviewed-on: https://go-review.googlesource.com/c/go/+/371515
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
2021-12-15 23:51:57 +00:00
Bryan C. Mills
c9ffcca784 net: increase timing slop in TimeoutFluctuation tests on NetBSD and OpenBSD
Decrease the slop everywhere else, since NetBSD and OpenBSD seem to be
the only ones that miss by that much.

For #50189
Updates #36108

Change-Id: I22ac39cc7c254e40358fcd933b5a6016629602c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/372215
Trust: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-15 22:33:52 +00:00
Bryan C. Mills
58e8e26924 net: skip Lookup tests of external hosts on builders with flaky networks
For #50191

Change-Id: Ic1059127e756d69ea9b75cf5805669ec43fedd5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/372216
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-15 22:32:47 +00:00
Robert Griesemer
07ed86c57b cmd/compile/internal/types2: record types for union subexpressions
This is a port of CL 371757 from go/types to types2, with
minor adjustments for different error handling and AST.

It also names the added API test cases more consistently.
The same renaming was applied to the respective go/types
file.

Updates #50093

Change-Id: Iaa132106a197a207f831525432e62e9d452b17c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/372475
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-15 20:26:19 +00:00
Robert Griesemer
4cda05d41a cmd/compile/internal/types2: externalize union type sets
This is a port of CL 371756 from go/types to types2 with
minor adjustments due to different error handling or AST.

Updates #50093

Change-Id: Iab6a4634f8fc917bf99df439d31098624085f52a
Reviewed-on: https://go-review.googlesource.com/c/go/+/372474
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-15 20:26:10 +00:00
Cherry Mui
bc0aba9717 cmd/compile: correct type identity comparison with "any"
The builtin "any" type should only be identical to an unnamed empty
interface type, not a defined empty interface type.

Fixes #50169.

Change-Id: Ie5bb88868497cb795de1fd0276133ba9812edfe4
Reviewed-on: https://go-review.googlesource.com/c/go/+/372217
Trust: Cherry Mui <cherryyz@google.com>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-15 20:26:03 +00:00