]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
21 months ago[dev.unified] all: merge master (85d87b9) into dev.unified
Matthew Dempsky [Thu, 4 Aug 2022 17:12:28 +0000 (10:12 -0700)]
[dev.unified] all: merge master (85d87b9) into dev.unified

Merge List:

+ 2022-08-04 85d87b9c75 all: update vendored golang.org/x dependencies for Go 1.20 development
+ 2022-08-04 fb1bfd4d37 all: remove pre-Go 1.17 workarounds
+ 2022-08-04 44ff9bff0c runtime: clean up panic and deadlock lock ranks
+ 2022-08-04 f42dc0de74 runtime: make the lock rank DAG make more sense
+ 2022-08-04 d29a0282e9 runtime: add mayAcquire annotation for finlock
+ 2022-08-04 c5be4ed7df runtime: add missing trace lock edges
+ 2022-08-04 2b8a9a484f runtime: generate the lock ranking from a DAG description
+ 2022-08-04 ddfd639408 runtime: delete unused lock ranks
+ 2022-08-04 426ea5702b internal/dag: add a Graph type and make node order deterministic
+ 2022-08-04 d37cc9a8cd go/build, internal/dag: lift DAG parser into an internal package
+ 2022-08-04 ab0a94c6d3 cmd/dist: require Go 1.17 for building Go
+ 2022-08-04 1e3c19f3fe runtime: support riscv64 SV57 mode
+ 2022-08-03 f28fa952b5 make.bat, make.rc: show bootstrap toolchain version
+ 2022-08-03 87384801dc cmd/asm: update package doc to describe "-p" option
+ 2022-08-03 c6a2dada0d net: disable TestIPv6WriteMsgUDPAddrPortTargetAddrIPVersion [sic] on DragonflyBSD
+ 2022-08-02 29b9a328d2 runtime: trivial replacements of g in remaining files
+ 2022-08-02 c647264619 runtime: trivial replacements of g in signal_unix.go
+ 2022-08-02 399f50c9d7 runtime: tricky replacements of g in traceback.go
+ 2022-08-02 4509e951ec runtime: tricky replacements of g in proc.go
+ 2022-08-02 4400238ec8 runtime: trivial replacements of _g_ in remaining files
+ 2022-08-02 5999a28de8 runtime: trivial replacements of _g_ in os files
+ 2022-08-02 0e18cf6d09 runtime: trivial replacements of _g_ in GC files
+ 2022-08-02 4358a53a97 runtime: trivial replacements of _g_ in proc.go
+ 2022-08-02 b486518964 runtime: tricky replacements of _g_ in os3_solaris.go
+ 2022-08-02 54a0ab3f7b runtime: tricky replacements of _g_ in os3_plan9.go
+ 2022-08-02 4240ff764b runtime: tricky replacements of _g_ in signal_windows.go
+ 2022-08-02 8666d89ca8 runtime: tricky replacements of _g_ in signal_unix.go
+ 2022-08-02 74cee276fe runtime: tricky replacements of _g_ in trace.go
+ 2022-08-02 222799fde6 runtime: tricky replacements of _g_ in mgc.go
+ 2022-08-02 e9d7f54a1a runtime: tricky replacements of _g_ in proc.go
+ 2022-08-02 5e8d261918 runtime: rename _p_ to pp
+ 2022-08-02 0ad2ec6596 runtime: clean up dopanic_m
+ 2022-08-02 7e952962df runtime: clean up canpanic
+ 2022-08-02 9dbc0f3556 runtime: fix outdated g.m comment in traceback.go
+ 2022-08-02 d723df76da internal/goversion: update Version to 1.20
+ 2022-08-02 1b7e71e8ae all: disable tests that fail on Alpine
+ 2022-08-01 f2a9f3e2e0 test: improve generic type assertion test
+ 2022-08-01 27038b70f8 cmd/compile: fix wrong dict pass condition for type assertions
+ 2022-08-01 e99f53fed9 doc: move Go 1.19 release notes to x/website
+ 2022-08-01 8b13a073a1 doc: mention removal of cmd/compile's -importmap and -installsuffix flags
+ 2022-08-01 e95fd4c238 doc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCH
+ 2022-08-01 dee3efd9f8 doc/go1.19: fix a few links that were missing trailing slashes
+ 2022-07-30 f32519e5fb runtime: fix typos
+ 2022-07-29 9a2001a8cc cmd/dist: always pass -short=true with -quick
+ 2022-07-28 5c8ec89cb5 doc/go1.19: minor adjustments and links
+ 2022-07-28 417be37048 doc/go1.19: improve the loong64 release notes
+ 2022-07-28 027855e8d8 os/exec: add GODEBUG setting to opt out of ErrDot changes

Change-Id: Idc0fbe93978c0dff7600b90a2c3ecc067fd9f5f2

21 months agoall: update vendored golang.org/x dependencies for Go 1.20 development
Dmitri Shuralyov [Thu, 4 Aug 2022 16:18:52 +0000 (12:18 -0400)]
all: update vendored golang.org/x dependencies for Go 1.20 development

Go 1.20 development is just beginning. This is a time to update all
golang.org/x/... module versions that contribute packages to the std
and cmd modules in the standard library to latest master versions.

This CL holds back some of the available updates to the x/net module
due to go.dev/issue/54259. It'll be updated in a later separate pass.
x/tools is also held back a bit to avoid pulling in too new of x/net.

For #36905.
For #53812.
Updates #54259.

Change-Id: Iaefe6a343a02cc5ceb85c15125882d64dd372627
Reviewed-on: https://go-review.googlesource.com/c/go/+/421334
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>

21 months agoall: remove pre-Go 1.17 workarounds
Russ Cox [Thu, 4 Aug 2022 03:01:08 +0000 (23:01 -0400)]
all: remove pre-Go 1.17 workarounds

The Go bootstrap toolchain requirement is now Go 1.17.
We can finally delete all these pre-Go 1.17 workarounds.

For #44505.

Change-Id: I59d4dff1cde23da022892b5b6a116eb3dbad9ce4
Reviewed-on: https://go-review.googlesource.com/c/go/+/420903
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

21 months agoruntime: clean up panic and deadlock lock ranks
Austin Clements [Wed, 20 Jul 2022 21:44:45 +0000 (17:44 -0400)]
runtime: clean up panic and deadlock lock ranks

I'm not entirely sure why these locks are currently ranked "deadlock <
panic" since we drop panic before acquiring deadlock, and we actually
want deadlock to be below panic because panic is implicitly below
everything else and we want deadlock to be, too. My best guess is that
we had this edge because we intentionally acquire deadlock twice to
deadlock, and that causes the lock rank checking to panic on the
second acquire.

Fix this in a more sensible way by capturing that deadlock can be
acquired in a self-cycle and flipping the rank to "panic < deadlock"
to express that deadlock needs to be under all other locks, just like
panic.

For #53789.

Change-Id: I8809e5d102ce473bd3ace0ba07bf2200ef60263f
Reviewed-on: https://go-review.googlesource.com/c/go/+/418719
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Austin Clements <austin@google.com>

21 months agoruntime: make the lock rank DAG make more sense
Austin Clements [Wed, 20 Jul 2022 20:17:51 +0000 (16:17 -0400)]
runtime: make the lock rank DAG make more sense

This groups, comments, and generally reorganizes the lock rank graph
description by subsystem. It also introduces several pseudo-nodes that
more cleanly describe the inherent layering of lock ranks by
subsystem.

I believe this doesn't actually change the graph, but haven't verified
this.

For #53789.

Change-Id: I72f332f5a23b8217c7dc1b21411631ad48cee4b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/418718
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
21 months agoruntime: add mayAcquire annotation for finlock
Austin Clements [Wed, 20 Jul 2022 19:06:31 +0000 (15:06 -0400)]
runtime: add mayAcquire annotation for finlock

We're missing lock edges to finlock that happen only rarely. Anything
that calls mallocgc can potentially trigger sweeping, which can
potentially queue a finalizer, which acquires finlock. While this can
happen on any malloc, it happens relatively rarely, so we simply
haven't seen some of the lock edges that could happen.

Add a mayAcquire annotation to mallocgc to capture the possibility of
acquiring finlock.

With this change, we add "fin" to the set of "malloc" locks. Several
of these edges were already there, but not quite all of them.

This was found by inspecting the rank graph for things that didn't
make sense.

For #53789.

Change-Id: Idc10ce6f250596b0c07ba07ac93f2198fb38c22b
Reviewed-on: https://go-review.googlesource.com/c/go/+/418717
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

21 months agoruntime: add missing trace lock edges
Austin Clements [Thu, 21 Jul 2022 01:49:15 +0000 (21:49 -0400)]
runtime: add missing trace lock edges

We're missing lock edges to trace.lock that happen only rarely. Any
trace event can potentially fill up a trace buffer and acquire
trace.lock in order to flush the buffer, but this happens relatively
rarely, so we simply haven't seen some of these lock edges that could
happen.

With this change, we promote "fin, notifyList < traceStackTab" to
"fin, notifyList < trace" and now everything that emits trace events
with a P enters the tracer lock ranks via "trace", rather than some
things entering at "trace" and others at "traceStackTab".

This was found by inspecting the rank graph for things that didn't
make sense.

Ideally we would add a mayAcquire annotation that any trace event can
potentially acquire trace.lock, but there are actually cases that
violate this ranking right now. This is #53979. The chance of a lock
cycle is extremely low given the number of conditions that have to
happen simultaneously.

For #53789.

Change-Id: Ic65947d27dee88d2daf639b21b2c9d37552f0ac0
Reviewed-on: https://go-review.googlesource.com/c/go/+/418716
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

21 months agoruntime: generate the lock ranking from a DAG description
Austin Clements [Tue, 19 Jul 2022 21:31:52 +0000 (17:31 -0400)]
runtime: generate the lock ranking from a DAG description

Currently, the runtime lock rank graph is maintained manually in a
large set of arrays that give the partial order and a manual
topological sort of this partial order. Any changes to the rank graph
are difficult to reason about and hard to review, as well as likely to
cause merge conflicts. Furthermore, because the partial order is
manually maintained, it's not actually transitively closed (though
it's close), meaning there are many cases where rank a can be acquired
before b and b before c, but a cannot be acquired before c. While this
isn't technically wrong, it's very strange in the context of lock
ordering.

Replace all of this with a much more compact, readable, and
maintainable description of the rank graph written in the internal/dag
graph language. We statically generate the runtime structures from
this description, which has the advantage that the parser doesn't have
to run during runtime initialization and the structures can live in
static data where they can be accessed from any point during runtime
init.

The current description was automatically generated from the existing
partial order, combined with a transitive reduction. This ensures it's
correct, but it could use some manual messaging to call out the
logical layers and add some structure.

We do lose the ad hoc string names of the lock ranks in this
translation, which could mostly be derived from the rank constant
names, but not always. I may bring those back but in a more uniform
way.

We no longer need the tests in lockrank_test.go because they were
checking that we manually maintained the structures correctly.

Fixes #53789.

Change-Id: I54451d561b22e61150aff7e9b8602ba9737e1b9b
Reviewed-on: https://go-review.googlesource.com/c/go/+/418715
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

21 months agoruntime: delete unused lock ranks
Austin Clements [Tue, 19 Jul 2022 20:15:03 +0000 (16:15 -0400)]
runtime: delete unused lock ranks

For #53789.

Change-Id: Ic7379afcfdcc47b541bac9b44b5bc6b43604fc0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/418714
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>

21 months agointernal/dag: add a Graph type and make node order deterministic
Austin Clements [Mon, 18 Jul 2022 18:56:40 +0000 (14:56 -0400)]
internal/dag: add a Graph type and make node order deterministic

The go/types package doesn't care about node ordering because it's
just querying paths in the graph, but we're about to use this for the
runtime lock graph, and there we want determinism.

For #53789.

Change-Id: Ic41329bf2eb9a3a202f97c21c761ea588ca551c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/418593
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>

21 months agogo/build, internal/dag: lift DAG parser into an internal package
Austin Clements [Mon, 18 Jul 2022 15:35:52 +0000 (11:35 -0400)]
go/build, internal/dag: lift DAG parser into an internal package

This lifts the DAG parser from the go/build dependencies test into its
own package that can be reused elsewhere.

I tried to keep the code as close as possible. I changed some names to
reflect the more general purpose of internal/dag. Most of the changes
are related to error handling, since internal/dag doesn't take a
testing.T on which to report errors. Notably, parseRules now returns a
slice of parsed rules rather than calling a callback because this made
it easier to separate fatal parsing errors from non-fatal graph
checking errors.

For #53789.

Change-Id: I170b84fd85f971cfc1a50972156d48e78b45fce3
Reviewed-on: https://go-review.googlesource.com/c/go/+/418592
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

21 months agocmd/dist: require Go 1.17 for building Go
Russ Cox [Thu, 4 Aug 2022 02:50:37 +0000 (22:50 -0400)]
cmd/dist: require Go 1.17 for building Go

This makes builds using earlier Go bootstrap versions fail pretty clearly:

% GOROOT_BOOTSTRAP=$HOME/sdk/go1.16 ./make.bash
Building Go cmd/dist using /Users/rsc/sdk/go1.16. (go1.16 darwin/amd64)
found packages main (build.go) and building_Go_requires_Go_1_17_or_later (notgo117.go) in /Users/rsc/go/src/cmd/dist
%

All the builders have Go 1.17 or later for bootstrap now except
for the android corellium builders, which still need updating (#54246).
We are accepting breakage on those for now.

Fixes #44505.

Change-Id: I12a67f42f61dba43a331cee0a150194d3e42c044
Reviewed-on: https://go-review.googlesource.com/c/go/+/420902
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>

21 months agoruntime: support riscv64 SV57 mode
Dmitry Vyukov [Fri, 27 May 2022 16:55:35 +0000 (18:55 +0200)]
runtime: support riscv64 SV57 mode

riscv64 has SV57 mode when user-space VA is 56 bits.
Linux kernel recently got support for this mode and Go binaries started crashing as:

runtime: lfstack.push invalid packing: node=0xffffff5908a940 cnt=0x1
packed=0xffff5908a9400001 -> node=0xffff5908a940

Adjust lfstack code to use only 8 top bits of pointers on riscv64.

For context see:
https://groups.google.com/g/syzkaller-bugs/c/lU0GQTZoNQQ/m/O_c3vmE3AAAJ

Update #54104

Change-Id: Ib5d3d6a79c0c6eddf11618d73fcc8bc1832a9c25
Reviewed-on: https://go-review.googlesource.com/c/go/+/409055
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
21 months agomake.bat, make.rc: show bootstrap toolchain version
Russ Cox [Tue, 26 Jul 2022 18:21:03 +0000 (14:21 -0400)]
make.bat, make.rc: show bootstrap toolchain version

Print the bootstrap toolchain version on Plan 9 and Windows,
same as on all Unix systems since CL 204757 (Nov 2019).
This makes it easier to see what is going on in a build.

For #44505.

Change-Id: I50cdd5e15a7c8b908e33e92780f8a3bca65c91ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/419452
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
21 months agocmd/asm: update package doc to describe "-p" option
Than McIntosh [Wed, 3 Aug 2022 18:59:58 +0000 (14:59 -0400)]
cmd/asm: update package doc to describe "-p" option

Include a description of the assembler's "-p" command line option
in the package doc.

Fixes #54215.

Change-Id: I641abad573c37aa9447af6e8b84716093c2a2b70
Reviewed-on: https://go-review.googlesource.com/c/go/+/420900
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>

21 months ago[dev.unified] cmd/compile: start using runtime dictionaries
Matthew Dempsky [Mon, 1 Aug 2022 01:48:16 +0000 (18:48 -0700)]
[dev.unified] cmd/compile: start using runtime dictionaries

This CL switches unified IR to start using runtime dictionaries,
rather than pure stenciling. In particular, for each instantiated
function `F[T]`, it now:

1. Generates a global variable `F[T]-dict` of type `[N]uintptr`, with
all of the `*runtime._type` values needed by `F[T]`.

2. Generates a function `F[T]-shaped`, with an extra
`.dict *[N]uintptr` parameter and indexing into that parameter for
derived types. (N.B., this function is not yet actually using shape
types.)

3. Changes `F[T]` to instead be a wrapper function that calls
`F[T]-shaped` passing `&F[T]-dict` as the `.dict` parameter.

This is done in one pass to make sure the overall wiring is all
working (especially, function literals and inlining).

Subsequent CLs will write more information into `F[T]-dict` and update
`F[T]-shaped` to use it instead of relying on `T`-derived information
itself. Once that's done, `F[T]-shaped` can be changed to
`F[shapify(T)]` (e.g., `F[go.shape.int]`) and deduplicated.

Change-Id: I0e802a4d9934794e01a6bfc367820af893335155
Reviewed-on: https://go-review.googlesource.com/c/go/+/420416
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
21 months agonet: disable TestIPv6WriteMsgUDPAddrPortTargetAddrIPVersion [sic] on DragonflyBSD
Russ Cox [Tue, 2 Aug 2022 15:20:30 +0000 (11:20 -0400)]
net: disable TestIPv6WriteMsgUDPAddrPortTargetAddrIPVersion [sic] on DragonflyBSD

Like OpenBSD, DragonflyBSD does not do IPv4-in-IPv6 mapping.

For #52264.

Change-Id: Id41606e75652e684f2e0e98c6459156641aec9b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/420775
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: trivial replacements of g in remaining files
Michael Pratt [Wed, 20 Jul 2022 17:18:06 +0000 (13:18 -0400)]
runtime: trivial replacements of g in remaining files

Rename g variables to gp for consistency.

Change-Id: I09ecdc7e8439637bc0e32f9c5f96f515e6436362
Reviewed-on: https://go-review.googlesource.com/c/go/+/418591
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: trivial replacements of g in signal_unix.go
Michael Pratt [Wed, 20 Jul 2022 17:18:42 +0000 (13:18 -0400)]
runtime: trivial replacements of g in signal_unix.go

Change-Id: I0d8d50c8b7ae6cd01594091392dc726cf149e34a
Reviewed-on: https://go-review.googlesource.com/c/go/+/418590
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: tricky replacements of g in traceback.go
Michael Pratt [Wed, 20 Jul 2022 17:18:54 +0000 (13:18 -0400)]
runtime: tricky replacements of g in traceback.go

Change-Id: I80e847451b697de049a01df051a73b5976b39d4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/418589
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: tricky replacements of g in proc.go
Michael Pratt [Wed, 20 Jul 2022 17:31:10 +0000 (13:31 -0400)]
runtime: tricky replacements of g in proc.go

Change-Id: I36cd167ed77e123b3ba7dd4a1a8577cbc51a84d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/418588
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: trivial replacements of _g_ in remaining files
Michael Pratt [Wed, 20 Jul 2022 17:49:17 +0000 (13:49 -0400)]
runtime: trivial replacements of _g_ in remaining files

Change-Id: I24d299b345bda1c9d6fa7876d4f03c05b8c1156d
Reviewed-on: https://go-review.googlesource.com/c/go/+/418587
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: trivial replacements of _g_ in os files
Michael Pratt [Wed, 20 Jul 2022 15:43:30 +0000 (11:43 -0400)]
runtime: trivial replacements of _g_ in os files

Change-Id: I7886ea6b94697bafb8ea345508c9cb752c92cadc
Reviewed-on: https://go-review.googlesource.com/c/go/+/418586
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: trivial replacements of _g_ in GC files
Michael Pratt [Wed, 20 Jul 2022 16:59:50 +0000 (12:59 -0400)]
runtime: trivial replacements of _g_ in GC files

Change-Id: Iedf10558d9a1d3b80a151927b99660b688ed9ccb
Reviewed-on: https://go-review.googlesource.com/c/go/+/418585
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: trivial replacements of _g_ in proc.go
Michael Pratt [Thu, 11 Feb 2021 16:15:53 +0000 (11:15 -0500)]
runtime: trivial replacements of _g_ in proc.go

Generated with global replace: 's/_g_/gp/g'.

Change-Id: Ia91606a0a8a5773be7c6e5152160510ae9bb221e
Reviewed-on: https://go-review.googlesource.com/c/go/+/418584
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: tricky replacements of _g_ in os3_solaris.go
Michael Pratt [Wed, 20 Jul 2022 15:48:43 +0000 (11:48 -0400)]
runtime: tricky replacements of _g_ in os3_solaris.go

The argument to semacreate is always getg().m.

Change-Id: I4c4104cd6b57ab6b9ed0b7d11b8089bcc9fdd621
Reviewed-on: https://go-review.googlesource.com/c/go/+/418583
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: tricky replacements of _g_ in os3_plan9.go
Michael Pratt [Wed, 20 Jul 2022 15:45:26 +0000 (11:45 -0400)]
runtime: tricky replacements of _g_ in os3_plan9.go

Change-Id: I2a3ec71a33380b1215b9ab1ceb0a9b0e2bf7835b
Reviewed-on: https://go-review.googlesource.com/c/go/+/418582
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: tricky replacements of _g_ in signal_windows.go
Michael Pratt [Wed, 20 Jul 2022 15:38:29 +0000 (11:38 -0400)]
runtime: tricky replacements of _g_ in signal_windows.go

winthrow is always called on g0.

Change-Id: Ia23276a5bd545993faf4d75368c171f6ea7a3034
Reviewed-on: https://go-review.googlesource.com/c/go/+/418581
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: tricky replacements of _g_ in signal_unix.go
Michael Pratt [Thu, 11 Feb 2021 16:19:59 +0000 (11:19 -0500)]
runtime: tricky replacements of _g_ in signal_unix.go

sighandler has gp, the goroutine running when the signal arrived, and
gsignal, the goroutine executing the signal handler. The latter is
usually mp.gsignal, except in the case noted by the delayedSignal check.

Like previous CLs, cases where the getg() G is used only to access the M
are replaced with direct uses of mp.

Change-Id: I2dc7894da7004af17682712e07a0be5f9a235d81
Reviewed-on: https://go-review.googlesource.com/c/go/+/418580
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: tricky replacements of _g_ in trace.go
Michael Pratt [Thu, 11 Feb 2021 19:09:10 +0000 (14:09 -0500)]
runtime: tricky replacements of _g_ in trace.go

Like previous CLs, cases where the getg() G is used only to access the M
are replaced with direct uses of mp.

Change-Id: I4740c80d6b4997d051a52afcfa8c087e0317dab3
Reviewed-on: https://go-review.googlesource.com/c/go/+/418579
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: tricky replacements of _g_ in mgc.go
Michael Pratt [Wed, 20 Jul 2022 16:59:03 +0000 (12:59 -0400)]
runtime: tricky replacements of _g_ in mgc.go

getg() is used primarily for gp.m, so use mp. gp.m.curg is also used,
name that curgp.

Change-Id: I9db2dc4adce2b17d6b41c60d4f2dfbc9aa41fac1
Reviewed-on: https://go-review.googlesource.com/c/go/+/418578
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
22 months agoruntime: tricky replacements of _g_ in proc.go
Michael Pratt [Wed, 10 Feb 2021 17:46:09 +0000 (12:46 -0500)]
runtime: tricky replacements of _g_ in proc.go

This manually replaces uses of _g_ that cannot be trivially switched to
gp since there is another gp variable in scope.

Most of these functions only use the current g to reach the m, so this
helps with clarity by switching all accesses directly to an mp variable.

Change-Id: I96a4fc1c32470a7f3d12ddec9f147c2743210e71
Reviewed-on: https://go-review.googlesource.com/c/go/+/418577
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: rename _p_ to pp
Michael Pratt [Tue, 9 Feb 2021 20:48:41 +0000 (15:48 -0500)]
runtime: rename _p_ to pp

_g_, _p_, and _m_ are primarily vestiges of the C version of the
runtime, while today we prefer Go-style variable names (generally gp,
pp, and mp).

This change replaces all remaining uses of _p_ with pp. These are all
trivial replacements (i.e., no conflicts). That said, there are several
functions that refer to two different Ps at once. There the naming
convention is generally that pp refers to the local P, and p2 refers to
the other P we are accessing.

Change-Id: I205b801be839216972e7644b1fbeacdbf2612859
Reviewed-on: https://go-review.googlesource.com/c/go/+/306674
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: clean up dopanic_m
Michael Pratt [Wed, 20 Jul 2022 15:18:15 +0000 (11:18 -0400)]
runtime: clean up dopanic_m

gp is a user G running on the same M as getg(), so it is a fine proxy
for gp.m.

Change-Id: I9aa1dd283ecf28878eeedd7da4ded5c901809832
Reviewed-on: https://go-review.googlesource.com/c/go/+/418576
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: clean up canpanic
Michael Pratt [Wed, 20 Jul 2022 15:09:14 +0000 (11:09 -0400)]
runtime: clean up canpanic

* The gp argument to canpanic is always equivalent to getg(), so no need
to pass it at all.
* gp must not be nil or _g_.m would have crashed, so no need to check
for nil.
* Use acquirem to better reason about preemption.

Change-Id: Ic7dc8dc1e56ab4c1644965f6aeba16807cdb2df4
Reviewed-on: https://go-review.googlesource.com/c/go/+/418575
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>

22 months agoruntime: fix outdated g.m comment in traceback.go
Michael Pratt [Wed, 20 Jul 2022 17:20:48 +0000 (13:20 -0400)]
runtime: fix outdated g.m comment in traceback.go

Change-Id: Idfd02781a9ee550da240ef53898943e8cd37dd64
Reviewed-on: https://go-review.googlesource.com/c/go/+/418574
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
22 months agointernal/goversion: update Version to 1.20
Dmitri Shuralyov [Tue, 2 Aug 2022 17:33:02 +0000 (13:33 -0400)]
internal/goversion: update Version to 1.20

This is the start of the Go 1.20 development cycle, so update the
Version value accordingly. It represents the Go 1.x version that
will soon open up for development (and eventually become released).

For #40705.
For #53812.

Change-Id: Ic8919a61c9b2f3139717434b9c776d1597175448
Reviewed-on: https://go-review.googlesource.com/c/go/+/420816
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
22 months agoall: disable tests that fail on Alpine
Russ Cox [Fri, 29 Jul 2022 04:32:14 +0000 (00:32 -0400)]
all: disable tests that fail on Alpine

These changes are enough to pass all.bash using the
disabled linux-amd64-alpine builder via debugnewvm.

For #19938.
For #39857.

Change-Id: I7d160612259c77764b70d429ad94f0864689cdce
Reviewed-on: https://go-review.googlesource.com/c/go/+/419995
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agotest: improve generic type assertion test
Matthew Dempsky [Mon, 1 Aug 2022 20:23:36 +0000 (13:23 -0700)]
test: improve generic type assertion test

The test added in CL 420394 only tested that the type assertions
compiled at all. This CL changes it into a run test to make sure the
type assertions compile and also run correctly.

Updates #54135.

Change-Id: Id17469faad1bb55ff79b0bb4163ef50179330033
Reviewed-on: https://go-review.googlesource.com/c/go/+/420421
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
22 months agocmd/compile: fix wrong dict pass condition for type assertions
Wayne Zuo [Sun, 31 Jul 2022 09:20:26 +0000 (17:20 +0800)]
cmd/compile: fix wrong dict pass condition for type assertions

Fixes #54135

Change-Id: I2b27af8124014b2699ea44bdc765e1fb8f6c8028
Reviewed-on: https://go-review.googlesource.com/c/go/+/420394
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agodoc: move Go 1.19 release notes to x/website
Dmitri Shuralyov [Mon, 1 Aug 2022 17:38:27 +0000 (13:38 -0400)]
doc: move Go 1.19 release notes to x/website

Now that the development of the Go 1.19 release is almost done, its
release notes are moved to their eventual long-term home in x/website
in CL 420417. Delete the initial development copy here.

For golang/go#51400.

Change-Id: I741285555af28ce9a64e7f8d2b9fe2a0f3e13c26
Reviewed-on: https://go-review.googlesource.com/c/go/+/420418
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
22 months agodoc: mention removal of cmd/compile's -importmap and -installsuffix flags
Matthew Dempsky [Wed, 13 Jul 2022 22:00:53 +0000 (15:00 -0700)]
doc: mention removal of cmd/compile's -importmap and -installsuffix flags

Updates #51225.

Change-Id: I820f3f5ba169635fee37c30e41b370c9399a436d
Reviewed-on: https://go-review.googlesource.com/c/go/+/417534
Reviewed-by: Russ Cox <rsc@golang.org>
22 months agodoc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCH
WANG Xuerui [Mon, 1 Aug 2022 13:19:29 +0000 (21:19 +0800)]
doc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCH

Another last-minute fix. The whole repo is checked case-insensitively
against "longarch" and this is the only occurrence.

Change-Id: If13c123c1e44001a346f1df1df9d839c699703b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/420494
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
22 months agodoc/go1.19: fix a few links that were missing trailing slashes
Brad Fitzpatrick [Wed, 27 Jul 2022 02:28:00 +0000 (19:28 -0700)]
doc/go1.19: fix a few links that were missing trailing slashes

They were part of a chain of three redirects. Now it's only two,
but that's #54081.

Change-Id: Ibfe6a17a372df61df40124892951b48577e4ced9
Reviewed-on: https://go-review.googlesource.com/c/go/+/419634
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoruntime: fix typos
hopehook [Sat, 30 Jul 2022 14:11:32 +0000 (22:11 +0800)]
runtime: fix typos

Change-Id: I30c125be6cb321aa03ea827bd11c3169087e3d4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/420314
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>

22 months ago[dev.unified] go/internal: set underlying types in proper order
David Chase [Fri, 29 Jul 2022 16:06:50 +0000 (12:06 -0400)]
[dev.unified] go/internal: set underlying types in proper order

This problem appeared in google-internal testing.
If the run-later functions are run in the wrong order,
type definitions won't resolve properly.

Change-Id: I9da0775976282e92ca036d20fd9fd6650900daf9
Reviewed-on: https://go-review.googlesource.com/c/go/+/419996
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
22 months agocmd/dist: always pass -short=true with -quick
Ian Lance Taylor [Sat, 16 Jul 2022 23:08:35 +0000 (16:08 -0700)]
cmd/dist: always pass -short=true with -quick

Fixes #53818

Change-Id: I190a8bcf50d92b9c10e9980e630ebb362d8b19ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/417918
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
22 months agodoc/go1.19: minor adjustments and links
Russ Cox [Thu, 28 Jul 2022 17:06:28 +0000 (13:06 -0400)]
doc/go1.19: minor adjustments and links

A few last-minute clarifications before the release.

Change-Id: Ia0123441633c147aa3f76ea29ed26c7722e2416c
Reviewed-on: https://go-review.googlesource.com/c/go/+/419994
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agodoc/go1.19: improve the loong64 release notes
WANG Xuerui [Sat, 16 Jul 2022 12:15:49 +0000 (20:15 +0800)]
doc/go1.19: improve the loong64 release notes

Link to the LoongArch documentations site, mention the ABI variant
supported, and add a note about the unfortunate old-world/new-world split
situation that users must be aware of.

Updates #46229
For #51400

Change-Id: I6789f509263a0dbf113481148665e7951aa6a989
Reviewed-on: https://go-review.googlesource.com/c/go/+/417715
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
22 months agoos/exec: add GODEBUG setting to opt out of ErrDot changes
Russ Cox [Wed, 27 Jul 2022 18:36:05 +0000 (14:36 -0400)]
os/exec: add GODEBUG setting to opt out of ErrDot changes

The changes are likely to break users, and we need
to make it easy to unbreak without code changes.

For #43724.
Fixes #53962.

Change-Id: I105c5d6c801d354467e0cefd268189c18846858e
Reviewed-on: https://go-review.googlesource.com/c/go/+/419794
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>

22 months ago[dev.unified] all: merge master (462b78f) into dev.unified
Matthew Dempsky [Thu, 28 Jul 2022 07:32:28 +0000 (00:32 -0700)]
[dev.unified] all: merge master (462b78f) into dev.unified

Merge List:

+ 2022-07-27 462b78fe70 misc/cgo/test: use fewer threads in TestSetgidStress in long mode
+ 2022-07-27 055113ef36 math/big: check buffer lengths in GobDecode
+ 2022-07-27 4248146154 net: document UDPConn.ReadFromUDPAddrPort's AddrPort result more
+ 2022-07-26 faf4e97200 net: fix WriteMsgUDPAddrPort addr handling
+ 2022-07-26 caa225dd29 doc/go1.19: note that updated race syso files require GNU ld 2.26
+ 2022-07-26 ceefd3a37b bytes: document that Reader.Reset affects the result of Size
+ 2022-07-26 3e97294663 runtime/cgo: use frame address to set g0 stack bound
+ 2022-07-25 24dc27a3c0 cmd/compile: fix blank label code
+ 2022-07-25 9fcc8b2c1e runtime: fix runtime.Breakpoint() on windows/arm64
+ 2022-07-25 795a88d0c3 cmd/go: add space after comma in 'go help test'
+ 2022-07-25 9eb3992ddd doc/go1.19: minor fixes
+ 2022-07-25 dcea1ee6e3 time: clarify documentation for allowed formats and add tests to prove them
+ 2022-07-25 37c8112b82 internal/fuzz: fix typo in function comments
+ 2022-07-25 850d547d2d doc/go1.19: expand crypto release notes
+ 2022-07-24 64f2829c9c runtime: fix typo in function comments
+ 2022-07-24 2ff563a00e cmd/compile/internal/noder: correct spelling errors for instantiation
+ 2022-07-22 c5da4fb7ac cmd/compile: make jump table symbol local
+ 2022-07-22 774fa58d1d A+C: delete AUTHORS and CONTRIBUTORS
+ 2022-07-21 2d655fb15a unsafe: document when Sizeof/Offsetof/Alignof are not constant
+ 2022-07-21 076c3d7f07 net/http: remove accidental heading in Head documentation
+ 2022-07-21 c4a6d3048b cmd/dist: enable race detector test on S390X
+ 2022-07-20 244c8b0500 cmd/cgo: allow cgo to pass strings or []bytes bigger than 1<<30
+ 2022-07-20 df38614bd7 test: use go tool from tree, not path
+ 2022-07-20 bb1749ba3b cmd/compile: improve GOAMD64=v1 violation test
+ 2022-07-19 176b63e711 crypto/internal/nistec,debug/gosym: fix typos

Change-Id: I96e5d60039381691dffd841e58927f0afff8c544

22 months ago[dev.unified] go/internal/gcimporter: flatten imports
Matthew Dempsky [Wed, 27 Jul 2022 21:24:46 +0000 (14:24 -0700)]
[dev.unified] go/internal/gcimporter: flatten imports

The current documentation for go/types.(*Packages).Imports requires
that the import graph be flattened when read from export data. I think
this is a documentation bug (incorrectly codifying the existing
behavior, rather than documenting it as a known bug), but until that's
decided, we can at least flatten imports ourselves.

Updates #54096.

Change-Id: Idc054a2efc908b3e6651e6567d0ea0e89bb0c54d
Reviewed-on: https://go-review.googlesource.com/c/go/+/419596
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile: move "has init" to private metadata
Matthew Dempsky [Wed, 27 Jul 2022 07:33:56 +0000 (00:33 -0700)]
[dev.unified] cmd/compile: move "has init" to private metadata

Currently, there's a "has init" bool in the public metadata section,
which is only needed by cmd/compile; but because it's in the public
metadata section, it's known to the go/types importers too. This CL
moves it instead to the new compiler-only private metadata section
added in the last CL for the inline bodies index.

The existing bool in the public metadata section is left in place, and
just always set to false, to avoid breaking the x/tools importer. The
next time we bump the export version number, we can remove the bool
properly. But no urgency just yet.

Change-Id: I380f358652374b5a221f85020a53dc65912ddb29
Reviewed-on: https://go-review.googlesource.com/c/go/+/419676
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile: implement simple inline body pruning heuristic
Matthew Dempsky [Wed, 27 Jul 2022 04:52:42 +0000 (21:52 -0700)]
[dev.unified] cmd/compile: implement simple inline body pruning heuristic

An important optimization in the existing export data format is the
pruning of unreachable inline bodies. That is, when re-exporting
transitively imported types, omitting the inline bodies for methods
that can't actually be needed due to importing that package.

The existing logic (implemented in typecheck/crawler.go) is fairly
sophisticated, but also relies on actually expanding inline bodies in
the process, which is undesirable. However, including all inline
bodies is also prohibitive for testing GOEXPERIMENT=unified against
very large Go code bases that impose size limits on build action
inputs.

As a short-term solution, this CL implements a simple heuristic for
GOEXPERIMENT=unified: include the inline bodies for all
locally-declared functions/methods, and for any imported
functions/methods that were inlined into this package.

Change-Id: I686964a0cd9262b77d3d5587f89cfbcfe8b2e521
Reviewed-on: https://go-review.googlesource.com/c/go/+/419675
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
22 months ago[dev.unified] cmd/compile: allow inlining to fail gracefully
Matthew Dempsky [Tue, 26 Jul 2022 04:37:30 +0000 (21:37 -0700)]
[dev.unified] cmd/compile: allow inlining to fail gracefully

Change-Id: I20c7df52d110fb88eb22d57bdad9264d0c5e22fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/419674
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile: extract nil handling from exprType
Matthew Dempsky [Mon, 25 Jul 2022 19:21:21 +0000 (12:21 -0700)]
[dev.unified] cmd/compile: extract nil handling from exprType

Type switches are the only context where exprType was used and `nilOK`
was true. It'll simplify subsequent dictionary work somewhat if
exprType doesn't need to worry about `nil`, so extract this logic and
move it into switchStmt instead.

Change-Id: I3d810f465173f5bb2e2dee7bbc7843fff6a62ee5
Reviewed-on: https://go-review.googlesource.com/c/go/+/419474
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
22 months ago[dev.unified] cmd/compile: write iface conversion RTTI into unified IR
Matthew Dempsky [Sat, 23 Jul 2022 07:46:10 +0000 (00:46 -0700)]
[dev.unified] cmd/compile: write iface conversion RTTI into unified IR

This CL changes convRTTI into a serialization method too, like the
previous CL's rtype method. And again, currently this just builds on
the existing type serialization logic, but will eventually be changed
to use dictionary lookups where appropriate.

Change-Id: I551aef8ade24b08dc6206f06ace86d91e665f5c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/419457
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

22 months ago[dev.unified] cmd/compile: write RTTI into unified IR export data
Matthew Dempsky [Sat, 23 Jul 2022 06:33:30 +0000 (23:33 -0700)]
[dev.unified] cmd/compile: write RTTI into unified IR export data

This CL adds `rtype` methods for unified IR for writing/reading types
that need to have their *runtime._type value available.

For now, this just builds on the existing type writing/reading
mechanics and calling reflectdata.TypePtrAt; but longer term, reading
of derived types can be changed to use dictionary lookups instead.

Change-Id: I6f803b84546fa7df2877a8a3bcbf2623e4b03449
Reviewed-on: https://go-review.googlesource.com/c/go/+/419456
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
22 months agomisc/cgo/test: use fewer threads in TestSetgidStress in long mode
Cherry Mui [Wed, 27 Jul 2022 16:59:16 +0000 (12:59 -0400)]
misc/cgo/test: use fewer threads in TestSetgidStress in long mode

TestSetgidStress originally spawns 1000 threads for stress testing.
It caused timeout on some builders so CL 415677 reduced to 50 in
short mode. But it still causes flaky timeouts in longtest
builders, so reduce the number of threads in long mode as well.

Should fix #53641.

Change-Id: I02f4ef8a143bb1faafe3d11ad223f36f5cc245c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/419453
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agomath/big: check buffer lengths in GobDecode
Roland Shoemaker [Fri, 15 Jul 2022 17:43:44 +0000 (10:43 -0700)]
math/big: check buffer lengths in GobDecode

In Float.GobDecode and Rat.GobDecode, check buffer sizes before
indexing slices.

Fixes #53871

Change-Id: I1b652c32c2bc7a0e8aa7620f7be9b2740c568b0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/417774
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>

22 months agonet: document UDPConn.ReadFromUDPAddrPort's AddrPort result more
Brad Fitzpatrick [Tue, 26 Jul 2022 20:29:16 +0000 (13:29 -0700)]
net: document UDPConn.ReadFromUDPAddrPort's AddrPort result more

Clarify the form of its IPv4 addresses when listening on an
unspecified address.

(found while testing/reviewing CL 399454)

Change-Id: I62b367f5a4e6d340eb72dd7ec342080f1821e63e
Reviewed-on: https://go-review.googlesource.com/c/go/+/419614
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>

22 months agonet: fix WriteMsgUDPAddrPort addr handling
database64128 [Fri, 29 Apr 2022 17:29:58 +0000 (17:29 +0000)]
net: fix WriteMsgUDPAddrPort addr handling

WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets.
An IPv4 target address will be converted to an IPv4-mapped IPv6 address.

Fixes #52264.

Change-Id: Ib9ed4c61fa1289ae7bbc8c4c9de1a9951b647ec0
GitHub-Last-Rev: 6776fdb0a76faa71ebde58f5143fb1ffb3112adf
GitHub-Pull-Request: golang/go#52265
Reviewed-on: https://go-review.googlesource.com/c/go/+/399454
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
22 months agodoc/go1.19: note that updated race syso files require GNU ld 2.26
Ian Lance Taylor [Tue, 26 Jul 2022 19:50:02 +0000 (12:50 -0700)]
doc/go1.19: note that updated race syso files require GNU ld 2.26

For #54060

Change-Id: I6360565056d7fb7110ff00b0f3f9a3fc02ba7f2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/419595
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agobytes: document that Reader.Reset affects the result of Size
Muhammed Can Küçükaslan [Sun, 24 Jul 2022 21:44:11 +0000 (21:44 +0000)]
bytes: document that Reader.Reset affects the result of Size

The Reader.Reset changes the underlying byte slice, so it actually
changes the return value of the Size method.

Fixes #54018

Change-Id: I160deaa2244e95cb93303cb5dfb67a8d90a375ef
GitHub-Last-Rev: b04724a072d956db1f84a8f5db0afa0dbb158e96
GitHub-Pull-Request: golang/go#54020
Reviewed-on: https://go-review.googlesource.com/c/go/+/419237
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

22 months agoruntime/cgo: use frame address to set g0 stack bound
Cherry Mui [Mon, 25 Jul 2022 15:02:56 +0000 (11:02 -0400)]
runtime/cgo: use frame address to set g0 stack bound

For a cgo binary, at startup we set g0's stack bounds using the
address of a local variable (&size) in a C function x_cgo_init and
the stack size from pthread_attr_getstacksize. Normally, &size is
an address within the current stack frame. However, when  it is
compiled with ASAN, it may be instrumented to __asan_stack_malloc_0
and the address may not live in the current stack frame, causing
the stack bound to be set incorrectly, e.g. lo > hi.

Using __builtin_frame_address(0) to get the stack address instead.

Change-Id: I41df929e5ed24d8bbf3e15027af6dcdfc3736e37
Reviewed-on: https://go-review.googlesource.com/c/go/+/419434
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agocmd/compile: fix blank label code
Keith Randall [Sun, 24 Jul 2022 16:48:56 +0000 (09:48 -0700)]
cmd/compile: fix blank label code

When checkEnabled is forced true, the 52278 test fails. Be a bit
more careful about processing blank labels.

Update #52278

Change-Id: I48aa89e2c9e3715d8efe599bc4363b5b5879d8a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/419318
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
22 months agoruntime: fix runtime.Breakpoint() on windows/arm64
qmuntal [Thu, 21 Jul 2022 10:18:51 +0000 (12:18 +0200)]
runtime: fix runtime.Breakpoint() on windows/arm64

Fixes #53837

Change-Id: I4219fe35aac1a88aae2905998fbb1d7db87bbfb2
Reviewed-on: https://go-review.googlesource.com/c/go/+/418734
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com>

22 months ago[dev.unified] cmd/compile: add method expressions to dictionaries
Matthew Dempsky [Sun, 24 Jul 2022 06:54:15 +0000 (23:54 -0700)]
[dev.unified] cmd/compile: add method expressions to dictionaries

This CL changes method expressions that use derived-type receiver
parameters to use dictionary lookups.

Change-Id: Iacd09b6d77a2d3000438ec8bc9b5af2a0b068aa7
Reviewed-on: https://go-review.googlesource.com/c/go/+/419455
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile: remove obsolete RTTI wiring
Matthew Dempsky [Sat, 23 Jul 2022 07:00:49 +0000 (00:00 -0700)]
[dev.unified] cmd/compile: remove obsolete RTTI wiring

Comparisons between interface-typed and non-interface-typed
expressions no longer happen within Unified IR since CL 415577, so
this code path is no longer needed.

Change-Id: I075dfd1e6c34799f32766ed052eab0710bc6cbd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/419454
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agocmd/go: add space after comma in 'go help test'
Justin Traglia [Wed, 20 Jul 2022 14:20:41 +0000 (14:20 +0000)]
cmd/go: add space after comma in 'go help test'

This PR fixes a simple typo. It adds a space after a comma. Noticed while looking at `go help test` output.

Change-Id: I5b54f4da0d08a056bffc04899983d858dfa91043
GitHub-Last-Rev: da9cab5eb946523b8783aafe4f05f516e4a77437
GitHub-Pull-Request: golang/go#53931
Reviewed-on: https://go-review.googlesource.com/c/go/+/418034
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
22 months agodoc/go1.19: minor fixes
Tobias Klauser [Fri, 22 Jul 2022 21:35:41 +0000 (23:35 +0200)]
doc/go1.19: minor fixes

EM_LONGARCH and R_LARCH_* are defined in package debug/elf. Change the
definition list title accordingly.

Format links sort.Find and sort.Search as code.

Add a link to syscall.Getrusage.

Change-Id: I30602baedda8ccac028101858a608f1d8ffb633b
Reviewed-on: https://go-review.googlesource.com/c/go/+/419214
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
22 months agotime: clarify documentation for allowed formats and add tests to prove them
Marcus Watkins [Thu, 21 Jul 2022 18:38:51 +0000 (12:38 -0600)]
time: clarify documentation for allowed formats and add tests to prove them

The existing documentation for the time.Layout const states "Only these values
are recognized", but then doesn't include the numeric forms for month leading to
ambiguity and assumptions that may not be true. It's unclear, for example,
that space padding is only available for day of the month.

Finally I add tests to show the behaviors in specific scenarios.

Change-Id: I4e08a14834c17b6bdf3b6b47d39dafa8c1a138fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/418875
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>

22 months agointernal/fuzz: fix typo in function comments
Abirdcfly [Sun, 24 Jul 2022 15:05:37 +0000 (15:05 +0000)]
internal/fuzz: fix typo in function comments

The correct word to use here is 'retrieve' not 'retrive'

Change-Id: I8de0961a254cf429ddbaf599fe996155e24c7af2
GitHub-Last-Rev: 65aaeec8db14c23e7bc8a62ce9ecfde98a263a49
GitHub-Pull-Request: golang/go#54026
Reviewed-on: https://go-review.googlesource.com/c/go/+/419317
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

22 months agodoc/go1.19: expand crypto release notes
Filippo Valsorda [Sun, 24 Jul 2022 13:48:29 +0000 (15:48 +0200)]
doc/go1.19: expand crypto release notes

Not included are the following changes that were backported to Go 1.18
minor releases.

bb1f441618 crypto/rand: properly handle large Read on windows
35998c0109 crypto/x509: only disable SHA-1 verification for certificates
0fca8a8f25 crypto/x509: fix Certificate.Verify crash
fe4de36198 crypto/tls: randomly generate ticket_age_add
37065847d8 crypto/elliptic: tolerate zero-padded scalars in generic P-256
9a53b472b5 crypto/x509: properly handle issuerUniqueID and subjectUniqueID

The following are the benchmarks to back up the 3x speedup claim in the
crypto/elliptic notes.

name                    old time/op    new time/op    delta
pkg:crypto/elliptic goos:darwin goarch:arm64
ScalarBaseMult/P256-8   18.3µs Â± 0%    18.2µs Â± 0%      -0.56%  (p=0.000 n=10+10)
ScalarBaseMult/P224-8    233µs Â± 0%      74µs Â± 0%     -68.09%  (p=0.000 n=9+10)
ScalarBaseMult/P384-8    805µs Â± 0%     236µs Â± 0%     -70.73%  (p=0.000 n=8+10)
ScalarBaseMult/P521-8   2.50ms Â± 0%    0.68ms Â± 0%     -72.63%  (p=0.000 n=10+8)
ScalarMult/P256-8       68.4µs Â± 0%    68.6µs Â± 0%      +0.26%  (p=0.000 n=10+10)
ScalarMult/P224-8        234µs Â± 0%     231µs Â± 0%      -1.18%  (p=0.000 n=10+8)
ScalarMult/P384-8        805µs Â± 0%     805µs Â± 0%        ~     (p=0.211 n=9+10)
ScalarMult/P521-8       2.50ms Â± 0%    2.49ms Â± 0%      -0.69%  (p=0.000 n=10+10)
pkg:crypto/ecdsa goos:darwin goarch:arm64
Sign/P256-8             31.9µs Â± 1%    31.7µs Â± 0%      -0.64%  (p=0.001 n=10+10)
Sign/P224-8              264µs Â± 0%     106µs Â± 0%     -60.09%  (p=0.000 n=10+10)
Sign/P384-8              884µs Â± 0%     313µs Â± 0%     -64.53%  (p=0.000 n=9+10)
Sign/P521-8             2.64ms Â± 0%    0.84ms Â± 0%     -68.13%  (p=0.000 n=9+9)
Verify/P256-8           91.6µs Â± 0%    91.7µs Â± 0%        ~     (p=0.052 n=10+10)
Verify/P224-8            486µs Â± 0%     300µs Â± 0%     -38.15%  (p=0.000 n=9+9)
Verify/P384-8           1.66ms Â± 0%    1.01ms Â± 0%     -39.12%  (p=0.000 n=10+9)
Verify/P521-8           5.12ms Â± 1%    3.06ms Â± 0%     -40.27%  (p=0.000 n=10+10)
GenerateKey/P256-8      19.6µs Â± 0%    19.4µs Â± 0%      -0.79%  (p=0.000 n=10+10)
GenerateKey/P224-8       235µs Â± 0%      76µs Â± 1%     -67.45%  (p=0.000 n=8+10)
GenerateKey/P384-8       807µs Â± 0%     239µs Â± 0%     -70.43%  (p=0.000 n=9+10)
GenerateKey/P521-8      2.49ms Â± 0%    0.69ms Â± 0%     -72.36%  (p=0.000 n=9+10)

Change-Id: I7fb2db3aea4aac785a48d45fff7a32909f3b578c
Reviewed-on: https://go-review.googlesource.com/c/go/+/419355
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
22 months agoruntime: fix typo in function comments
Abirdcfly [Sun, 24 Jul 2022 13:41:16 +0000 (13:41 +0000)]
runtime: fix typo in function comments

The correct word to use here is 'receive' not 'recieve'

Change-Id: Ia33e2a91c1c2da6dbe479a05518dbb9b8733d20d
GitHub-Last-Rev: e3c3e211dd7055d1dab8699a88d0b35c459da149
GitHub-Pull-Request: golang/go#54025
Reviewed-on: https://go-review.googlesource.com/c/go/+/419316
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>

22 months agocmd/compile/internal/noder: correct spelling errors for instantiation
jacobishao [Sun, 24 Jul 2022 12:38:48 +0000 (12:38 +0000)]
cmd/compile/internal/noder: correct spelling errors for instantiation

Change-Id: I8091b3181e6dd0c335763c411a6a64026fe5a651
GitHub-Last-Rev: 505c6caa9cd4538f76dde4287b9266e8947e395e
GitHub-Pull-Request: golang/go#54024
Reviewed-on: https://go-review.googlesource.com/c/go/+/419315
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>

22 months agocmd/compile: make jump table symbol local
Cherry Mui [Thu, 21 Jul 2022 22:23:39 +0000 (18:23 -0400)]
cmd/compile: make jump table symbol local

When using plugins, if the plugin and the main executable both
have the same function, and if it uses jump table, currently the
jump table symbol have the same name so it will be deduplicated by
the dynamic linker. This causes a function in the plugin may (in
the middle of the function) jump to the function with the same name
in the main executable (or vice versa). But the function may be
compiled slightly differently, because the plugin needs to be PIC.
Jumping from the middle of one function to the other will not work.
Avoid this problem by marking the jump table symbol local to a DSO.

Fixes #53989.

Change-Id: I2b573b9dfc22401c8a09ffe9b9ea8bb83d3700ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/418960
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile: make Unified IR always writes concrete type for const...
Cuong Manh Le [Wed, 20 Jul 2022 13:27:58 +0000 (20:27 +0700)]
[dev.unified] cmd/compile: make Unified IR always writes concrete type for const exprs

So we don't have to depend on typecheck pass to fixup the concrete
type for some constant expressions. Previously, the problem won't show up,
until CL 418475 sent, which removes an un-necessary type conversion in
"append(a, b...) to help the optimization kicks in.

For #53888

Change-Id: Idaecd38b7abbaa3ad5b00ff3b1fb0fd8bbeb6726
Reviewed-on: https://go-review.googlesource.com/c/go/+/418514
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agoA+C: delete AUTHORS and CONTRIBUTORS
Russ Cox [Fri, 22 Jul 2022 15:10:23 +0000 (11:10 -0400)]
A+C: delete AUTHORS and CONTRIBUTORS

In 2009, Google's open-source lawyers asked us to create the AUTHORS
file to define "The Go Authors", and the CONTRIBUTORS file was in
keeping with open source best practices of the time.

Re-reviewing our repos now in 2022, the open-source lawyers are
comfortable with source control history taking the place of the
AUTHORS file, and most open source projects no longer maintain
CONTRIBUTORS files.

To ease maintenance, remove AUTHORS and CONTRIBUTORS from all repos.

For #53961.

Change-Id: I332327afb49c45d54e71e018193fb18b09e5d91a
Reviewed-on: https://go-review.googlesource.com/c/go/+/419114
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agounsafe: document when Sizeof/Offsetof/Alignof are not constant
Ian Lance Taylor [Sat, 16 Jul 2022 22:51:25 +0000 (15:51 -0700)]
unsafe: document when Sizeof/Offsetof/Alignof are not constant

They are not constant if their arguments have types that are variable size.

Fixes #53921

Change-Id: I2d46754c27f55a281331c099a11ea3cd85ec4e89
Reviewed-on: https://go-review.googlesource.com/c/go/+/417917
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agonet/http: remove accidental heading in Head documentation
Dmitri Shuralyov [Thu, 21 Jul 2022 21:09:35 +0000 (17:09 -0400)]
net/http: remove accidental heading in Head documentation

This short sentence was missing a period at the end, which caused it
to be interpreted as a heading. It also gained a '# ' prefix as part
of new gofmt formatting applied in CL 384268. This change makes it a
regular sentence as originally intended.

Updates #51082.

Change-Id: I100410cca21e4f91130f1f3432327bb6d66b12a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/418959
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
22 months agocmd/dist: enable race detector test on S390X
Cherry Mui [Thu, 21 Jul 2022 19:11:13 +0000 (15:11 -0400)]
cmd/dist: enable race detector test on S390X

The support was added but the test was not enabled. Enable it.

Fixes #53981.

Change-Id: I81ea73ea4ebc1013c35cb70ae88b096e02497887
Reviewed-on: https://go-review.googlesource.com/c/go/+/418914
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agocmd/cgo: allow cgo to pass strings or []bytes bigger than 1<<30
Keith Randall [Wed, 20 Jul 2022 19:46:33 +0000 (12:46 -0700)]
cmd/cgo: allow cgo to pass strings or []bytes bigger than 1<<30

There's no real reason to limit to 1<<30 bytes. Maybe it would catch
some mistakes, but probably ones that would quickly manifest in other
ways.

We can't use the fancy new unsafe.Slice function because this code
may still be generated for people with 1.16 or earlier in their go.mod file.
Use unsafe shenanigans instead.

Fixes #53965
Fixes #53958

Change-Id: Ibfa095192f50276091d6c2532e8ccd7832b57ca8
Reviewed-on: https://go-review.googlesource.com/c/go/+/418557
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agotest: use go tool from tree, not path
Keith Randall [Tue, 19 Jul 2022 22:35:51 +0000 (15:35 -0700)]
test: use go tool from tree, not path

Some of our tests do exec.Command("go", "tool", "compile", ...) or
similar. That "go" is selected from PATH. When run.go is started
from the command line (but not from all.bash), the first "go" is whatever
happens to be first in the user's path (some random older version than
tip). We really want all these tests to use the "go" tool from the
source tree under test. Add GOROOT/bin to the front of the path to
ensure that the tools we use come from the source tree under test.

Change-Id: I609261a4add8cd5cb228316752d52b5499aec963
Reviewed-on: https://go-review.googlesource.com/c/go/+/418474
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months agocmd/compile: improve GOAMD64=v1 violation test
Keith Randall [Fri, 8 Jul 2022 16:41:14 +0000 (09:41 -0700)]
cmd/compile: improve GOAMD64=v1 violation test

Add more opcodes that are only available in >v1 modes.

This test will now correctly detect the regression in -race mode
for #53743.

Change-Id: Icfbb1384e4333d7b4ff167c9ebcb6f4c7aeb6134
Reviewed-on: https://go-review.googlesource.com/c/go/+/416477
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
22 months agoMerge "[dev.unified] all: merge master (8e1e64c) into dev.unified" into dev.unified
Gerrit Code Review [Wed, 20 Jul 2022 13:55:41 +0000 (13:55 +0000)]
Merge "[dev.unified] all: merge master (8e1e64c) into dev.unified" into dev.unified

22 months ago[dev.unified] cmd/compile/internal/reflectdata: remove hasRType's `required` param
Matthew Dempsky [Fri, 1 Jul 2022 01:48:02 +0000 (18:48 -0700)]
[dev.unified] cmd/compile/internal/reflectdata: remove hasRType's `required` param

Unified IR now always provides RTTI needed by the backend, no need to
allow exceptions anymore. ðŸ¥³

Change-Id: Ie1ba42c81f92cc43e1b01b3289de10e261ccef57
Reviewed-on: https://go-review.googlesource.com/c/go/+/415576
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
22 months ago[dev.unified] cmd/compile/internal/noder: simplify mixed tag/case RTTI wiring
Matthew Dempsky [Mon, 18 Jul 2022 20:45:57 +0000 (13:45 -0700)]
[dev.unified] cmd/compile/internal/noder: simplify mixed tag/case RTTI wiring

The previous CL largely removed the need for worrying about mixed
tag/case comparisons in switch statements by ensuring they're always
converted to a common type, except for one annoying case: switch
statements with an implicit `true` tag, and case values of interface
type (which must be empty interface, because `bool`'s method set is
empty).

It would be simpler to have writer.go desugar the implicit `true`
itself, because we already handle explicit `true` correctly. But the
existing code already works fine, and I don't want to add further
complexity to writer.go until dictionaries and stenciling is done.

Change-Id: Ia8d44c425b1be7fc578cd570d15a7560fe9d2674
Reviewed-on: https://go-review.googlesource.com/c/go/+/418102
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
22 months ago[dev.unified] cmd/compile/internal/noder: better switch statements
Matthew Dempsky [Mon, 18 Jul 2022 19:28:11 +0000 (12:28 -0700)]
[dev.unified] cmd/compile/internal/noder: better switch statements

Walk desugars switch statements into a bunch of OEQ comparisons, and
sometimes (although rarely in practice) this currently requires
converting the tag value to the case value's type. And because this
conversion is inserted during walk, unified IR can't wire up
appropriate RTTI operands for the conversion.

As a simple solution, if any of the case values are *not* assignable
to the tag value's type, we instead convert them all to `any`. This
works because `any(x) == any(y)` yields the same value as `x == y`, as
long as neither `x` nor `y` are `nil`.

We never have to worry about `x` or `y` being `nil` either, because:

1. `switch nil` is invalid, so `x` can never be `nil`.

2. If the tag type is a channel, map, or function type, they
can *only* be compared against `nil`; so the case values will always
be assignable to the tag value's type, and so we won't convert to
`any`.

3. For other nullable types, the previous commit (adding explicit
`nil` handling to unified IR) ensures that `case nil:` is actually
treated as `case tagType(nil):`.

Change-Id: I3adcb9cf0d42a91a12b1a163c58d4133a24fca5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/418101
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
22 months ago[dev.unified] cmd/compile/internal/noder: explicit nil handling
Matthew Dempsky [Mon, 18 Jul 2022 20:13:46 +0000 (13:13 -0700)]
[dev.unified] cmd/compile/internal/noder: explicit nil handling

Currently, uses of "nil" are handling as references to cmd/compile's
own untyped "nil" object, and then we rely on implicitly converting
that to its appropriate type. But there are cases where this can
subtly go wrong (e.g., the switch test case added in the previous CL).

Instead, explicitly handling "nil" expressions so that we can
construct them directly with the appropriate type, as computed already
by types2.

Change-Id: I587f044f60f24e87525dde6d7dad6c58f14478de
Reviewed-on: https://go-review.googlesource.com/c/go/+/418100
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
22 months ago[dev.unified] test: add switch test case for tricky nil handling
Matthew Dempsky [Mon, 18 Jul 2022 20:02:02 +0000 (13:02 -0700)]
[dev.unified] test: add switch test case for tricky nil handling

The next CL will change Unified IR's switch statement handling to
convert values to empty interface in some tricky cases. My initial
attempt at this accidentally mishandled `case nil:` in some cases, and
this wasn't caught by any existing tests. So this CL adds one.

Change-Id: Idcfaf0e869dca91be46d665e65d4623dc52bb60f
Reviewed-on: https://go-review.googlesource.com/c/go/+/418099
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>

22 months ago[dev.unified] cmd/compile/internal/noder: preserve RTTI for select statements
Matthew Dempsky [Mon, 18 Jul 2022 19:41:56 +0000 (12:41 -0700)]
[dev.unified] cmd/compile/internal/noder: preserve RTTI for select statements

In a select statement, `case i = <-c: ...` may require an implicit
conversion of the received value to i's type, but walk does not expect
a conversion here. Instead, typecheck actually discards the
conversion (resulting in ill-typed IR), and then relies on it being
reinserted later when walk desugars the assignment.

However, that might lose the explicit RTTI operands we've set for
conversions to interface type, so explicitly introduce a temporary
variable and rewrite as `case tmp := <-c: i = tmp; ...`, which is
semantically equivalent and allows the `i = tmp` assignment to
maintain the explicit RTTI without confusing the rest of the compiler
frontend.

Change-Id: Ie6c4dc9b19437e83970cd3ce83420813b8a47dc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/418098
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
22 months ago[dev.unified] cmd/compile/internal/noder: wire RTTI for implicit conversions
Matthew Dempsky [Fri, 1 Jul 2022 00:58:47 +0000 (17:58 -0700)]
[dev.unified] cmd/compile/internal/noder: wire RTTI for implicit conversions

This CL updates Unified IR to set the TypeWord and SrcRType fields on
interface conversions, which will be necessary for dictionary support
shortly.

Change-Id: I9486b417f514ba4ec2ee8036194aa9ae3ad0ad93
Reviewed-on: https://go-review.googlesource.com/c/go/+/415575
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] cmd/compile/internal/noder: implicit conversions for binary exprs
Matthew Dempsky [Fri, 1 Jul 2022 02:16:23 +0000 (19:16 -0700)]
[dev.unified] cmd/compile/internal/noder: implicit conversions for binary exprs

Binary operations (except for shifts) require one operand to be
assignable to the other's type. In particular, for equality
comparisons, this can imply a conversion to interface type.

Change-Id: Ic973c8287a40fdaefcf11458378574fdcd243b17
Reviewed-on: https://go-review.googlesource.com/c/go/+/415577
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
22 months ago[dev.unified] test: relax panic message expectations
Matthew Dempsky [Mon, 18 Jul 2022 02:53:19 +0000 (19:53 -0700)]
[dev.unified] test: relax panic message expectations

In this test, traditionally the comparison `*l == r[0]` was left as a
comparison between `*l` (type `any`) and `r[0]` (type `*int`), and the
rest of the compiler needed to handle mixed-typed comparisons.
However, this means more complexity for wiring up explicit rtypes.

To simplify rtype handling, the next CL will change unified IR to
instead handle the expression as `*l == any(r[0])`. However, a
consequence of this currently is that walk will now sequence the
`any(r[0])` expression first, because it involves a
concrete-to-interface conversion. And in turn, this means the `r[0]`
panic ("index out of bounds") will take priority over the `*l`
panic ("nil pointer dereference").

This is a change in user-visible semantics in some cases, but the Go
spec leaves this unspecified, so it shouldn't be an issue. Note also:
gccgo has the same behavior (i.e., panicking on index out of bounds,
not nil pointer dereference), and cmd/compile also already has the
same behavior when the interface conversion is explicit (as in the
added "nil pointer dereference #3" test case).

Updates #23735.
Updates #32187.

Change-Id: I49e5dcca85b4680f9c8780ef0013e64254d38fe5
Reviewed-on: https://go-review.googlesource.com/c/go/+/418097
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
22 months ago[dev.unified] cmd/compile/internal/noder: prefer *At functions
Matthew Dempsky [Mon, 18 Jul 2022 19:15:09 +0000 (12:15 -0700)]
[dev.unified] cmd/compile/internal/noder: prefer *At functions

Unified IR tries to avoid depending on base.Pos, so we should prefer
explicit position arguments wherever possible.

Change-Id: I7163b1b8c5244fe7c2a7989e6a3f459a21a23e81
Reviewed-on: https://go-review.googlesource.com/c/go/+/418096
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

22 months ago[dev.unified] all: merge master (8e1e64c) into dev.unified
David Chase [Tue, 19 Jul 2022 20:55:13 +0000 (16:55 -0400)]
[dev.unified] all: merge master (8e1e64c) into dev.unified

Conflicts:

- test/run.go
Conflicts in the known-fails list, plus removed a test from the known-fails that now works.

Merge List:

+ 2022-07-19 8e1e64c16a cmd/compile: fix mknode script
+ 2022-07-19 28be440d34 A+C: add Weizhi Yan
+ 2022-07-19 85a482fc24 runtime: revert to using the precomputed trigger for pacer calculations
+ 2022-07-19 ae7340ab68 CONTRIBUTORS: update for the Go 1.19 release
+ 2022-07-18 de8101d21b runtime: fix typos
+ 2022-07-18 967a3d985d cmd/compile: revert "remove -installsuffix flag"
+ 2022-07-18 c0c1bbde17 http: improve Get documentation
+ 2022-07-15 2aa473cc54 go/types, types2: correct alignment of atomic.Int64
+ 2022-07-15 4651ebf961 encoding/gob: s/TestIngoreDepthLimit/TestIgnoreDepthLimit/
+ 2022-07-14 dc00aed6de go/parser: skip TestParseDepthLimit for short tests
+ 2022-07-14 783ff7dfc4 encoding/xml: skip TestCVE202230633 for short tests
+ 2022-07-14 aa80228526 cmd/go/internal/modfetch: avoid duplicating path components in Git fetch errors
+ 2022-07-14 b9d5a25442 cmd/go: save zip sums for downloaded modules in 'go mod download' in a workspace
+ 2022-07-14 a906d3dd09 cmd/go: avoid re-enqueuing workspace dependencies with errors
+ 2022-07-14 266c70c263 doc/go1.19: add a release note for 'go list -json=SomeField'
+ 2022-07-13 558785a0a9 cmd/compile: remove -installsuffix flag
+ 2022-07-13 1355ea3045 cmd/compile: remove -importmap flag
+ 2022-07-13 f71f3d1b86 misc/cgo/testshared: run tests only in GOPATH mode
+ 2022-07-13 feada53661 misc/cgo/testcshared: don't rely on an erroneous install target in tests
+ 2022-07-13 c006b7ac27 runtime: clear timerModifiedEarliest when last timer is deleted
+ 2022-07-13 923740a8cc cmd/compile: fix type assert in dict pass
+ 2022-07-12 bf2ef26be3 cmd/go: in script tests, avoid checking non-main packages for staleness
+ 2022-07-12 5f5cae7200 cmd/go: avoid indexing GOROOT packages when the compiler is 'gccgo'
+ 2022-07-12 c2edb2c841 cmd/go: port TestIssue16471 to a script test and add verbose logging
+ 2022-07-12 9c2526e637 cmd/go/internal/modfetch/codehost: add missing newline in '# lock' log message
+ 2022-07-12 85486bcccb image/jpeg: increase TestLargeImageWithShortData timeout by an order of magnitude
+ 2022-07-12 27794c4d4a cmd/go/internal/modload: ignore disallowed errors when checking for updates
+ 2022-07-12 b2b8872c87 compress/gzip: fix stack exhaustion bug in Reader.Read
+ 2022-07-12 ac68c6c683 path/filepath: fix stack exhaustion in Glob
+ 2022-07-12 fa2d41d0ca io/fs: fix stack exhaustion in Glob
+ 2022-07-12 6fa37e98ea encoding/gob: add a depth limit for ignored fields
+ 2022-07-12 695be961d5 go/parser: limit recursion depth
+ 2022-07-12 08c46ed43d encoding/xml: use iterative Skip, rather than recursive
+ 2022-07-12 c4c1993fd2 encoding/xml: limit depth of nesting in unmarshal
+ 2022-07-12 913d05133c cmd/go: avoid spurious readdir during fsys.Walk
+ 2022-07-12 d3d7998756 net/http: clarify that MaxBytesReader returns *MaxBytesError
+ 2022-07-11 126c22a098 syscall: gofmt after CL 412114
+ 2022-07-11 123a6328b7 internal/trace: don't report regions on system goroutines
+ 2022-07-11 846490110a runtime/race: update amd64 syso images to avoid sse4
+ 2022-07-11 b75ad09cae cmd/trace: fix typo in web documentation
+ 2022-07-11 7510e597de cmd/go: make module index loading O(1)
+ 2022-07-11 b8bf820d5d cmd/nm: don't rely on an erroneous install target in tests
+ 2022-07-11 ad641e8521 misc/cgo/testcarchive: don't rely on an erroneous install target in tests
+ 2022-07-11 bf5898ef53 net/url: use EscapedPath for url.JoinPath
+ 2022-07-11 398dcd1cf0 database/sql: make TestTxContextWaitNoDiscard test more robust
+ 2022-07-11 f956941b0f cmd/go: use package index for std in load.loadPackageData
+ 2022-07-11 59ab6f351a net/http: remove Content-Encoding in writeNotModified
+ 2022-07-08 c1a4e0fe01 cmd/compile: fix libfuzzer instrumentation line number
+ 2022-07-08 5c1a13e7a4 cmd/go: avoid setting variables for '/' and ':' in TestScript subprocess environments
+ 2022-07-08 180bcad33d net/http: wait for listeners to exit in Server.Close and Shutdown
+ 2022-07-08 14abe8aa73 cmd/compile: don't convert to interface{} for un-comparable types in generic switch
+ 2022-07-07 1ebc983000 runtime: overestimate the amount of allocated memory in heapLive
+ 2022-07-07 c177d9d98a crypto/x509: restrict CRL number to <=20 octets
+ 2022-07-07 486fc01770 crypto/x509: correctly parse CRL entry extensions
+ 2022-07-07 8ac58de185 crypto/x509: populate Number and AKI of parsed CRLs
+ 2022-07-07 0c7fcf6bd1 cmd/link: explicitly disable PIE for windows/amd64 -race mode
+ 2022-07-07 eaf2125654 cmd/go: default to "exe" build mode for windows -race
+ 2022-07-06 1243ec9c17 cmd/compile: only check implicit dots for method call enabled by a type bound
+ 2022-07-06 c391156f96 cmd/go: set up git identity for build_buildvcs_auto.txt
+ 2022-07-06 2acd3646fc cmd/compile: rework induction variable detector
+ 2022-07-06 53a4152d47 os/exec: clarify that Wait must be called
+ 2022-07-06 177306f630 cmd/internal/notsha256: add purego tag as needed
+ 2022-07-06 f4755fc733 cmd/dist: use purego tag when building the bootstrap binaries
+ 2022-07-06 4484c30f78 misc/cgo/test: make TestSetgidStress cheaper
+ 2022-07-06 2007599dc8 test: recognize new gofrontend error message
+ 2022-07-05 d602380f58 cmd/compile: drop "buildcfg" from no instrument packages
+ 2022-07-05 c111091071 cmd/go: make module@nonexistentversion failures reusable
+ 2022-07-05 5f305ae8e5 cmd/go: add -reuse flag to make proxy invocations more efficient
+ 2022-07-05 84e091eef0 cmd/go: record origin metadata during module download
+ 2022-07-04 ceda93ed67 build/constraint: update doc to mention a feature added in Go 1.17
+ 2022-07-04 3cf79d9610 runtime: pass correct string to exits on Plan 9
+ 2022-07-01 e822b1e26e net/http: omit invalid header value from error message
+ 2022-07-01 4a2a3bca18 cmd/go, go/build: clarify build constraint docs
+ 2022-07-01 9a4d5357f4 flag: highlight support for double dashes in docs
+ 2022-07-01 c847a2c9f0 go/types, types2: document that exported predicates are unspecified for invalid type arguments
+ 2022-06-30 405c269b85 go/types, types2: re-enable a couple of commented out tests
+ 2022-06-30 aad9382e59 go/doc/comment: support links in lists in comments
+ 2022-06-30 af725f4286 os: fix a typo in path_windows.go

Change-Id: I381728322188aca0bfa81a946d6aedda8c07903c

22 months agocrypto/internal/nistec,debug/gosym: fix typos
Dan Kortschak [Sat, 16 Jul 2022 23:13:55 +0000 (08:43 +0930)]
crypto/internal/nistec,debug/gosym: fix typos

Change-Id: I228a23754656b41843573bd4217de4df46c9df36
Reviewed-on: https://go-review.googlesource.com/c/go/+/417954
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

22 months agocmd/compile: fix mknode script
Keith Randall [Tue, 19 Jul 2022 16:07:38 +0000 (09:07 -0700)]
cmd/compile: fix mknode script

It's not currently working. Somehow a field of type []constant.Value
causes it to barf. (That field was added with jump table statements.)

Also added some instructions about how to run it correctly (which took
me a suprisingly long time to figure out).

Larger improvements coming, but this gets us to a working state
and is safe for 1.19.

Change-Id: I3027356fde1294942e87d075ca28bb40d2c0d6c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/418234
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Keith Randall <khr@golang.org>

22 months ago[dev.unified] test: change Unicode file/package name to use characters not translated...
David Chase [Tue, 19 Jul 2022 19:20:55 +0000 (15:20 -0400)]
[dev.unified] test: change Unicode file/package name to use characters not translated by macOS.

In filenames, macOS translates Ã„ (U+00c4, c3 84) to Ã„ (U+0041 U+0308, 41 cc 88).
This causes problems for run.go's crude rules for testing the compiler.

Fixes #53954.

Change-Id: I850421cbf07e022ca5ff8122e0fb4e80deb55adf
Reviewed-on: https://go-review.googlesource.com/c/go/+/418334
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>