Felix Geisendörfer [Fri, 30 Aug 2024 06:17:19 +0000 (08:17 +0200)]
runtime: fix GoroutineProfile stacks not getting null terminated
Fix a regression introduced in CL 572396 causing goroutine stacks not
getting null terminated.
This bug impacts callers that reuse the []StackRecord slice for multiple
calls to GoroutineProfile. See https://github.com/felixge/fgprof/issues/33
for an example of the problem.
Add a test case to prevent similar regressions in the future. Use null
padding instead of null termination to be consistent with other profile
types and because it's less code to implement. Also fix the
ThreadCreateProfile code path.
Fixes #69243
Change-Id: I0b9414f6c694c304bc03a5682586f619e9bf0588
Reviewed-on: https://go-review.googlesource.com/c/go/+/609815 Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Felix Geisendörfer [Sat, 7 Sep 2024 11:44:09 +0000 (13:44 +0200)]
runtime: fix MutexProfile missing root frames
Fix a regression introduced in CL 598515 causing runtime.MutexProfile
stack traces to omit their root frames.
In most cases this was merely causing the `runtime.goexit` frame to go
missing. But in the case of runtime._LostContendedRuntimeLock, an empty
stack trace was being produced.
Add a test that catches this regression by checking for a stack trace
with the `runtime.goexit` frame.
Also fix a separate problem in expandFrame that could cause
out-of-bounds panics when profstackdepth is set to a value below 32.
There is no test for this fix because profstackdepth can't be changed at
runtime right now.
Fixes #69335
Change-Id: I1600fe62548ea84981df0916d25072c3ddf1ea1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/611615 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Nick Ripley <nick.ripley@datadoghq.com> Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Tim King [Thu, 5 Sep 2024 23:22:50 +0000 (16:22 -0700)]
all: enable alias type parameters GOEXPERIMENT by default
For #68778
Change-Id: I4b39f84665262251ca014d3f5fe74b2fd434d51e
Reviewed-on: https://go-review.googlesource.com/c/go/+/613236
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Commit-Queue: Tim King <taking@google.com> Reviewed-by: David Chase <drchase@google.com>
Keith Randall [Tue, 24 Sep 2024 22:11:54 +0000 (15:11 -0700)]
runtime: print fatal messages without interleaving
Grab the print lock around the set of prints we use to report
fatal errors. This ensures that each fatal error gets reported
atomically instead of interleaved with other fatal errors.
Fixes #69447
Change-Id: Ib3569f0c8210fd7e19a7d8ef4bc114f07469f317
Reviewed-on: https://go-review.googlesource.com/c/go/+/615655
Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Robert Griesemer [Tue, 24 Sep 2024 21:08:28 +0000 (14:08 -0700)]
go/types, types2: move Checker.indexedElts into literals.go where it belongs
The function is only used by Checker.compositeLit.
Also, now its go/types source can be gerated from the types2 source.
No other code changes.
Change-Id: I88b7ad371d809a5d9bf8e635d9e003ba0a71ab78
Reviewed-on: https://go-review.googlesource.com/c/go/+/615635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Robert Griesemer [Thu, 19 Sep 2024 22:20:30 +0000 (15:20 -0700)]
go/types, types2: implement underIs, coreType, coreString via typeset iterator
Remove remaining underIs methods and call underIs function instead.
Change-Id: Ic98430d3a56b85f6f4b35c4508c4c67dafbfa3f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/614240 Reviewed-by: Tim King <taking@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Change-Id: Ibb526693dce4e867dabd92e5ace38a1adf18f401
GitHub-Last-Rev: d7dc3362717f4ddae2c026016812008d25783f4f
GitHub-Pull-Request: golang/go#69583
Reviewed-on: https://go-review.googlesource.com/c/go/+/614935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com>
cmd/compile: small cleanups to rewrite rule helpers
Change-Id: I50a19bd971176598bf8e4ef86ec98f008abe245c
Reviewed-on: https://go-review.googlesource.com/c/go/+/615198 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@google.com>
cmd/compile: use generics for isPowerOfTwo predicates
Change-Id: I097b53e9f13de6ff6eb18ae2261842b097f26390
Reviewed-on: https://go-review.googlesource.com/c/go/+/615197
Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
khr@golang.org [Mon, 5 Aug 2024 18:22:07 +0000 (11:22 -0700)]
cmd/compile: simplify naming for arm64 bitfield accessors
They are already methods on an arm64-specific type, so they don't
need to have arm64-specific names.
Change-Id: I2be29907f9892891d88d52cced043ca248aa4e08
Reviewed-on: https://go-review.googlesource.com/c/go/+/615196
Auto-Submit: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com>
Robert Griesemer [Thu, 19 Sep 2024 21:55:36 +0000 (14:55 -0700)]
go/types, types2: introduce typeset iterators
Preparation for removing the existing non-standard iterators
(is, underIs). Note that we cannot use typeset iterators in
range-over-func because the bootstrap compiler doesn't have
access to it yet.
While at it, move underIs from expr.go to under.go
and adjust some doc strings in typset.go to match
prevailing style in that file.
Change-Id: Iecd014eeb5b3fca56a807381c148c5f7a29bfb78
Reviewed-on: https://go-review.googlesource.com/c/go/+/614239 Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Commit-Queue: Robert Griesemer <gri@google.com>
Robert Griesemer [Mon, 23 Sep 2024 20:02:16 +0000 (13:02 -0700)]
go/types, types2: check that alias type arguments satisfy constraints
Fixes #69576.
Change-Id: I8fc077970276977dd89fc2dd3867f2765d52e54e
Reviewed-on: https://go-review.googlesource.com/c/go/+/615275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Robert Griesemer [Tue, 24 Sep 2024 17:57:49 +0000 (10:57 -0700)]
go/types, types2: follow-up on comment in CL 615195
Restate deferred call for readability.
Change-Id: I3725535b18fa4f1887e6c1976f8784e092b8f965
Reviewed-on: https://go-review.googlesource.com/c/go/+/615535
Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Packages referenced by tool lines in go.mod files will now be included
in the module graph for the new "tool" package pattern and the "all"
package pattern.
For golang/go#48429
Change-Id: I128f6a50880814bd5395674426c9a7ee2ddc19bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/521959 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Robert Griesemer [Mon, 23 Sep 2024 17:46:41 +0000 (10:46 -0700)]
go/types, types2: print type parameters for Alias tyoes
Like for Named types, print type parameters for Alias types.
Add test case for Alias object string to existing test.
To make the test work, factor out the mechanism to set
GOEXPERIMENT=aliastypeparams at test time and use it
for this test as well.
No test case for un-instantiated generic type Alias type
string: there's no existing test framework, the code is
identical as for Named types, and these strings only appear
in tracing output. Tested manually.
Change-Id: I476d04d0b6a7c18b79be1d34a9e3e072941df83f
Reviewed-on: https://go-review.googlesource.com/c/go/+/615195
Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sam Thanawalla [Mon, 9 Sep 2024 17:12:02 +0000 (17:12 +0000)]
cmd/go: prevent git from fetching during local only mode
Since we added a local context to git lookups, we need to be more
careful about fetching from remote.
We should not fetch when we are stamping a binary because that could
slow down builds.
For #50603
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I81a719b7609e8d30b32ffb3c12a05074c5fd0c22
Reviewed-on: https://go-review.googlesource.com/c/go/+/611916
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Jes Cok [Thu, 23 May 2024 15:17:52 +0000 (23:17 +0800)]
reflect: slightly improve iter tests
Change-Id: Ia0e3d668a2435b2ee72e1c641092445902168e4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
All exported types in the standard library that implement the
"encoding.(Binary|Text)Marshaler" now also implement the
"encoding.(Binary|Text)Appender".
Fixes #62384
Change-Id: I7d3da8c5736a1ab9c54b9ac4bd2fbf850f9d1bd0
GitHub-Last-Rev: 5d27854725d957dd89d2ddc4342ca97999d10cb2
GitHub-Pull-Request: golang/go#69022
Reviewed-on: https://go-review.googlesource.com/c/go/+/607520
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Jes Cok [Sat, 29 Jun 2024 18:46:12 +0000 (02:46 +0800)]
encoding/asn1: unmarshal bool values correctly dealing with the ANY type
Fixes #68241
Change-Id: I1ee81aa50c2f39f535ad27309e855f19acb2f2ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/595796
Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
text/template/parse: use correct line number in error after comment
Fixes #69526
Change-Id: I42467ddec02e91f24bce87185bf8d7f16f8811b0
GitHub-Last-Rev: 039a5b6884aa65f34cecbfcd127861a703a048da
GitHub-Pull-Request: golang/go#69532
Reviewed-on: https://go-review.googlesource.com/c/go/+/614375
Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
I noticed that the comment incorrectly stated 'WriteString implemented WriteString', it should be 'implemented io.StringWriter' instead.
Change-Id: I844a8c805e5f0c32b5aea68c4bba6982f6fcc8a7
GitHub-Last-Rev: a0d93b6e9d3c2a508d1f3c0ce23e98274ec421fb
GitHub-Pull-Request: golang/go#69546
Reviewed-on: https://go-review.googlesource.com/c/go/+/614575
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Rob Pike <r@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com>
os: skip TestReadlink sub-tests requiring symlinks when not enough
permissions are held
Some of the TestReadlink sub-tests require os.Symlink to succeed.
If the user doesn't have enough permissions to create symlinks, then
there is no point in running the test.
Change-Id: I06ec7e3ddf0016e804667bba0ee6ebe6baa01872
Reviewed-on: https://go-review.googlesource.com/c/go/+/614655 Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
cmd/compile: remove obj.LSym(s) for assertI2I and assertI2I2
Change-Id: I85993a34b115a700ccdfea29df4e78c360e68b03
Reviewed-on: https://go-review.googlesource.com/c/go/+/615075 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Felix Geisendörfer [Tue, 27 Aug 2024 18:46:33 +0000 (20:46 +0200)]
internal/trace: refactor Stack.Frames to return iter.Seq
The Frames function is almost an iter.Seq, except for its bool return
value.
Since none of the callers in the Go tree rely on the bool, we can remove
it. However, doing so might still obscure the intended usage as an iterator.
This refactor changes the API to return iter.Seq, making the intended
usage explicit. Refactoring the existing callers to take advantage of
the new interface will be done in a follow-up CL.
Change-Id: I03e4d6d762910e418cc37d59a6c519eb7f39b3b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/608855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Change-Id: I2fcd04bebe80346dbd244ab7ea09cbe6010b9d8e
GitHub-Last-Rev: 5ebf615db5889a04738c555c651e07c1fd287748
GitHub-Pull-Request: golang/go#68329
Reviewed-on: https://go-review.googlesource.com/c/go/+/596956
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Song Gao [Fri, 12 Apr 2024 08:18:29 +0000 (01:18 -0700)]
archive/{zip,tar}: fix Writer.AddFS to include empty directories
This change modifies the `(*Writer).AddFS` implementation in both `archive/zip`
and `archive/tar` to always write a directory header. This fixes a bug where
any empty directories in the fs were omitted when a zip or tar archive was
created from `AddFS` method.
Fixes #66831
Change-Id: Id32c9c747f9f65ec7db4aeefeaffa83567215bfc
Reviewed-on: https://go-review.googlesource.com/c/go/+/578415
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
David du Colombier [Sun, 22 Sep 2024 13:00:36 +0000 (15:00 +0200)]
cmd/go: skip TestScript on Plan 9 in short mode
TestScript is very slow on Plan 9 because this test
is particularly i/o intensive.
This is leading the plan9/386 and plan9/amd64 builders
to time out. This test was already skipped on plan9/arm
because arm is part of the "slow architectures" list.
This change skips TestScript on Plan 9 on short mode.
Change-Id: I3e68046dac825cd14fa8daca601c492cf11c6fff
Reviewed-on: https://go-review.googlesource.com/c/go/+/614855 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
testing: enable better loop time measurement for benchmarking.
With b.Loop() in place, the time measurement of loop scaling could be improved to be tighter. By identifying the first call to b.Loop(), we can avoid measuring the expensive ramp-up time by reset the timer tightly before the loop starts. The remaining loop scaling logic of b.N style loop is largely reused.
For #61515.
Change-Id: Ia7b8f0a8838f57c00ac6c5ef779d86f8d713c9b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/612835 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
sunnymilk [Tue, 27 Aug 2024 21:23:10 +0000 (17:23 -0400)]
testing: implement testing.B.Loop
Initial implementation for testing.B.Loop,
right now the calculation of b.N are still done in the old fasion way,
as of now b.Loop is merely an alias for the old loop over b.N.
Guoqi Chen [Wed, 28 Aug 2024 09:01:15 +0000 (17:01 +0800)]
cmd/objdump: add loong64 disassembler support
This CL provides vendor support for loong64 disassembler gnu and plan9 syntax.
cd $GOROOT/src/cmd
go get golang.org/x/arch@master
go mod tidy
go mod vendor
Change-Id: Ic8b888de0aa11cba58cbf559f8f69337d1d69309
Reviewed-on: https://go-review.googlesource.com/c/go/+/609015 Reviewed-by: Meidan Li <limeidan@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
It makes use of the hiter structure which matches runtime.hiter's.
This change mainly improves the performance of Next method of MapIter.
goos: darwin
goarch: arm64
pkg: reflect
cpu: Apple M2
│ ./old.txt │ ./new.txt │
│ sec/op │ sec/op vs base │
MapIterNext-8 61.95n ± 0% 54.95n ± 0% -11.28% (p=0.000 n=10)
for the change of `test/escape_reflect.go`:
removing mapiterkey, mapiterelem would cause leaking MapIter content
when calling SetIterKey and SetIterValue,
and this may cause map bucket to be allocated on heap instead of stack.
Reproduce:
```
{
m := map[int]int{1: 2} // escapes to heap after this change
it := reflect.ValueOf(m).MapRange()
it.Next()
var k, v int
reflect.ValueOf(&k).Elem().SetIterKey(it)
reflect.ValueOf(&v).Elem().SetIterValue(it)
println(k, v)
}
```
This CL would not introduce abi.NoEscape to fix this. It may need futher
optimization and tests on hiter field usage and its escape analysis.
Fixes #69416
Change-Id: Ibaa33bcf86228070b4a505b9512680791aa59f04
Reviewed-on: https://go-review.googlesource.com/c/go/+/612616 Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sam Thanawalla [Tue, 3 Sep 2024 14:51:01 +0000 (14:51 +0000)]
cmd/go: print toolchain switching with GODEBUG=toolchaintrace
This CL introduces the ability to print information about the toolchain switch used in the
go command, controlled by the `toolchaintrace` setting. This setting defaults to `toolchaintrace=0`,
meaning no information is printed. Setting it to `toolchaintrace=1` will cause the go command
to print a message indicating the toolchain used and where it was found.
Fixes: #63939
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: Idc58e3d5bc76573aa48e1f7df352caa13004c25e
Reviewed-on: https://go-review.googlesource.com/c/go/+/610235 Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
cmd/compile: fix wrong esacpe analysis for rangefunc
CL 584596 "-range<N>" suffix to the name of closure generated for a
rangefunc loop body. However, this breaks the condition that escape
analysis uses for checking whether a closure contains within function,
which is "F.funcN" for outer function "F" and closure "funcN".
Fixing this by adding new "-rangeN" to the condition.
Fixes #69434
Fixes #69507
Change-Id: I411de8f63b69a6514a9e9504d49d62e00ce4115d
Reviewed-on: https://go-review.googlesource.com/c/go/+/614096 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
cmd/internal/obj/s390x: fix m6 field encoding for VSTRC instruction on s390x
M6 field for all extended mnemonics of VSTRC set to zero
This fixes VSTRC codegen to emit correctly and added testcases for all
the extended mnemonics.
Fixes #69216
Change-Id: I2a1b7fb61d6bd6444286eab56a506225c90b75e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/612315
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Vishwanatha HD <vishwanatha.hd@ibm.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
Change-Id: Ie3f35183e88d544559743394c34b55483fdf59aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/613775
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
go/types, types2: better error message when type argument cannot use operator
Fixes #63524
Change-Id: Id33936b9bcfb6a7333c6d084247044bba2f29219
Reviewed-on: https://go-review.googlesource.com/c/go/+/613756
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Makes it consistent with other code in net/netip, also constants
are visible through LSP hover, which makes it easier to see the size.
Change-Id: I3d02c860ac3c61cc037eaca5418297f78698c3f8
GitHub-Last-Rev: 785a8d58c372f5e1faa2e43dd1991d7040e36603
GitHub-Pull-Request: golang/go#69468
Reviewed-on: https://go-review.googlesource.com/c/go/+/613356
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
The auxiliary field could be better documented as it appears in a lot of the operands.
This CL documents and points the user to the code for further information.
Change-Id: I34a73af488358c9799e286f3b5ee4b08639ce608
Reviewed-on: https://go-review.googlesource.com/c/go/+/613615
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
Kir Kolyshkin [Sun, 15 Sep 2024 22:21:43 +0000 (15:21 -0700)]
os: TestPipeThreads: remove openbsd special case
Since CL 393354 this should no longer be necessary.
Change-Id: Ifec4ef483f9c06d9b49827327dd6708db146d886
Reviewed-on: https://go-review.googlesource.com/c/go/+/613157
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Robert Griesemer [Mon, 16 Sep 2024 20:50:24 +0000 (13:50 -0700)]
go/types, types2: slightly simplify rangeKeyVal function
Compute the signature type of an iterator function argument
only once. This eliminates the need for two separate toSig
calls.
Change-Id: Ifeb33d21e381010d2012d74eac045856f1cca312
Reviewed-on: https://go-review.googlesource.com/c/go/+/613635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
os/user: fix Current().GroupIds() for AD joined users on Windows
This CL special-case User.GroupIds to get the group IDs from the user's
token when the user is the current user.
This approach is more efficient than calling NetUserGetLocalGroups.
It is also more reliable for users joined to an Active Directory domain,
where NetUserGetLocalGroups is likely to fail.
Updates #26041.
Fixes #62712.
Cq-Include-Trybots: luci.golang.try:gotip-windows-arm64
Change-Id: If7c30287192872077b98a514bd6346dbd1a64fb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/611116 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Robert Griesemer [Mon, 16 Sep 2024 17:41:28 +0000 (10:41 -0700)]
math/big: add clarifying (internal) comment
Follow-up on CL 467555.
Change-Id: I1815b5def656ae4b86c31385ad0737f0465fa2d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/613535
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
Joel Sing [Tue, 7 Feb 2023 12:15:07 +0000 (23:15 +1100)]
math/big: simplify divBasic ujn assignment
Rather than conditionally assigning ujn, initialise ujn above the
loop to invent the leading 0 for u, then unconditionally load ujn
at the bottom of the loop. This code operates on the basis that
n >= 2, hence j+n-1 is always greater than zero.
Change-Id: I1272ef30c787ed8707ae8421af2adcccc776d389
Reviewed-on: https://go-review.googlesource.com/c/go/+/467555
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Robert Griesemer <gri@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
As https://go.dev/doc/comment#package says, every package
should have a package comment. Command cmd/preprofile had
one, it was just not being recognized due to a blank line.
For #51430.
For #58102.
Change-Id: I73e31158e0f244f6453728ab68c5c8da4cfb38b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/613375 Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
CL 612617 did speedup RuneCountInString, thus we can now use it to
speedup RuneCount, too.
name old time/op new time/op delta
RuneCountTenASCIIChars-8 8.69ns ± 1% 3.59ns ± 2% -58.66% (p=0.000 n=9+9)
RuneCountTenJapaneseChars-8 49.8ns ± 2% 40.9ns ± 0% -17.94% (p=0.000 n=10+8)
Change-Id: I311750c00efc79af35fb0ca3b482a5d94e0a7977
Reviewed-on: https://go-review.googlesource.com/c/go/+/612955 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
unicode/utf8: add test that RuneCount does zero allocations
See disccusion in CL 612955.
Change-Id: I2de582321648f1798929ffb80d2f087e41146ead
Reviewed-on: https://go-review.googlesource.com/c/go/+/613315
Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Change-Id: I00b276c5c2acb227d42a069d1af6027e4b499d31
Reviewed-on: https://go-review.googlesource.com/c/go/+/613115
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Change-Id: Ia616d43c0affa7b927ddfb53755072c94ba27917
Reviewed-on: https://go-review.googlesource.com/c/go/+/612618 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com>
Jes Cok [Fri, 13 Sep 2024 13:48:33 +0000 (13:48 +0000)]
cmd: make use of maps.{Copy, Clone}
Change-Id: I8a38b4c71c34d3544ee32be9c6e767bb1099a720
GitHub-Last-Rev: ff4cb4e91be3936465635f99d061f02999640ed9
GitHub-Pull-Request: golang/go#69424
Reviewed-on: https://go-review.googlesource.com/c/go/+/612735 Reviewed-by: Keith Randall <khr@golang.org>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Jes Cok [Fri, 13 Sep 2024 13:14:51 +0000 (13:14 +0000)]
encoding/gob: make use of maps.Clone
Change-Id: I6a23219a9e05350bdd9205e19165d5944f15de31
GitHub-Last-Rev: 8c295bf55feaa07cd487e6015029c4682a1480b0
GitHub-Pull-Request: golang/go#69429
Reviewed-on: https://go-review.googlesource.com/c/go/+/612719 Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Jes Cok [Fri, 13 Sep 2024 13:07:16 +0000 (13:07 +0000)]
archive/tar: make use of maps.Clone
Change-Id: I2a9d849410002dae1f49a53597298c1903954d12
GitHub-Last-Rev: 20a56b4161dd0864f67d427301cb28563f2c3d50
GitHub-Pull-Request: golang/go#69427
Reviewed-on: https://go-review.googlesource.com/c/go/+/612737 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Change-Id: I0a0c263af2f07203eab1782e69c706f20c689d8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/604737
Auto-Submit: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Tim King <taking@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Mark Ryan [Wed, 13 Sep 2023 08:59:41 +0000 (10:59 +0200)]
crypto/md5: provide optimised assembly for riscv64
Provide an optimised assembly implementation of MD5 for RISC-V.
There are significant performance improvements. The assembler takes
advantage of Zbb instructions when they are available.
Results for the VisionFive 2 running Ubuntu 24.04 with
GORISCV64=rva20u64.
Change-Id: I61e3fa802c2cc50e0b5f71f151b4741691ccb481
Reviewed-on: https://go-review.googlesource.com/c/go/+/527936 Reviewed-by: Joel Sing <joel@sing.id.au>
Auto-Submit: Tim King <taking@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com>
Michael Matloob [Fri, 13 Sep 2024 15:12:36 +0000 (11:12 -0400)]
cmd/go: populate build info for test mains
Before this change, test binaries didn't have build info populated on them
unless they were tests for package main. Now we generate them for all
test binaries so that they can be inspected like other binaries.
We don't need to add the default GODEBUG in printLinkerConfig because it
will now always be present on the build info, and when build info is
present we use it to generate the hash.
Fixes #33976
Change-Id: Ib4f51c04f87df3c7f2f21c400ab446e70d66a101
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/613096
Auto-Submit: Michael Matloob <matloob@golang.org> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Mateusz Poliwczak [Thu, 22 Aug 2024 12:29:18 +0000 (12:29 +0000)]
go/ast: note that in BasicLit CHARs and STRINGs are quoted
This reapplies CL 244960, for some reason CL 264181 removed this comment.
Updates #39590
Change-Id: Ia37268812c6929020b0cd583d2c7fa48a098377c
GitHub-Last-Rev: 2acee37fedc7f2edfffec4f2e4c465708f210a97
GitHub-Pull-Request: golang/go#69019
Reviewed-on: https://go-review.googlesource.com/c/go/+/607517 Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Jes Cok [Thu, 12 Sep 2024 17:15:58 +0000 (17:15 +0000)]
net/http: make use of maps.Copy
Change-Id: If8e02760fe1fb095ecebc306fd98662a51a1f66f
GitHub-Last-Rev: 7b8099f1fed04271c121cdde1c3abd8822955368
GitHub-Pull-Request: golang/go#69426
Reviewed-on: https://go-review.googlesource.com/c/go/+/612736 Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Jes Cok [Thu, 12 Sep 2024 15:46:41 +0000 (15:46 +0000)]
text/template: make use of maps.Copy for Template.Clone
Change-Id: I1da668223b599867afe5483384b458482624adc5
GitHub-Last-Rev: 0a6bd6e84ac4c744d27d6ac87d877889209f386d
GitHub-Pull-Request: golang/go#69423
Reviewed-on: https://go-review.googlesource.com/c/go/+/612717
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Kir Kolyshkin [Mon, 9 Sep 2024 18:04:13 +0000 (11:04 -0700)]
internal/testenv: add MustHaveSource, rm HasSrc
All the users of HasSrc call t.Skip anyway, so let's move it to testenv.
Fix go/build to use MustHaveSource rather than MustHaveGoBuild where
appropriate.
Change-Id: I052bf96fd5a5780c1930da5b3a52b7a8dbebea46
Reviewed-on: https://go-review.googlesource.com/c/go/+/612057 Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Tim King <taking@google.com>
Change-Id: Ib437e272e0eb7d1b0969a4ed94d264ca3aad7c59
Reviewed-on: https://go-review.googlesource.com/c/go/+/612696
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tim King <taking@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com>
Robert Griesemer [Thu, 5 Sep 2024 23:29:10 +0000 (16:29 -0700)]
go/types, types2: add initial README.md
Change-Id: I0a5ce4d50d65b803b001d01d627e8e6d2af66d6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/611335
TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
CL 28490 speeded up non-ASCII rune decoding, and ASCII rune is also
decoded faster now.
Benchmark using:
perflock -governor 70% go test -run=NONE -bench=BenchmarkRuneCountInString -count=10
Result:
name old time/op new time/op delta
RuneCountInStringTenASCIIChars-8 10.2ns ± 0% 7.1ns ± 1% -30.53% (p=0.000 n=8+9)
RuneCountInStringTenJapaneseChars-8 49.3ns ± 2% 38.5ns ± 2% -21.84% (p=0.000 n=8+8)
Fixes #13162
Change-Id: Ifb01f3799c5c93e7f7c7af13a95becfde85ae807
Reviewed-on: https://go-review.googlesource.com/c/go/+/612617 Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tim King <taking@google.com>
Change-Id: I6337cad72369e77e378b6e9bec6521d71b3f4fc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/610175 Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tim King <taking@google.com>
Michael Pratt [Tue, 11 Jun 2024 20:34:38 +0000 (16:34 -0400)]
os: add clone(CLONE_PIDFD) check to pidfd feature check
clone(CLONE_PIDFD) was added in Linux 5.2 and pidfd_open was added in
Linux 5.3. Thus our feature check for pidfd_open should be sufficient to
ensure that clone(CLONE_PIDFD) works.
Unfortuantely, some alternative Linux implementations may not follow
this strict ordering. For example, QEMU 7.2 (Dec 2022) added pidfd_open,
but clone(CLONE_PIDFD) was only added in QEMU 8.0 (Apr 2023).
Debian bookworm provides QEMU 7.2 by default.
Fixes #69259.
Change-Id: Ie3f3dc51f0cd76944871bf98690abf59f68fd7bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/592078
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Joel Sing [Mon, 9 Sep 2024 15:04:51 +0000 (01:04 +1000)]
cmd/compile,cmd/internal/obj/riscv: always provide ANDN, ORN and XNOR for riscv64
The ANDN, ORN and XNOR RISC-V Zbb extension instructions are easily
synthesised. Make them always available by adding support to the
riscv64 assembler so that we either emit two instruction sequences,
or a single instruction, when permitted by the GORISCV64 profile.
This means that these instructions can be used unconditionally,
simplifying compiler rewrite rules, codegen tests and manually
written assembly.
Around 180 instructions are removed from the Go binary on riscv64
when built with rva22u64.
Change-Id: Ib2d90f2593a306530dc0ed08a981acde4d01be20
Reviewed-on: https://go-review.googlesource.com/c/go/+/611895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Michael Matloob [Wed, 4 Sep 2024 19:40:55 +0000 (15:40 -0400)]
cmd/go: explicitly add default GODEBUG to linker config
Previously we expected the default GODEBUG that's embedded in the binary
to be taken into account for build actionIDs through the build info. The
build info contains the default GODEBUG for a package main, and then
that build info is used to generate the action id. But tests of packages
other than main do not have buildinfo set on them. So the default
GODEBUG isn't taken into account in the action id for those tests.
Explicitly include GODEBUG when generating all link actions' action ids
to make sure it's always present.
Fixes #69203
Change-Id: Ifbc58482454ecfb51ba09cfcff02972cac3270c1
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/610875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
cmd/go: set environment LANG=C when getting compiler version
Compiler's version will not work well if gcc output have
different language. Like 'gcc -v', it may not output:
'gcc version xx.xx.x'
Fixes #69221
Change-Id: I4adcea79dfaaf5853dfb6e718468f8530c67da6a
GitHub-Last-Rev: 069787c0836f9be10e4bf71dd6c468ae47f6161e
GitHub-Pull-Request: golang/go#69223
Reviewed-on: https://go-review.googlesource.com/c/go/+/610215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: DING HU <huzuzong123@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Ian Lance Taylor [Wed, 4 Sep 2024 18:47:47 +0000 (11:47 -0700)]
os: check for EACCES, not EPERM, in Getwd test
Fixes #69406
Change-Id: I1c6b1498d87f94cc9196a933c13df1c3369e19a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/610756
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Tim King <taking@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
types2 handles all constant-related bounds checks in user Go code now,
so it's safe to remove the constants check from these functions.
Change-Id: I4e3fb5d22f9bbc95878c7df2ee3b0eb1819f8dd7
Reviewed-on: https://go-review.googlesource.com/c/go/+/611677
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
types2 handles all constant-related bounds checks in user Go code now,
so it's safe to remove all constants checking in tcSlice function.
Change-Id: Ia0dd4928d7122a6f62df10436bb4a3675ebf3357
Reviewed-on: https://go-review.googlesource.com/c/go/+/611676
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com>
Change-Id: Ice9f4ef0ce0fbb5a6424823c5f8e0c0c369fd159
Reviewed-on: https://go-review.googlesource.com/c/go/+/589538
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Auto-Submit: Tim King <taking@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Change-Id: If2d3e09c3d687e733e6ff2c50feb8d6a8eb7e63b
Reviewed-on: https://go-review.googlesource.com/c/go/+/589537 Reviewed-by: Tim King <taking@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn> Reviewed-by: Meidan Li <limeidan@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Auto-Submit: Tim King <taking@google.com>
Cherry Mui [Thu, 5 Sep 2024 22:56:26 +0000 (18:56 -0400)]
cmd/compile: correct wasmexport result type checking
The function resultsToWasmFields was originally for only
wasmimport. I adopted it for wasmexport as well, but forgot to
update a few places that were wasmimport-specific. This leads to
compiler panic if an invalid result type is passed, and also
unsafe.Pointer not actually supported. This CL fixes it.
Updates #65199.
Change-Id: I9bbd7154b70422504994840ff541c39ee596ee8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/611315 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Achille Roussel <achille.roussel@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: Id404f9023a57025f78b6922659cfa8870881d646
Reviewed-on: https://go-review.googlesource.com/c/go/+/590175 Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tim King <taking@google.com> Reviewed-by: Tim King <taking@google.com>
Jes Cok [Wed, 11 Sep 2024 15:48:56 +0000 (15:48 +0000)]
html/template: use maps.Copy in escaper.escapeListConditionally
To make it a little simpler.
Change-Id: I0d7f015e8f245fbdd8c5cf5c10e8d2bd44b91021
GitHub-Last-Rev: 2eae47fe8bc5704de86a91ac87c76e49f51d2fe7
GitHub-Pull-Request: golang/go#69396
Reviewed-on: https://go-review.googlesource.com/c/go/+/612397
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
types2 handles all constant-related bounds checks in user Go code now,
so it's safe to remove the check in IndexConst function.
Change-Id: I9116493f191c4df1cce7e43c8ac3dc5bf020fd5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/611675
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org>
runtime: Goexit on C-created thread report more useful error message
This reverts CL 609296, with the fix for failing builders.
Fixes #68275
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-nocgo,gotip-darwin-amd64-nocgo,gotip-linux-ppc64_power10,gotip-linux-ppc64_power8
Change-Id: I0f539ee7b0be720642eee8885946edccd9c6e04e
Reviewed-on: https://go-review.googlesource.com/c/go/+/612335 Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Mark D Ryan [Fri, 23 Aug 2024 08:17:25 +0000 (08:17 +0000)]
runtime: add asm_riscv64.h
asm_riscv64.h will be used to define macros for each riscv64
extension that is not part of the rva20u64 base profile but that the
_riscv64.s assembly files are allowed to use because the user has
specified a more capable profile in the GORISCV64 variable. This will
allow us, for example, to test for the hasZba macro in those assembly
files instead of the GORISCV64_rva22u64 macro before using a Zba
instruction. This is important as it means that in the future when
we add support for new profiles that support Zba, e.g., rva23u64,
we only need to update asm_riscv64.h to indicate rva23u64 supports
Zba. We will not need to update every assembly language file that
already uses Zba instructions.
Updates #61476
Change-Id: I83abfeb20d08a87ac8ea88f4d8a93437f0631353
Reviewed-on: https://go-review.googlesource.com/c/go/+/608255
Auto-Submit: Tim King <taking@google.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com> Reviewed-by: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This field is present during the initial development of generic support
inside compiler, and indicating whether a type is fully instantiated is
the solely purpose at this moment. Further, its name is also confused,
and there have been a TODO to chose a better name for it.
Instead, just using a bit to track whether a type is fully instantiated,
then this rparams field can be removed to simplify the code.
Change-Id: Ia29c6dd5792487c440b83b0f3b77bd60917c2019
Reviewed-on: https://go-review.googlesource.com/c/go/+/611255 Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
Ian Lance Taylor [Tue, 10 Sep 2024 20:27:56 +0000 (13:27 -0700)]
cmd/compile, go/types: add missing space in error message
Otherwise "print(nil)" gets an error like
use of untyped nil in argument to built-inprint
Change-Id: Iaa841df106f90787031dce75a49af69860a9dbc9
Reviewed-on: https://go-review.googlesource.com/c/go/+/611918
Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Now that Go 1.22.6 is the minimum bootstrap toolchain (cf. CL 606156),
the slices package (introduced in Go 1.21) can be used in packages built
using the bootstrap toolchain.
For #64751
Change-Id: Ib36f39016f57c5e110f78a85ca9c806d91356024
Reviewed-on: https://go-review.googlesource.com/c/go/+/612316 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>