aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
13 dayscmd/compile/internal/noder: split up objTypeParamsMark Freeman
This splits objTypeParams into objTypeParams and objRecvTypeParams. The type parameters on a generic method and its receiver need to be reported separately to the reader. Change-Id: If9eb93ca66a5a5e4bdce71364627ff4bee110311 Reviewed-on: https://go-review.googlesource.com/c/go/+/761981 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
13 daysspec: in range-over-func, the yield function cannot be variadicRobert Griesemer
Be explicit about it. For #78483. For #78314. Change-Id: I9dc65d72ec7840a73c21869a8ca26dfeed17ad61 Reviewed-on: https://go-review.googlesource.com/c/go/+/761701 Reviewed-by: Jakub Ciolek <jakub@ciolek.dev> TryBot-Bypass: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
13 daysgo/types, types2: in range-over-func, the yield function cannot be variadicRobert Griesemer
Fixes #78483. For #78314. Change-Id: If83983c0bf79840aa02dc0d2fa8945f5e8b4e969 Reviewed-on: https://go-review.googlesource.com/c/go/+/761682 Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jakub Ciolek <jakub@ciolek.dev> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com>
13 daysruntime: rename _mkmalloc's module to avoid GOROOT conflictMichael Matloob
Often we want to run _mkmalloc using a different toolchain. The previous module path runtime/_mkmalloc would produce an ambiguous import path error because the directory runtime/_mkmalloc exists in a Go 1.26+ toolchain. Rename the module to avoid the conflict. Change-Id: Id73a3ca102081d8b51da58879aee851b6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761880 Reviewed-by: Michael Matloob <matloob@google.com> Auto-Submit: Michael Matloob <matloob@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
13 daysinternal/runtime/atomic: simplify linknamesCherry Mui
When not in race mode, we redirect the sync/atomic functions to internal/runtime/atomic with assembly stubs in the sync/atomic package. Access from assembly is similar to linkname, so they need export linknames from internal/runtime/atomic. We currently have export linknames only for the Go functions, which varies from architecture to architecture. This CL adds export linknames to assembly functions as well, so they are same on all architectures. Linknames on assembly functions don't hurt. Also, we may restrict linkname access to assembly symbols without a push or export linkname later. This CL prepares for that. Change-Id: Ic6167a2f6610b9b1b1193e2ea86095ab7506b282 Reviewed-on: https://go-review.googlesource.com/c/go/+/749945 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
13 dayscmd/compile/internal/importer: update commentMark Freeman
Change-Id: I1f2fc247cdf979a40cbd48b4feab449c0ff6182e Reviewed-on: https://go-review.googlesource.com/c/go/+/761860 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
14 dayscmd/internal/goobj: regenerate builtin list, add retpoline and tls_g symbolsCherry Mui
Add retpoline and tls_g symbols as the assembler generates direct reference to them. Change-Id: I569eab6d81798866263da9240d702139d3567d57 Reviewed-on: https://go-review.googlesource.com/c/go/+/761464 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
14 daysruntime/secret: replace stub reference in test assemblyCherry Mui
In runtime/secret's TestCore, it copies some files from the runtime/secret package to a test main package, including assembly files. The assembly function references a stub function in Go, which is also copied. Make it reference the copied one, not the original one, to avoid cross-package assembly references. We may want to rewrite the test to avoid copy, e.g. including the test functions in the test binary itself and having the test run itself in a subprocess. Leave that for later. Change-Id: I5187edcc41d1d0469fc6b1b5f2acc60df37e5c1e Reviewed-on: https://go-review.googlesource.com/c/go/+/761520 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
14 dayscmd/link: make dupok symbol handling path clearerCherry Mui
When the linker sees two symbols with the same name, if both are dupok, pick the one with larger size. If one is dupok, one is not, pick the one that is not dupok, as "dupok" is sort of like weak symbol in C terms. Change-Id: I0a95d1ddfdd70ffb5ecc06645fb345591039af49 Reviewed-on: https://go-review.googlesource.com/c/go/+/749943 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
14 dayscmd/compile, cmd/link: add linknamestd directive for std-only linknamesCherry Mui
In the standard library, there are a number of linknames, for sharing symbols within the standard library. They are not supposed to be accessed externally. But currently there is no good mechanism to prevent that. In the linker we have a blocklist of linknames, which forbids linkname references other than explicitly allowed packages. The blocklist is manually maintained, requiring periodic manual update. To move away from that manually maintained blocklist, this CL introduces a new directive, linknamestd, that marks a linkname for use within the standard library only. The linker will allow references within the standard library and forbid others. For a proof of concept, runtime.coroswitch is removed from the blocklist, and replaced with linknamestd. An external reference to it is still disallowed by the linker, as tested with cmd/link.TestCheckLinkname with testdata/linkname/coro.go. Change-Id: I0d0f8746b8835d8cdcfc3ff835d22a551da5f038 Reviewed-on: https://go-review.googlesource.com/c/go/+/749942 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
14 dayscmd/cgo/internal/testcarchive: unskip a test on darwin/arm64Cherry Mui
The test was skipped when darwin/arm64 meant iOS, and our LLDB runner could not handle signals. Now darwin/arm64 is macOS, it works just fine. Change-Id: I04b2b60046c6a0df01a5d5c23d7203d469af20de Reviewed-on: https://go-review.googlesource.com/c/go/+/749941 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
14 daysinternal/pkgbits: bump version for generic methodsMark Freeman
We still need to guard changes to the bitstream which don't depend on witnessing a generic method. Change-Id: Idfc189ebb02f86dbd91e47f5e4c7663479441370 Reviewed-on: https://go-review.googlesource.com/c/go/+/761583 Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
14 dayscmd/compile/internal/noder: separate generic methods in type encodingMark Freeman
This doesn't need a version guard here because we will bump the version in Go 1.27. It will be impossible to witness a generic method at the UIR layer without being at an appropriate bitstream version. Change-Id: Ie6c89fb98d55a3dccbd53e87860d6103582a921e Reviewed-on: https://go-review.googlesource.com/c/go/+/761582 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
14 dayscmd/link: remove SITABLINKIan Lance Taylor
As of CL 729201 it's no longer used. Change-Id: Idc3104208d160e657f6dbef99c8124cd760c3c77 Reviewed-on: https://go-review.googlesource.com/c/go/+/745960 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
14 daysinternal/abi: set MaxPtrmaskBytes to 16Ian Lance Taylor
When MaxPtrmaskBytes was introduced in CL 9888, it was given the value 16. That seemed like a good tradeoff between space in the binary and code computing the GC bitmask from a GC program. In CL 10815 MaxPtrmaxBytes was increased to 2048, because that CL changed channel sending to use typeBitsBulkBarrier, which did not support GC programs. The value 2048 was chosen to ensure that all types up to 64K would use a GC bitmask, as channel element types are limited to 64K. In CL 616255 GC programs were removed and the GC bitmask, if not precomputed, was instead generated from the type descriptor. As part of this change the restriction on typeBitsBulkBarrier was removed. Thus the requirement of setting MaxPtrmaskBytes to 2048 no longer applies. This CL restores MaxPtrmaskBytes back to the original value of 16. For reference, in tailscaled this changes the number of types requiring the GC bitmask to be computed from 6 to 49. This saves about 100 bytes in the executable, which I admit isn't much. On the other hand some of those precomputed bitmasks are never used, such as the one generated for runtime.spanQueue. Change-Id: I170baaaa07d9f86e976586de93635c1be820a91e Reviewed-on: https://go-review.googlesource.com/c/go/+/730000 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
2026-03-31cmd/go/internal/doc: follow up to CL 733200Michael Matloob
I submitted a rebased variant of the CL that dropped changes in response to Sean Liao and Ian Alexander's comments. Add the bug updates below and re-implement Ian's suggestion. Fixes #34750 For #53446 For #60645 Change-Id: Ie132ac65efd27e811edabfbbb083b6946a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761580 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Ian Alexander <jitsu@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2026-03-31cmd/internal/obj/riscv: add support for FENCE operands and FENCE.TSOwangboyao
Add support for fine-grained memory ordering flags in the RISC-V FENCE instruction to the assembler. This implements instruction validation and encoding for predecessor and successor flags (I, O, R, W) rather than always falling back to a full memory barrier. This allows more precise memory barriers like FENCE R, RW or FENCE W, W. Additionally, this adds assembly support for the FENCE.TSO, which is encoded as FENCE RW, RW with the fm field set to 1000. Change-Id: Ie9c6c8cd24b38b08013032972bd54515eaedd637 Reviewed-on: https://go-review.googlesource.com/c/go/+/758000 Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Joel Sing <joel@sing.id.au> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/link/internal/loong64: remove the handling of R_CONST and R_GOTOFF from ↵limeidan
linker These two relocations are general relocations and do not require special architectural handling. Change-Id: Ibd5e71f6337e8dbb68e84759a46a46d9843b0382 Reviewed-on: https://go-review.googlesource.com/c/go/+/760080 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/compile/internal/noder: reword commentMark Freeman
Change-Id: I9312f0b138e42363b611fc5193dd99a4a1f57db3 Reviewed-on: https://go-review.googlesource.com/c/go/+/761600 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2026-03-31cmd/compile/internal/noder: encode dictionaries for generic methodsMark Freeman
Generic methods have 2 sources of explicit type arguments-the receiver and the method itself. We simply concatenate these lists when constructing the dictionary. Change-Id: I8ba99fa7274b594941867e9bf6c2a22356c03e46 Reviewed-on: https://go-review.googlesource.com/c/go/+/761341 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/compile/internal/noder: mangle method namesMark Freeman
Mangling produces shaped qualified identifiers using a dictionary. It's important for determining the stenciled type to use for a given instantiation. Since generic methods have qualified identifiers, they need mangling. Suppose a generic method like T[P].m[Q] and a shaped dictionary like: { implicits: 0 receivers: 1 targs: [go.shape.int, go.shape.int] } This would be shaped to T[go.shape.int].m[go.shape.int]. Change-Id: Idc4c825f77a4e9209da65b5b0acb74b9f845bde7 Reviewed-on: https://go-review.googlesource.com/c/go/+/761340 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2026-03-31cmd/go: add more go tool documentation and show tool aliases in go toolMichael Matloob
This change adds pointers in the documentation for go tool to point to go get -tool, and vice versa, and documents the rules for when aliases can be used for tools and what those aliases are. It also modifies go tool with no arguments so that it prints the alias for any tools for which aliases can be provided, such as: $ go tool asm cgo [...] bar (foo.com/full/package/path/bar) For #71663 Change-Id: Id008cffbb02863692a18d4e1c1458b5b6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761100 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31net/http/internal/http2: prevent hanging Transport due to bad SETTINGS frameNicholas S. Husin
When processing SETTINGS frame, Transport currently only checks if the frame is valid for SETTINGS_ENABLE_CONNECT_PROTOCOL. As a result, a SETTINGS_MAX_FRAME_SIZE with the invalid value of 0 is erroneously accepted. This will then result in Transport being stuck in an infinite loop writing CONTINUATION frames. This CL fixes the issue by ensuring that SETTINGS frame are always validated, regardless of the SETTINGS parameter. Thanks to Marwan Atia (marwansamir688@gmail.com) for reporting this issue. Fixes #78476 Fixes CVE-2026-33814 Change-Id: I8b6219431e87454d34bca738fbcb59b66a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761581 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com>
2026-03-31cmd/compile/internal/noder: qualify identifiers for generic methodsMark Freeman
Generic methods will be hoisted to objects so that they can get their own dictionaries. We need to avoid name collisions, so within a package, we qualify generic methods using their defining type. We don't differentiate method identifiers by whether they have a pointer or value receiver for simplicity. Change-Id: Ied06c5e4a4c5a6f8de8027358ddbe38fc40ae452 Reviewed-on: https://go-review.googlesource.com/c/go/+/761263 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/compile/internal/noder: method expressions have nil implicitsMark Freeman
Change-Id: Ia7ba5484ef5258cc8edc19b7d500e334c0e0365d Reviewed-on: https://go-review.googlesource.com/c/go/+/761261 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/compile/internal/noder: method expressions for generic methodsMark Freeman
This change permits shaping method expressions for generic methods. The API is slightly different for generic and non-generic methods, as explained in code comments. Using OMETHEXPR minimizes the necessary changes, but forces us to split / rejoin the linker symbol for generic methods. While a bit odd, it seems sound. Change-Id: Iff28b9b11b9e83f450225aba0873644633f20633 Reviewed-on: https://go-review.googlesource.com/c/go/+/761220 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31runtime/cgo: remove SIGSEGV emulation on iOSqmuntal
The misc/ios exec wrapper doesn't support lldb since https://go.dev/cl/573175. This means that the SIGSEGV emulation code in the cgo signal handling on iOS is no longer needed, and can be removed. Cq-Include-Trybots: luci.golang.try:gotip-darwin-arm64_26 Change-Id: I39827cb20756e4730352d87cb3514bb6a3f1cee8 Reviewed-on: https://go-review.googlesource.com/c/go/+/756800 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2026-03-31test/codegen: remove unneeded commasKeith Randall
After CL 760780, commas aren't allowed. But some CLs that were already in flight don't know that. Change-Id: I31f586c87def4a9746dc2c055923fce8bad6647e Reviewed-on: https://go-review.googlesource.com/c/go/+/761620 Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
2026-03-31runtime: unix: sane exit in dieFromSignal for pid 1Kir Kolyshkin
A curious bug was reported to kubernetes[1] and runc[2] recently: sometimes runc init reports exit status of 2. Turns out, Go runtime assumes that on any UNIX system signals such as SIGTERM (or any other that has _sigKill flag set in sigtable) with no signal handler set up, will result in kernel terminating the program. This is true, except for PID 1 which gets a custom treatment from the kernel. As a result, when a Go program that runs as PID 1 (which is easy to achieve in Linux by using a new PID namespace) receives such a signal, Go runtime calls dieFromSignal which falls through all the way to exit(2), which is very confusing to a user. This issue can be worked around by the program by adding custom handlers for SIGTERM/SIGINT/SIGHUP, but that requires a goroutine to handle those signals, which, in case of runc, unnecessarily raises its NPROC/pid.max requirement (see discussion at [2]). Since practically exit(2) in dieFromSignal can only happen when the process is running as PID 1, replace it with exit(128+sig) to mimic the shell convention when a child is terminated by a signal. Add a test case which demonstrates the issue and validates the fix (albeit only on Linux). [An earlier version of this patch used to do nothing in dieFromSignal for PID 1 case, but such behavior might be a breaking change for a Go program running in a Linux container as PID 1.] Fixes #78442 [1]: https://github.com/kubernetes/kubernetes/issues/135713 [2]: https://github.com/opencontainers/runc/pull/5189 Change-Id: I196e09e4b5ce84ce2c747a0c2d1fc6e9cf3a6131 Reviewed-on: https://go-review.googlesource.com/c/go/+/759040 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2026-03-31cmd/go/internal/doc: use internal go command logic to load packagesmatloob
We've been using go/build to load packages, and that doesn't always do the right thing, because it doesn't have the same context and settings that the go command uses to load packages. Use the go command's loader to load packages. This CL doesn't remove the logic for searching for matching packages in dirs.go. A next step would be to remove that so all the matching is also done with the go command's logic. Fixes #75976 Change-Id: I3c76d9a54dc88648bb7c76a17afad8cb6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/733200 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Michael Matloob <matloob@google.com>
2026-03-31test/codegen: forbid commas as separatorsKeith Randall
We need to leave the comma in the regexp so we get the entire comment for processing, but report an error if commas are actually used. Change-Id: Ia19a329deda2524cea292d866a84d1bf3b4518c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/760780 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Paul Murphy <paumurph@redhat.com> Auto-Submit: Keith Randall <khr@google.com>
2026-03-31test/codegen: fix some unbalanced quotesKeith Randall
Change-Id: I081da8c79f0264118e079af21ff58c511ae37e6c Reviewed-on: https://go-review.googlesource.com/c/go/+/760682 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Joel Sing <joel@sing.id.au> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@google.com>
2026-03-31test/codegen: replace commas with spaces between regexpsKeith Randall
Change-Id: Ia7a955833d761e08c1b8081fb29a2e6317de004c Reviewed-on: https://go-review.googlesource.com/c/go/+/760681 Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Paul Murphy <paumurph@redhat.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31test/codegen: get rid of \sKeith Randall
Replace \s with a space in backtick-quoted strings Replace \\s with a space in double-quoted strings Change-Id: I0c8b249bb12c2c8ca69e683e4bc6f27544fd6094 Reviewed-on: https://go-review.googlesource.com/c/go/+/760680 Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Paul Murphy <paumurph@redhat.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31test/codegen: fix broken syntaxKeith Randall
A bunch of tests had broken yet undetected syntax errors in their assembly output regexps. Things like mismatched quotes, using ^ instead of - for negation, etc. In addition, since CL 716060 using commas as separators between regexps doesn't work, and ends up just silently dropping every regexp after the comma. Fix all these things, and add a test to make sure that we're not silently dropping regexps on the floor. After this CL I will do some cleanup to align with CL 716060, like replacing commas and \s with spaces (which was the point of that CL, but wasn't consistently rewritten everywhere). Change-Id: I54f226120a311ead0c6c62eaf5d152ceed106034 Reviewed-on: https://go-review.googlesource.com/c/go/+/760521 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Paul Murphy <paumurph@redhat.com> Auto-Submit: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-31cmd/link, runtime: record size of itabsIan Lance Taylor
We were depending on runtime.etypes immediately following the itabs. However, on AIX, runtime.etypes, as a zero-sized symbol, can float when using external linking. It won't necessarily stay right at the end of the itabs. Rather than worry about this, just record the size of the itab data. In practice it almost always works on AIX, but it fails the runtime test TestSchedPauseMetrics/runtime/debug.WriteHeapDump, which fails when iterating over all the itabs. Tested on AIX. This should fix AIX on the build dashboard. Change-Id: Id3a113b75b93fa8440c047e92f764ab81423df48 Reviewed-on: https://go-review.googlesource.com/c/go/+/760203 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2026-03-31cmd/compile: fix wrong label loop during rangefunc rewriteCuong Manh Le
During the rangefunc rewrite, the compiler must correctly identify the target of branch statements. When a label is defined within a nested scope - such as inside a function literal or a closure - it can shadow a label with the same name in the outer scope. If the rewrite logic does not account for this shadowing, it may incorrectly associate a branch with a nested label rather than the intended loop label. Since the typechecker already guarantees that labels are unique within their respective scopes, any duplicate label name encountered must belong to a nested scope. These should be skipped to ensure branch computing correctly targets the current range-loop scope. Fixes #78408 Change-Id: I4dce8a4d956f41b3a717a509f8c3f7478720be9f Reviewed-on: https://go-review.googlesource.com/c/go/+/761420 Reviewed-by: Keith Randall <khr@golang.org> 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: Jakub Ciolek <jakub@ciolek.dev> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Keith Randall <khr@google.com>
2026-03-31cmd/compile: ensure map/slice clearing expressions are walkedCuong Manh Le
The order pass ensures that initialization operations for clear(expr) are scheduled. However, if 'expr' is a conversion that the walk pass subsequently optimizes away or transforms, the resulting nodes can be left in an un-walked state. These un-walked nodes reach the SSA backend, which does not expect high-level IR, resulting in an ICE. This change ensures the expression is always walked during the transformation of the 'clear' builtin. Fixes #78410 Change-Id: I1997a28af020f39b2d325a58429eff9495048b1f Reviewed-on: https://go-review.googlesource.com/c/go/+/760981 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2026-03-31cmd/compile: convert some condmoves in XORJorropo
Similar to CL 685676 but for XOR. Change-Id: Ib5ffd4c13348f176a808b3218fdbbafc2c42794f Reviewed-on: https://go-review.googlesource.com/c/go/+/760921 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2026-03-31cmd/compile: convert some condmoves in ORJorropo
Similar to CL 685676 but for OR. Change-Id: I0ddfd457ed9e8888462306138a251ac48ad42084 Reviewed-on: https://go-review.googlesource.com/c/go/+/760920 Auto-Submit: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2026-03-31sync: replace linkname with importCherry Mui
The sync package uses linkname to access internal/runtime/atomic package's LoadAcquintptr and StoreReluintptr functions. It was not able to import the package when the package was runtime/internal/atomic. Now that it moves to internal/runtime, the sync package can just import it and call the functions normally. Change-Id: Ic7399e33d0e965fdcdf505be67a7f90e0260ddee Reviewed-on: https://go-review.googlesource.com/c/go/+/750160 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2026-03-31net/http: support passing Server Shutdown context to HTTP/3 implementationsNicholas S. Husin
Currently, when Server.Shutdown is called with a given context, an HTTP/3 server implementation does not have access to said context. This forces HTTP/3 server implementations to guess a reasonable fixed timeout when attempting to gracefully shutdown, which is not ideal. Therefore, add ShutdownContext method to http3ServerHandler to handle this. For #77440 Change-Id: Ib15b615f646fd08788981eb06f3a70606a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761480 Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
2026-03-31image/jpeg: reject RGB and non-standard chroma subsamplingNigel Tao
This fixes a possible panic introduced a few months ago by "image/jpeg: add support for non-standard chroma subsampling ratios" (CL 738280). Fixes #78368 Change-Id: I1f181582b7dc1e2955e3ec26c3aa24bc0f4159df Reviewed-on: https://go-review.googlesource.com/c/go/+/760701 Auto-Submit: Nigel Tao <nigeltao@golang.org> Reviewed-by: 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> Reviewed-by: Nigel Tao <nigeltao@google.com>
2026-03-30simd/archsimd: mark pa* unsafe helpers as nocheckptrCuong Manh Le
Despite the cast from smaller to bigger slice, the elements after the input slice length are not actually read. Thus they should have nocheckptr annotation to make checkptr happy. Fixes #78413 Change-Id: I3e27eab8a69b37bb11632b130a87e6625e06e8ac Reviewed-on: https://go-review.googlesource.com/c/go/+/761120 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2026-03-30net/http/internal/http2: don't reuse ClientRequest streamsDamien Neil
The ClientRequest type (unlike http.Request) is not reusable across RoundTrip attempts because it includes a single-use clientStream. (It's possible for RoundTrip to return while some goroutines are still accessing the clientStream.) Always clone the ClientRequest on retries. Fixes #78202 Fixes #78187 Change-Id: I4012bb4e017a9516278c873ec5a589086a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761301 Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
2026-03-30internal/trace/tracev2: add String for ProcSyscallAbandonedFlorian Lehner
Add missing string for ProcSyscallAbandoned. Change-Id: Ie6b049001432c2b667716d4eff95783c7eb1f350 Reviewed-on: https://go-review.googlesource.com/c/go/+/760840 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> TryBot-Bypass: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2026-03-30go/types, types2: report an error if constant string overflowsRobert Griesemer
Set a limit of 10 GiB for strings obtained via constant string addition. Fixes #78346. Change-Id: I35dbdff94f3ed32bf69654f4b3da435dad9f6236 Reviewed-on: https://go-review.googlesource.com/c/go/+/761300 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
2026-03-30all: fix some minor issues in the commentscuishuang
Change-Id: If6c304efac7a46a9718cdc63ded3d98a26a3a831 Reviewed-on: https://go-review.googlesource.com/c/go/+/760700 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Neal Patel <nealpatel@google.com> Reviewed-by: Fred Sauer <fredsa@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2026-03-30runtime/race: allow TestOutput output in either orderMichael Pratt
We have only seen the wrappersym case reported in the opposite order in practice, but since these are intentionally racy, they could theoretically all occur in the opposite order. It would be nice to have a bit more structure to these tests so the test itself could easily flip the order. However, since they are just regular expressions, for now I've simply listed both orders. Fixes #78394. Change-Id: I92e04127f275c2394a12d63d2f2a3ce56a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761161 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2026-03-30cmd/go/internal/doc: document that -all and -short cannot be combinedmatloob
And return an error message. Hopefully we can add support by the end of the cycle, but for now return an error to avoid confusing users. For #77191 Change-Id: I8a673a4bdfe640a04ec67b8bee0b5a056a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/760304 Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>