aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
AgeCommit message (Collapse)Author
13 daysruntime: use asmcgocall_no_g in libInitMichael Pratt
libInit runs before rt0_go, which is where TLS setup occurs. Thus the contents of the TLS may not be defined, so the g lookup in asmcgocall is not safe. Concretely, android-386 c-shared builds crash without this change because asmcgocall reads an invalid non-zero g from the TLS. Move libInit to a file limited to GOARCH that support c-archive or c-shared so that only those require asmcgocall_no_g. In addition, loong64 and s390x need asmcgocall_no_g implementations. Fixes #78480. Cq-Include-Trybots: luci.golang.try:gotip-linux-loong64,gotip-linux-s390x Change-Id: I175e6d020339af89c9b576535d79c1e76a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761541 Reviewed-by: Quim Muntal <quimmuntal@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2026-03-18runtime,runtime/cgo: do cgo thread initialization in Go on Windowsqmuntal
Windows doesn't require any special handling for cgo threads. They can be created in the same way as in non-cgo code. In fact, the code to create threads in runtime and in runtime/cgo is basically the same, except that the latter does some retries on failure. Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race,gotip-windows-arm64 Change-Id: I49d4de93d4d3b07a4c89e2bfb6b7302c6dfb9877 Reviewed-on: https://go-review.googlesource.com/c/go/+/746300 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-03-18runtime: implement part of library initialization in Goqmuntal
All architectures supporting c-shared and c-archive share the same initialization code in assembly, and most of it can be implemented in pure Go. Cq-Include-Trybots: luci.golang.try:gotip-darwin-arm64-longtest,gotip-linux-ppc64le_power10,gotip-linux-riscv64,gotip-linux-loong64,gotip-linux-s390x Change-Id: Iaa9fb7d6f9ca8785f1098461646d607ef6b00d47 Reviewed-on: https://go-review.googlesource.com/c/go/+/706417 Auto-Submit: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
2026-02-27runtime: do signal stack clearing when parking MsDaniel Morsing
Clearing signal stacks during STW meant an added latency that was linear with respect to the number of Ms, parked or running. Since that number be quite high, we need an alternate scheme. Instead of clearing in the GC cycle, clear the signal stack whenever an M is parked and has the potential to stay parked until the end of the next GC cycle. This implements the wanted behavior for runtime/secret at the cost of a little bit of extra latency that will be dwarfed by the time it takes to perform a syscall. Change-Id: Ieb9618f46736c34486e17a3d6185661a98756d0d Reviewed-on: https://go-review.googlesource.com/c/go/+/724282 Auto-Submit: Daniel Morsing <daniel.morsing@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2026-02-10runtime: put a bool in front of initialization-done channelIan Lance Taylor
Calls to Go functions from threads not started by Go have to wait for Go initialization to be complete. Before this CL they did this by receiving from a channel that is closed when initialization is done. That works well but introduces a channel operation into cgo calls. This is particularly frustrating because the channel is approximately always closed. This CL adds an atomic bool before the channel, so that in the normal case we are just adding a single locked memory load. We still use the channel as a fallback. For #77522 Change-Id: I8f609bf349bb0f836cefa5f6ad6d0c3c7bbfe5e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/743940 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
2025-12-23runtime: fix nGsyscallNoP accountingMichael Anthony Knyszek
CL 726964 has two bugs. One is fairly obvious. Where there was previous a decrement of nGsyscallNoP in exitsyscallTryGetP, it added a call to addGSyscallNoP. Oops. The other is more subtle. In needm we set isExtraInC to false very early. This will cause exitsyscall (via cgocallbackg) to decrement nGsyscallNoP when the thread never had a corresponding increment. (It could not have, otherwise it would not have called needm, on Linux anyway.) The fix is simple: increment nGsyscallNoP. CL 726964 actually removed this increment erroneously. I'm pretty sure I removed it because the first bug was the real issue, and removing this increment "fixed it" in the context of the test. I was right that this case was subtle, but wrong about how. Fixes #76435. Change-Id: I1ff1dfbf43bd4cf536b0965da370fee58e3f8753 Reviewed-on: https://go-review.googlesource.com/c/go/+/732320 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-12runtime/secret: restore goroutine behavior to proposalDaniel Morsing
During review of CL 704615, a suggestion was made that spawning a goroutine inside a call to secret.Do result in a panic. I agreed with this at the time, but had missed that this had been extensively discussed on the proposal. Revert the behavior back to what was agreed upon. Change-Id: Ifaa9e24bd03ecbd870ae2217137d1a9527c96842 Reviewed-on: https://go-review.googlesource.com/c/go/+/728920 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-12-12runtime: dropg after emitting trace event in preemptParkMichael Anthony Knyszek
Because we dropg before emitting a trace event in preemptPark, we end up failing to emit a status for the goroutine if this happens to be the first event for it in the generation. We only really see this with multiple subscribers in TestSubscribers. This is for two reasons: 1. If we are missing a status event for a non-initial generation then the trace parser won't validate that (an oversight, but we can only enforce that for new traces because of this bug), and 2. If we're starting the tracer fresh, then we have a STW which effectively guarantees that the first event for a goroutine cannot come from preemptPark. Therefore, we cannot observe this situation unless the first generation manifests the bug, but prior to having flight recording and/or multiple subscribers being able to "cut" the trace data at any point, this was impossible. The fix is simple: dropg only after emitting the trace event. This is also safe, because the tracer doesn't care. The tracer will also start taking a stack trace of the goroutine in this circumstance, but that is also safe, since we are able to generally unwind the stack of asynchronously preempted goroutines, and here we're at the very, very end of asynchronous preemption where all the state to do so is already set up. Fixes #75665. Change-Id: I7ee1142697d0a53b62d4c5647aa53775d2f6976a Reviewed-on: https://go-review.googlesource.com/c/go/+/729400 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-12-11runtime: make goroutines inherit DIT state, don't lock to OS threadRoland Shoemaker
When we first implemented DIT (crypto/subtle.WithDataIndependentTiming), we made it so that enabling DIT on a goroutine would lock that goroutine to its current OS thread. This was done to ensure that the DIT state (which is per-thread) would not leak to other goroutines. We also did not make goroutines inherit the DIT state. This change makes goroutines inherit the DIT state from their parent at creation time. It also removes the OS thread locking when enabling DIT on a goroutine. Instead, we now set the DIT state on the OS thread in the scheduler whenever we switch to a goroutine that has DIT enabled, and we unset it when switching to a goroutine that has DIT disabled. We add a new field to G and M, ditEnabled, to track whether the G wants DIT enabled, and whether the M currently has DIT enabled, respectively. When the scheduler executes a goroutine, it checks these fields and enables/disables DIT on the thread as needed. Additionally, cgocallbackg is updated to check if DIT is enabled when being called from C, and sets the G and M fields accordingly. This ensures that if DIT was enabled/disabled in C, the correct state will be reflected in the Go runtime. The behavior as it currently stands is as follows: - The function passed to crypto/subtle.WithDataIndependentTiming will have DIT enabled. - Any goroutine created within that function will inherit DIT enabled for its lifetime. Any goroutine created from subquent goroutines will also inherit DIT enabled for their lifetimes. - Calling into a C function within from a goroutine with DIT enabled will have DIT enabled. - If the C code disables DIT, the goroutine will have DIT re-enabled when returning to Go. - If the C code enables DIT, the goroutine will have DIT disabled when returning to Go if it was not previously enabled. - Calling back into Go code from C will have DIT enabled if it was enabled when calling into C, or if the C code enabled it. Change-Id: I8e91e6df13bb88e56e1036e0e0e5f04efd8eebd3 Reviewed-on: https://go-review.googlesource.com/c/go/+/726382 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-12-05runtime: don't count nGsyscallNoP for extra Ms in CMichael Anthony Knyszek
In #76435, it turns out that the new metric /sched/goroutines/not-in-go:goroutines counts C threads that have called into Go before (on Linux) as not-in-go goroutines. The reason for this is that the M is still attached to the C thread on Linux as an optimization, so we don't go through all the trouble of detaching the M and, of course, decrementing nGsyscallNoP. There's an easy fix to this accounting issue. The flag on the M, isExtraInC, says whether a thread with an extra M attached no longer has any Go on its (logical) stack. When we take the P from an M in this state, we simply just don't increment nGsyscallNoP. When it calls back into Go, we similarly skip the decrement to nGsyscallNoP. This is more efficient than alternatives, like always updating nGsyscallNoP in cgocallbackg, since that would add a new read-modify-write atomic onto that fast path. It does mean we count threads in C with a P still attached as not-in-go, but this transient in most real programs, assuming the thread indeed does not call back into Go any time soon. Fixes #76435. Change-Id: Id05563bacbe35d3fae17d67fb5ed45fa43fa0548 Reviewed-on: https://go-review.googlesource.com/c/go/+/726964 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-11-26runtime/secret: implement new secret packageDaniel Morsing
Implement secret.Do. - When secret.Do returns: - Clear stack that is used by the argument function. - Clear all the registers that might contain secrets. - On stack growth in secret mode, clear the old stack. - When objects are allocated in secret mode, mark them and then zero the marked objects immediately when they are freed. - If the argument function panics, raise that panic as if it originated from secret.Do. This removes anything about the secret function from tracebacks. For now, this is only implemented on linux for arm64 and amd64. This is a rebased version of Keith Randalls initial implementation at CL 600635. I have added arm64 support, signal handling, preemption handling and dealt with vDSOs spilling into system stacks. Fixes #21865 Change-Id: I6fbd5a233beeaceb160785e0c0199a5c94d8e520 Co-authored-by: Keith Randall <khr@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/704615 Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-11-26crypto/fips140: add WithoutEnforcementDaniel Morsing
WithoutEnforcement lets programs running under GODEBUG=fips140=only selectively opt out of strict enforcement. This is especially helpful for non-critical uses of cryptography routines like SHA-1 for content addressable storage backends (E.g. git). Fixes #74630 Change-Id: Iabba1f5eb63498db98047aca45e09c5dccf2fbdf Reviewed-on: https://go-review.googlesource.com/c/go/+/723720 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-11-20[dev.simd] all: merge master (ca37d24) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/typecheck/builtin.go Merge List: + 2025-11-20 ca37d24e0b net/http: drop unused "broken" field from persistConn + 2025-11-20 4b740af56a cmd/internal/obj/x86: handle global reference in From3 in dynlink mode + 2025-11-20 790384c6c2 spec: adjust rule for type parameter on RHS of alias declaration + 2025-11-20 a49b0302d0 net/http: correctly close fake net.Conns + 2025-11-20 32f5aadd2f cmd/compile: stack allocate backing stores during append + 2025-11-20 a18aff8057 runtime: select GC mark workers during start-the-world + 2025-11-20 829779f4fe runtime: split findRunnableGCWorker in two + 2025-11-20 ab59569099 go/version: use "custom" as an example of a version suffix + 2025-11-19 c4bb9653ba cmd/compile: Implement LoweredZeroLoop with LSX Instruction on loong64 + 2025-11-19 7f2ae21fb4 cmd/internal/obj/loong64: add MULW.D.W[U] instructions + 2025-11-19 a2946f2385 crypto: add Encapsulator and Decapsulator interfaces + 2025-11-19 6b83bd7146 crypto/ecdh: add KeyExchanger interface + 2025-11-19 4fef9f8b55 go/types, types2: fix object path for grouped declaration statements + 2025-11-19 33529db142 spec: escape double-ampersands + 2025-11-19 dc42565a20 cmd/compile: fix control flow for unsigned divisions proof relations + 2025-11-19 e64023dcbf cmd/compile: cleanup useless if statement in prove + 2025-11-19 2239520d1c test: go fmt prove.go tests + 2025-11-19 489d3dafb7 math: switch s390x math.Pow to generic implementation + 2025-11-18 8c41a482f9 runtime: add dlog.hexdump + 2025-11-18 e912618bd2 runtime: add hexdumper + 2025-11-18 2cf9d4b62f Revert "net/http: do not discard body content when closing it within request handlers" + 2025-11-18 4d0658bb08 cmd/compile: prefer fixed registers for values + 2025-11-18 ba634ca5c7 cmd/compile: fold boolean NOT into branches + 2025-11-18 8806d53c10 cmd/link: align sections, not symbols after DWARF compress + 2025-11-18 c93766007d runtime: do not print recovered when double panic with the same value + 2025-11-18 9859b43643 cmd/asm,cmd/compile,cmd/internal/obj/riscv: use compressed instructions on riscv64 + 2025-11-17 b9ef0633f6 cmd/internal/sys,internal/goarch,runtime: enable the use of compressed instructions on riscv64 + 2025-11-17 a087dea869 debug/elf: sync new loong64 relocation types up to LoongArch ELF psABI v20250521 + 2025-11-17 e1a12c781f cmd/compile: use 32x32->64 multiplies on arm64 + 2025-11-17 6caab99026 runtime: relax TestMemoryLimit on darwin a bit more + 2025-11-17 eda2e8c683 runtime: clear frame pointer at thread entry points + 2025-11-17 6919858338 runtime: rename findrunnable references to findRunnable + 2025-11-17 8e734ec954 go/ast: fix BasicLit.End position for raw strings containing \r + 2025-11-17 592775ec7d crypto/mlkem: avoid a few unnecessary inverse NTT calls + 2025-11-17 590cf18daf crypto/mlkem/mlkemtest: add derandomized Encapsulate768/1024 + 2025-11-17 c12c337099 cmd/compile: teach prove about subtract idioms + 2025-11-17 bc15963813 cmd/compile: clean up prove pass + 2025-11-17 1297fae708 go/token: add (*File).End method + 2025-11-17 65c09eafdf runtime: hoist invariant code out of heapBitsSmallForAddrInline + 2025-11-17 594129b80c internal/runtime/maps: update doc for table.Clear + 2025-11-15 c58d075e9a crypto/rsa: deprecate PKCS#1 v1.5 encryption + 2025-11-14 d55ecea9e5 runtime: usleep before stealing runnext only if not in syscall + 2025-11-14 410ef44f00 cmd: update x/tools to 59ff18c + 2025-11-14 50128a2154 runtime: support runtime.freegc in size-specialized mallocs for noscan objects + 2025-11-14 c3708350a4 cmd/go: tests: rename git-min-vers->git-sha256 + 2025-11-14 aea881230d std: fix printf("%q", int) mistakes + 2025-11-14 120f1874ef runtime: add more precise test of assist credit handling for runtime.freegc + 2025-11-14 fecfcaa4f6 runtime: add runtime.freegc to reduce GC work + 2025-11-14 5a347b775e runtime: set GOEXPERIMENT=runtimefreegc to disabled by default + 2025-11-14 1a03d0db3f runtime: skip tests for GOEXPERIMENT=arenas that do not handle clobberfree=1 + 2025-11-14 cb0d9980f5 net/http: do not discard body content when closing it within request handlers + 2025-11-14 03ed43988f cmd/compile: allow multi-field structs to be stored directly in interfaces + 2025-11-14 1bb1f2bf0c runtime: put AddCleanup cleanup arguments in their own allocation + 2025-11-14 9fd2e44439 runtime: add AddCleanup benchmark + 2025-11-14 80c91eedbb runtime: ensure weak handles end up in their own allocation + 2025-11-14 7a8d0b5d53 runtime: add debug mode to extend _Grunning-without-P windows + 2025-11-14 710abf74da internal/runtime/cgobench: add Go function call benchmark for comparison + 2025-11-14 b24aec598b doc, cmd/internal/obj/riscv: document the riscv64 assembler + 2025-11-14 a0e738c657 cmd/compile/internal: remove incorrect riscv64 SLTI rule + 2025-11-14 2cdcc4150b cmd/compile: fold negation into multiplication + 2025-11-14 b57962b7c7 bytes: fix panic in bytes.Buffer.Peek + 2025-11-14 0a569528ea cmd/compile: optimize comparisons with single bit difference + 2025-11-14 1e5e6663e9 cmd/compile: remove unnecessary casts and types from riscv64 rules + 2025-11-14 ddd8558e61 go/types, types2: swap object.color for Checker.objPathIdx + 2025-11-14 9daaab305c cmd/link/internal/ld: make runtime.buildVersion with experiments valid + 2025-11-13 d50a571ddf test: fix tests to work with sizespecializedmalloc turned off + 2025-11-13 704f841eab cmd/trace: annotation proc start/stop with thread and proc always + 2025-11-13 17a02b9106 net/http: remove unused isLitOrSingle and isNotToken + 2025-11-13 ff61991aed cmd/go: fix flaky TestScript/mod_get_direct + 2025-11-13 129d0cb543 net/http/cgi: accept INCLUDED as protocol for server side includes + 2025-11-13 77c5130100 go/types: minor simplification + 2025-11-13 7601cd3880 go/types: generate cycles.go + 2025-11-13 7a372affd9 go/types, types2: rename definedType to declaredType and clarify docs Change-Id: Ibaa9bdb982364892f80e511c1bb12661fcd5fb86
2025-11-20runtime: select GC mark workers during start-the-worldMichael Pratt
When the GC starts today, procresize and startTheWorldWithSema don't consider the additional Ps required to run the mark workers. procresize and startTheWorldWithSema resume only the Ps necessary to run the normal user goroutines. Once those Ps start, findRunnable and findRunnableGCWorker determine that a GC worker is necessary and run the worker instead, calling wakep to wake another P to run the original user goroutine. This is unfortunate because it disrupts the intentional placement of Ps on Ms that procresize does. It also has the unfortunate side effect of slightly delaying start-the-world time, as it takes several sequential wakeps to get all Ps started. To address this, procresize explicitly assigns GC mark workers to Ps before starting the world. The assignment occurs _after_ selecting runnable Ps, so that we prefer to select Ps that were previously idle. Note that if fewer than 25% of Ps are idle then we won't be able to assign all dedicated workers, and some of the Ps intended for user goroutines will convert to dedicated workers once they reach findRunnableGCWorker. Also note that stack scanning temporarily suspends the goroutine. Resume occurs through ready, which will move the goroutine to the local runq of the P that did the scan. Thus there is still a source of migration at some point during the GC. For #65694. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Change-Id: I6a6a636c51f39f4f4bc716aa87de68f6ebe163a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/721002 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-11-17runtime: rename findrunnable references to findRunnableMichael Pratt
These cases were missed by CL 393880. Change-Id: I6a6a636cf0d97a4efcf4b9df766002ecef48b4de Reviewed-on: https://go-review.googlesource.com/c/go/+/721120 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-11-14runtime: usleep before stealing runnext only if not in syscallMichael Anthony Knyszek
In the scheduler's steal path, we usleep(3) before stealing a _Prunning P's runnext slot. Before CL 646198, we would not call usleep(3) if the P was in _Psyscall. After CL 646198, Ps with Gs in syscalls stay in _Prunning until stolen, meaning we might unnecessarily usleep(3) where we didn't before. This probably isn't a huge deal in most cases, but can cause some apparent slowdowns in microbenchmarks that frequently take the steal path while there are syscalling goroutines. Change-Id: I5bf3df10fe61cf8d7f0e9fe9522102de66faf344 Reviewed-on: https://go-review.googlesource.com/c/go/+/720441 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-11-14runtime: add debug mode to extend _Grunning-without-P windowsMichael Anthony Knyszek
This was suggested in CL 646198, and I tested with it, I forgot to push it so it wasn't merged. I think it might be worth keeping. Change-Id: Ibf97d969fe7d0eeb365f5f7b1fbeadea3a1076ab Reviewed-on: https://go-review.googlesource.com/c/go/+/716580 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-13[dev.simd] all: merge master (57362e9) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/ir/symtab.go - src/cmd/compile/internal/ssa/prove.go - src/cmd/compile/internal/ssa/rewriteAMD64.go - src/cmd/compile/internal/ssagen/intrinsics.go - src/cmd/compile/internal/typecheck/builtin.go - src/internal/buildcfg/exp.go - src/internal/strconv/ftoa.go - test/codegen/stack.go Manually resolved some conflicts: - Use internal/strconv for simd.String, remove internal/ftoa - prove.go is just copied from the one on the main branch. We have cherry-picked the changes to prove.go to main branch, so our copy is identical to an old version of the one on the main branch. There are CLs landed after our cherry-picks. Just copy it over to adopt the new code. Merge List: + 2025-11-13 57362e9814 go/types, types2: check for direct cycles as a separate phase + 2025-11-13 099e0027bd cmd/go/internal/modfetch: consolidate global vars + 2025-11-13 028375323f cmd/go/internal/modfetch/codehost: fix flaky TestReadZip + 2025-11-13 4ebf295b0b runtime: prefer to restart Ps on the same M after STW + 2025-11-13 625d8e9b9c runtime/pprof: fix goroutine leak profile tests for noopt + 2025-11-13 4684a26c26 spec: remove cycle restriction for type parameters + 2025-11-13 0f9c8fb29d cmd/asm,cmd/internal/obj/riscv: add support for riscv compressed instructions + 2025-11-13 a15d036ce2 cmd/internal/obj/riscv: implement better bit pattern encoding + 2025-11-12 abb241a789 cmd/internal/obj/loong64: add {,X}VS{ADD,SUB}.{B/H/W/V}{,U} instructions support + 2025-11-12 0929d21978 cmd/go: keep objects alive while stopping cleanups + 2025-11-12 f03d06ec1a runtime: fix list test memory management for mayMoreStack + 2025-11-12 48127f656b crypto/internal/fips140/sha3: remove outdated TODO + 2025-11-12 c3d1d42764 sync/atomic: amend comments for Value.{Swap,CompareAndSwap} + 2025-11-12 e0807ba470 cmd/compile: don't clear ptrmask in fillptrmask + 2025-11-12 66318d2b4b internal/abi: correctly describe result in Name.Name doc comment + 2025-11-12 34aef89366 cmd/compile: use FCLASSD for subnormal checks on riscv64 + 2025-11-12 0c28789bd7 net/url: disallow raw IPv6 addresses in host + 2025-11-12 4e761b9a18 cmd/compile: optimize liveness in stackalloc + 2025-11-12 956909ff84 crypto/x509: move BetterTLS suite from crypto/tls + 2025-11-12 6525f46707 cmd/link: change shdr and phdr from arrays to slices + 2025-11-12 d3aeba1670 runtime: switch p.gcFractionalMarkTime to atomic.Int64 + 2025-11-12 8873e8bea2 runtime,runtime/pprof: clean up goroutine leak profile writing + 2025-11-12 b8b84b789e cmd/go: clarify the -o testflag is only for copying the binary + 2025-11-12 c761b26b56 mime: parse media types that contain braces + 2025-11-12 65858a146e os/exec: include Cmd.Start in the list of methods that run Cmd + 2025-11-11 4bfc3a9d14 std,cmd: go fix -any std cmd + 2025-11-11 2263d4aabd runtime: doubly-linked sched.midle list + 2025-11-11 046dce0e54 runtime: use new list type for spanSPMCs + 2025-11-11 5f11275457 runtime: reusable intrusive doubly-linked list + 2025-11-11 951cf0501b internal/trace/testtrace: fix flag name typos + 2025-11-11 2750f95291 cmd/go: implement accurate pseudo-versions for Mercurial + 2025-11-11 b709a3e8b4 cmd/go/internal/vcweb: cache hg servers + 2025-11-11 426ef30ecf cmd/go: implement -reuse for Mercurial repos + 2025-11-10 5241d114f5 spec: more precise prose for special case of append + 2025-11-10 cdf64106f6 go/types, types2: first argument to append must never be be nil + 2025-11-10 a0eb4548cf .gitignore: ignore go test artifacts + 2025-11-10 bf58e7845e internal/trace: add "command" to convert text traces to raw + 2025-11-10 052c192a4c runtime: fix lock rank for work.spanSPMCs.lock + 2025-11-10 bc5ffe5c79 internal/runtime/sys,math/bits: eliminate bounds checks on len8tab + 2025-11-10 32f8d6486f runtime: document that tracefpunwindoff applies to some profilers + 2025-11-10 1c1c1942ba cmd/go: remove redundant AVX regex in security flag checks + 2025-11-10 3b3d6b9e5d cmd/internal/obj/arm64: shorten constant integer loads + 2025-11-10 5f4b5f1a19 runtime/msan: use different msan routine for copying + 2025-11-10 0fe6c8e8c8 runtime: tweak wording for comment of mcache.flushGen + 2025-11-10 95a0e5adc1 sync: don't call Done when f() panics in WaitGroup.Go + 2025-11-08 e8ed85d6c2 cmd/go: update goSum if necessary + 2025-11-08 b76103c08e cmd/go: output missing GoDebug entries + 2025-11-07 47a63a331d cmd/go: rewrite hgrepo1 test repo to be deterministic + 2025-11-07 7995751d3a cmd/go: copy git reuse and support repos to hg + 2025-11-07 66c7ca7fb3 cmd/go: improve TestScript/reuse_git + 2025-11-07 de84ac55c6 cmd/link: clean up some comments to Go standards + 2025-11-07 5cd1b73772 runtime: correctly print panics before fatal-ing on defer + 2025-11-07 91ca80f970 runtime/cgo: improve error messages after pointer panic + 2025-11-07 d36e88f21f runtime: tweak wording for doc + 2025-11-06 ad3ccd92e4 cmd/link: move pclntab out of relro section + 2025-11-06 43b91e7abd iter: fix a tiny doc comment bug + 2025-11-06 48c7fa13c6 Revert "runtime: remove the pc field of _defer struct" + 2025-11-05 8111104a21 cmd/internal/obj/loong64: add {,X}VSHUF.{B/H/W/V} instructions support + 2025-11-05 2e2072561c cmd/internal/obj/loong64: add {,X}VEXTRINS.{B,H,W,V} instruction support + 2025-11-05 01c29d1f0b internal/chacha8rand: replace VORV with instruction VMOVQ on loong64 + 2025-11-05 f01a1841fd cmd/compile: fix error message on loong64 + 2025-11-05 8cf7a0b4c9 cmd/link: support weak binding on darwin + 2025-11-05 2dd7e94e16 cmd/go: use go.dev instead of golang.org in flag errors + 2025-11-05 28f1ad5782 cmd/go: fix TestScript/govcs + 2025-11-05 daa220a1c9 cmd/go: silence TLS handshake errors during test + 2025-11-05 3ae9e95002 cmd/go: fix TestCgoPkgConfig on darwin with pkg-config installed + 2025-11-05 a494a26bc2 cmd/go: fix TestScript/vet_flags + 2025-11-05 a8fb94969c cmd/go: fix TestScript/tool_build_as_needed + 2025-11-05 04f05219c4 cmd/cgo: skip escape checks if call site has no argument + 2025-11-04 9f3a108ee0 os: ignore O_TRUNC errors on named pipes and terminal devices on Windows + 2025-11-04 0e1bd8b5f1 cmd/link, runtime: don't store text start in pcHeader + 2025-11-04 7347b54727 cmd/link: don't generate .gosymtab section + 2025-11-04 6914dd11c0 cmd/link: add and use new SymKind SFirstUnallocated + 2025-11-04 f5f14262d0 cmd/link: remove misleading comment + 2025-11-04 61de3a9dae cmd/link: remove unused SFILEPATH symbol kind + 2025-11-04 8e2bd267b5 cmd/link: add comments for SymKind values + 2025-11-04 16705b962e cmd/compile: faster liveness analysis in regalloc + 2025-11-04 a5fe6791d7 internal/syscall/windows: fix ReOpenFile sentinel error value + 2025-11-04 a7d174ccaa cmd/compile/internal/ssa: simplify riscv64 FCLASSD rewrite rules + 2025-11-04 856238615d runtime: amend doc for setPinned + 2025-11-04 c7ccbddf22 cmd/compile/internal/ssa: more aggressive on dead auto elim + 2025-11-04 75b2bb1d1a cmd/cgo: drop pre-1.18 support + 2025-11-04 dd839f1d00 internal/strconv: handle %f with fixedFtoa when possible + 2025-11-04 6e165b4d17 cmd/compile: implement Avg64u, Hmul64, Hmul64u for wasm + 2025-11-04 9f6590f333 encoding/pem: don't reslice in failure modes + 2025-11-03 34fec512ce internal/strconv: extract fixed-precision ftoa from ftoaryu.go + 2025-11-03 162ba6cc40 internal/strconv: add tests and benchmarks for ftoaFixed + 2025-11-03 9795c7ba22 internal/strconv: fix pow10 off-by-one in exponent result + 2025-11-03 ad5e941a45 cmd/internal/obj/loong64: using {xv,v}slli.d to perform copying between vector registers + 2025-11-03 dadbac0c9e cmd/internal/obj/loong64: add VPERMI.W, XVPERMI.{W,V,Q} instruction support + 2025-11-03 e2c6a2024c runtime: avoid append in printint, printuint + 2025-11-03 c93cc603cd runtime: allow Stack to traceback goroutines in syscall _Grunning window + 2025-11-03 b5353fd90a runtime: don't panic in castogscanstatus + 2025-11-03 43491f8d52 cmd/cgo: use the export'ed file/line in error messages + 2025-11-03 aa94fdf0cc cmd/go: link to go.dev/doc/godebug for removed GODEBUG settings + 2025-11-03 4d2b03d2fc crypto/tls: add BetterTLS test coverage + 2025-11-03 0c4444e13d cmd/internal/obj: support arm64 FMOVQ large offset encoding + 2025-11-03 85bec791a0 cmd/go/testdata/script: loosen list_empty_importpath for freebsd + 2025-11-03 17b57078ab internal/runtime/cgobench: add cgo callback benchmark + 2025-11-03 5f8fdb720c cmd/go: move functions to methods + 2025-11-03 0a95856b95 cmd/go: eliminate additional global variable + 2025-11-03 f93186fb44 cmd/go/internal/telemetrystats: count cgo usage + 2025-11-03 eaf28a27fd runtime: update outdated comments for deferprocStack + 2025-11-03 e12d8a90bf all: remove extra space in the comments + 2025-11-03 c5559344ac internal/profile: optimize Parse allocs + 2025-11-03 5132158ac2 bytes: add Buffer.Peek + 2025-11-03 361d51a6b5 runtime: remove the pc field of _defer struct + 2025-11-03 00ee1860ce crypto/internal/constanttime: expose intrinsics to the FIPS 140-3 packages + 2025-11-02 388c41c412 cmd/go: skip git sha256 tests if git < 2.29 + 2025-11-01 385dc33250 runtime: prevent time.Timer.Reset(0) from deadlocking testing/synctest tests + 2025-10-31 99b724f454 cmd/go: document purego convention + 2025-10-31 27937289dc runtime: avoid zeroing scavenged memory + 2025-10-30 89dee70484 runtime: prioritize panic output over racefini + 2025-10-30 8683bb846d runtime: optimistically CAS atomicstatus directly in enter/exitsyscall + 2025-10-30 5b8e850340 runtime: don't track scheduling latency for _Grunning <-> _Gsyscall + 2025-10-30 251814e580 runtime: document tracer invariants explicitly + 2025-10-30 7244e9221f runtime: eliminate _Psyscall + 2025-10-30 5ef19c0d0c strconv: delete divmod1e9 + 2025-10-30 d32b1f02c3 runtime: delete timediv + 2025-10-30 cbbd385cb8 strconv: remove arch-specific decision in formatBase10 + 2025-10-30 6aca04a73a reflect: correct internal docs for uncommonType + 2025-10-30 235b4e729d cmd/compile/internal/ssa: model right shift more precisely + 2025-10-30 d44db293f9 go/token: fix a typo in a comment + 2025-10-30 cdc6b559ca strconv: remove hand-written divide on 32-bit systems + 2025-10-30 1e5bb416d8 cmd/compile: implement bits.Mul64 on 32-bit systems + 2025-10-30 38317c44e7 crypto/internal/fips140/aes: fix CTR generator + 2025-10-29 3be9a0e014 go/types, types: proceed with correct (invalid) type in case of a selector error + 2025-10-29 d2c5fa0814 strconv: remove &0xFF trick in formatBase10 + 2025-10-29 9bbda7c99d cmd/compile: make prove understand div, mod better + 2025-10-29 915c1839fe test/codegen: simplify asmcheck pattern matching + 2025-10-29 32ee3f3f73 runtime: tweak example code for gorecover + 2025-10-29 da3fb90b23 crypto/internal/fips140/bigmod: fix extendedGCD comment + 2025-10-29 9035f7aea5 runtime: use internal/strconv + 2025-10-29 49c1da474d internal/itoa, internal/runtime/strconv: delete + 2025-10-29 b2a346bbd1 strconv: move all but Quote to internal/strconv + 2025-10-28 041f564b3e internal/runtime/gc/scan: avoid memory destination on VPCOMPRESSQ + 2025-10-28 81afd3a59b cmd/compile: extend ppc64 MADDLD to match const ADDconst & MULLDconst + 2025-10-28 ea50d61b66 cmd/compile: name change isDirect -> isDirectAndComparable + 2025-10-28 bd4dc413cd cmd/compile: don't optimize away a panicing interface comparison + 2025-10-28 30c047d0d0 cmd/compile: extend loong MOV*idx rules to match ADDshiftLLV + 2025-10-28 46e5e2b09a runtime: define PanicBounds in funcdata.h + 2025-10-28 3da0356685 crypto/internal/fips140test: collect 300M entropy samples for ESV + 2025-10-28 d5953185d5 runtime: amend comments a bit + 2025-10-28 12c8d14d94 errors: document that the target of Is must be comparable + 2025-10-28 1f4d14e493 go/types, types2: pull up package-level object sort to a separate phase + 2025-10-28 b8aa1ee442 go/types, types2: reduce locks held at once in resolveUnderlying + 2025-10-28 24af441437 cmd/compile: rewrite proved multiplies by 0 or 1 into CondSelect + 2025-10-28 2d33a456c6 cmd/compile: move branchelim supported arches to Config + 2025-10-27 2c91c33e88 crypto/subtle,cmd/compile: add intrinsics for ConstantTimeSelect and *Eq + 2025-10-27 73d7635fae cmd/compile: add generic rules to remove bool → int → bool roundtrips + 2025-10-27 1662d55247 cmd/compile: do not Zext bools to 64bits in amd64 CMOV generation rules + 2025-10-27 b8468d8c4e cmd/compile: introduce bytesizeToConst to cleanup switches in prove + 2025-10-27 9e25c2f6de cmd/link: internal linking support for windows/arm64 + 2025-10-27 ff2ebf69c4 internal/runtime/gc/scan: correct size class size check + 2025-10-27 9a77aa4f08 cmd/compile: add position info to sccp debug messages + 2025-10-27 77dc138030 cmd/compile: teach prove about unsigned rounding-up divide + 2025-10-27 a0f33b2887 cmd/compile: change !l.nonzero() into l.maybezero() + 2025-10-27 5453b788fd cmd/compile: optimize Add64carry with unused carries into plain Add64 + 2025-10-27 2ce5aab79e cmd/compile: remove 68857 ModU flowLimit workaround in prove + 2025-10-27 a50de4bda7 cmd/compile: remove 68857 min & max flowLimit workaround in prove + 2025-10-27 53be78630a cmd/compile: use topo-sort in prove to correctly learn facts while walking once + 2025-10-27 dec2b4c83d runtime: avoid bound check in freebsd binuptime + 2025-10-27 916e682d51 cmd/internal/obj, cmd/asm: reclassify the offset of memory access operations on loong64 + 2025-10-27 2835b994fb cmd/go: remove global loader state variable + 2025-10-27 139f89226f cmd/go: use local state for telemetry + 2025-10-27 8239156571 cmd/go: use tagged switch + 2025-10-27 d741483a1f cmd/go: increase stmt threshold on amd64 + 2025-10-27 a6929cf4a7 cmd/go: removed unused code in toolchain.Exec + 2025-10-27 180c07e2c1 go/types, types2: clarify docs for resolveUnderlying + 2025-10-27 d8a32f3d4b go/types, types2: wrap Named.fromRHS into Named.rhs + 2025-10-27 b2af92270f go/types, types2: verify stateMask transitions in debug mode + 2025-10-27 92decdcbaa net/url: further speed up escape and unescape + 2025-10-27 5f4ec3541f runtime: remove unused cgoCheckUsingType function + 2025-10-27 189f2c08cc time: rewrite IsZero method to use wall and ext fields + 2025-10-27 f619b4a00d cmd/go: reorder parameters so that context is first + 2025-10-27 f527994c61 sync: update comments for Once.done + 2025-10-26 5dcaf9a01b runtime: add GOEXPERIMENT=runtimefree + 2025-10-26 d7a52f9369 cmd/compile: use MOV(D|F) with const for Const(64|32)F on riscv64 + 2025-10-26 6f04a92be3 internal/chacha8rand: provide vector implementation for riscv64 + 2025-10-26 54e3adc533 cmd/go: use local loader state in test + 2025-10-26 ca379b1c56 cmd/go: remove loaderstate dependency + 2025-10-26 83a44bde64 cmd/go: remove unused loader state + 2025-10-26 7e7cd9de68 cmd/go: remove temporary rf cleanup script + 2025-10-26 53ad68de4b cmd/compile: allow unaligned load/store on Wasm + 2025-10-25 12ec09f434 cmd/go: use local state object in work.runBuild and work.runInstall + 2025-10-24 643f80a11f runtime: add ppc and s390 to 32 build constraints for gccgo + 2025-10-24 0afbeb5102 runtime: add ppc and s390 to linux 32 bits syscall build constraints for gccgo + 2025-10-24 7b506d106f cmd/go: use local state object in `generate.runGenerate` + 2025-10-24 26a8a21d7f cmd/go: use local state object in `env.runEnv` + 2025-10-24 f2dd3d7e31 cmd/go: use local state object in `vet.runVet` + 2025-10-24 784700439a cmd/go: use local state object in pkg `workcmd` + 2025-10-24 69673e9be2 cmd/go: use local state object in `tool.runTool` + 2025-10-24 2e12c5db11 cmd/go: use local state object in `test.runTest` + 2025-10-24 fe345ff2ae cmd/go: use local state object in `modget.runGet` + 2025-10-24 d312e27e8b cmd/go: use local state object in pkg `modcmd` + 2025-10-24 ea9cf26aa1 cmd/go: use local state object in `list.runList` + 2025-10-24 9926e1124e cmd/go: use local state object in `bug.runBug` + 2025-10-24 2c4fd7b2cd cmd/go: use local state object in `run.runRun` + 2025-10-24 ade9f33e1f cmd/go: add loaderstate as field on `mvsReqs` + 2025-10-24 ccf4192a31 cmd/go: make ImportMissingError work with local state + 2025-10-24 f5403f15f0 debug/pe: check for zdebug_gdb_scripts section in testDWARF + 2025-10-24 a26f860fa4 runtime: use 32-bit hash for maps on Wasm + 2025-10-24 747fe2efed encoding/json/v2: fix typo in documentation about errors.AsType + 2025-10-24 94f47fc03f cmd/link: remove pointless assignment in SetSymAlign + 2025-10-24 e6cff69051 crypto/x509: move constraint checking after chain building + 2025-10-24 f5f69a3de9 encoding/json/jsontext: avoid pinning application data in pools + 2025-10-24 a6a59f0762 encoding/json/v2: use slices.Sort directly + 2025-10-24 0d3dab9b1d crypto/x509: simplify candidate chain filtering + 2025-10-24 29046398bb cmd/go: refactor injection of modload.LoaderState + 2025-10-24 c18fa69e52 cmd/go: make ErrNoModRoot work with local state + 2025-10-24 296ecc918d cmd/go: add modload.State parameter to AllowedFunc + 2025-10-24 c445a61e52 cmd/go: add loaderstate as field on `QueryMatchesMainModulesError` + 2025-10-24 6ac40051d3 cmd/go: remove module loader state from ccompile + 2025-10-24 6a5a452528 cmd/go: inject vendor dir into builder struct + 2025-10-23 dfac972233 crypto/pbkdf2: add missing error return value in example + 2025-10-23 47bf8f073e unique: fix inconsistent panic prefix in canonmap cleanup path + 2025-10-23 03bd43e8bb go/types, types2: rename Named.resolve to unpack + 2025-10-23 9fcdc814b2 go/types, types2: rename loaded namedState to lazyLoaded + 2025-10-23 8401512a9b go/types, types2: rename complete namedState to hasMethods + 2025-10-23 cf826bfcb4 go/types, types2: set t.underlying exactly once in resolveUnderlying + 2025-10-23 c4e910895b net/url: speed up escape and unescape + 2025-10-23 3f6ac3a10f go/build: use slices.Equal + 2025-10-23 839da71f89 encoding/pem: properly calculate end indexes + 2025-10-23 39ed968832 cmd: update golang.org/x/arch for riscv64 disassembler + 2025-10-23 ca448191c9 all: replace Split in loops with more efficient SplitSeq + 2025-10-23 107fcb70de internal/goroot: replace HasPrefix+TrimPrefix with CutPrefix + 2025-10-23 8378276d66 strconv: optimize int-to-decimal and use consistently + 2025-10-23 e5688d0bdd cmd/internal/obj/riscv: simplify validation and encoding of raw instructions + 2025-10-22 77fc27972a doc/next: improve new(expr) release note + 2025-10-22 d94a8c56ad runtime: cleanup pagetrace + 2025-10-22 02728a2846 crypto/internal/fips140test: add entropy SHA2-384 testing + 2025-10-22 f92e01c117 runtime/cgo: fix cgoCheckArg description + 2025-10-22 50586182ab runtime: use backoff and ISB instruction to reduce contention in (*lfstack).pop and (*spanSet).pop on arm64 + 2025-10-22 1ff59f3dd3 strconv: clean up powers-of-10 table, tests + 2025-10-22 7c9fa4d5e9 cmd/go: check if build output should overwrite files with renames + 2025-10-22 557b4d6e0f comment: change slice to string in function comment/help + 2025-10-22 d09a8c8ef4 go/types, types2: simplify locking in Named.resolveUnderlying + 2025-10-22 5a42af7f6c go/types, types2: in resolveUnderlying, only compute path when needed + 2025-10-22 4bdb55b5b8 go/types, types2: rename Named.under to Named.resolveUnderlying + 2025-10-21 29d43df8ab go/build, cmd/go: use ast.ParseDirective for go:embed + 2025-10-21 4e695dd634 go/ast: add ParseDirective for parsing directive comments + 2025-10-21 06e57e60a7 go/types, types2: only report version errors if new(expr) is ok otherwise + 2025-10-21 6c3d0d259f path/filepath: reword documentation for Rel + 2025-10-21 39fd61ddb0 go/types, types2: guard Named.underlying with Named.mu + 2025-10-21 4a0115c886 runtime,syscall: implement and use syscalln on darwin + 2025-10-21 261c561f5a all: gofmt -w + 2025-10-21 c9c78c06ef strconv: embed testdata in test + 2025-10-21 8f74f9daf4 sync: re-enable race even when panicking + 2025-10-21 8a6c64f4fe syscall: use rawSyscall6 to call ptrace in forkAndExecInChild + 2025-10-21 4620db72d2 runtime: use timer_settime64 on 32-bit Linux + 2025-10-21 b31dc77cea os: support deleting read-only files in RemoveAll on older Windows versions + 2025-10-21 46cc532900 cmd/compile/internal/ssa: fix typo in comment + 2025-10-21 2163a58021 crypto/internal/fips140/entropy: increase AllocsPerRun iterations + 2025-10-21 306eacbc11 cmd/go/testdata/script: disable list_empty_importpath test on Windows + 2025-10-21 a5a249d6a6 all: eliminate unnecessary type conversions + 2025-10-21 694182d77b cmd/internal/obj/ppc64: improve large prologue generation + 2025-10-21 b0dcb95542 cmd/compile: leave the horses alone + 2025-10-21 9a5a1202f4 runtime: clean dead architectures from go:build constraint + 2025-10-21 8539691d0c crypto/internal/fips140/entropy: move to crypto/internal/entropy/v1.0.0 + 2025-10-20 99cf4d671c runtime: save lasx and lsx registers in loong64 async preemption + 2025-10-20 79ae97fe9b runtime: make procyieldAsm no longer loop infinitely if passed 0 + 2025-10-20 f838faffe2 runtime: wrap procyield assembly and check for 0 + 2025-10-20 ee4d2c312d runtime/trace: dump test traces on validation failure + 2025-10-20 7b81a1e107 net/url: reduce allocs in Encode + 2025-10-20 e425176843 cmd/asm: fix typo in comment + 2025-10-20 dc9a3e2a65 runtime: fix generation skew with trace reentrancy + 2025-10-20 df33c17091 runtime: add _Gdeadextra status + 2025-10-20 7503856d40 cmd/go: inject loaderstate into matcher function + 2025-10-20 d57c3fd743 cmd/go: inject State parameter into `work.runInstall` + 2025-10-20 e94a5008f6 cmd/go: inject State parameter into `work.runBuild` + 2025-10-20 d9e6f95450 cmd/go: inject State parameter into `workcmd.runSync` + 2025-10-20 9769a61e64 cmd/go: inject State parameter into `modget.runGet` + 2025-10-20 f859799ccf cmd/go: inject State parameter into `modcmd.runVerify` + 2025-10-20 0f820aca29 cmd/go: inject State parameter into `modcmd.runVendor` + 2025-10-20 92aa3e9e98 cmd/go: inject State parameter into `modcmd.runInit` + 2025-10-20 e176dff41c cmd/go: inject State parameter into `modcmd.runDownload` + 2025-10-20 e7c66a58d5 cmd/go: inject State parameter into `toolchain.Select` + 2025-10-20 4dc3dd9a86 cmd/go: add loaderstate to Switcher + 2025-10-20 bcf7da1595 cmd/go: convert functions to methods + 2025-10-20 0d3044f965 cmd/go: make Reset work with any State instance + 2025-10-20 386d81151d cmd/go: make setState work with any State instance + 2025-10-20 a420aa221e cmd/go: inject State parameter into `tool.runTool` + 2025-10-20 441e7194a4 cmd/go: inject State parameter into `test.runTest` + 2025-10-20 35e8309be2 cmd/go: inject State parameter into `list.runList` + 2025-10-20 29a81624f7 cmd/go: inject state parameter into `fmtcmd.runFmt` + 2025-10-20 f7eaea02fd cmd/go: inject state parameter into `clean.runClean` + 2025-10-20 58a8fdb6cf cmd/go: inject State parameter into `bug.runBug` + 2025-10-20 8d0bef7ffe runtime: add linkname documentation and guidance + 2025-10-20 3e43f48cb6 encoding/asn1: use reflect.TypeAssert to improve performance + 2025-10-20 4ad5585c2c runtime: fix _rt0_ppc64x_lib on aix + 2025-10-17 a5f55a441e cmd/fix: add modernize and inline analyzers + 2025-10-17 80876f4b42 cmd/go/internal/vet: tweak help doc + 2025-10-17 b5aefe07e5 all: remove unnecessary loop variable copies in tests + 2025-10-17 5137c473b6 go/types, types2: remove references to under function in comments + 2025-10-17 dbbb1bfc91 all: correct name for comments + 2025-10-17 0983090171 encoding/pem: properly decode strange PEM data + 2025-10-17 36863d6194 runtime: unify riscv64 library entry point + 2025-10-16 0c14000f87 go/types, types2: remove under(Type) in favor of Type.Underlying() + 2025-10-16 1099436f1b go/types, types2: change and enforce lifecycle of Named.fromRHS and Named.underlying fields + 2025-10-16 41f5659347 go/types, types2: remove superfluous unalias call (minor cleanup) + 2025-10-16 e7351c03c8 runtime: use DC ZVA instead of its encoding in WORD in arm64 memclr + 2025-10-16 6cbe0920c4 cmd: update to x/tools@7d9453cc + 2025-10-15 45eee553e2 cmd/internal/obj: move ARM64RegisterExtension from cmd/asm/internal/arch + 2025-10-15 27f9a6705c runtime: increase repeat count for alloc test + 2025-10-15 b68cebd809 net/http/httptest: record failed ResponseWriter writes + 2025-10-15 f1fed742eb cmd: fix three printf problems reported by newest vet + 2025-10-15 0984dcd757 cmd/compile: fix an error in comments + 2025-10-15 31f82877e8 go/types, types2: fix misleading internal comment + 2025-10-15 6346349f56 cmd/compile: replace angle brackets with square + 2025-10-15 284379cdfc cmd/compile: remove rematerializable values from live set across calls + 2025-10-15 519ae514ab cmd/compile: eliminate bound check for slices of the same length + 2025-10-15 b5a29cca48 cmd/distpack: add fix tool to inventory + 2025-10-15 bb5eb51715 runtime/pprof: fix errors in pprof_test + 2025-10-15 5c9a26c7f8 cmd/compile: use arm64 neon in LoweredMemmove/LoweredMemmoveLoop + 2025-10-15 61d1ff61ad cmd/compile: use block starting position for phi line number + 2025-10-15 5b29875c8e cmd/go: inject State parameter into `run.runRun` + 2025-10-15 5113496805 runtime/pprof: skip flaky test TestProfilerStackDepth/heap for now + 2025-10-15 36086e85f8 cmd/go: create temporary cleanup script + 2025-10-14 7056c71d32 cmd/compile: disable use of new saturating float-to-int conversions + 2025-10-14 6d5b13793f Revert "cmd/compile: make 386 float-to-int conversions match amd64" + 2025-10-14 bb2a14252b Revert "runtime: adjust softfloat corner cases to match amd64/arm64" + 2025-10-14 3bc9d9fa83 Revert "cmd/compile: make wasm match other platforms for FP->int32/64 conversions" + 2025-10-14 ee5af46172 encoding/json: avoid misleading errors under goexperiment.jsonv2 + 2025-10-14 11d3d2f77d cmd/internal/obj/arm64: add support for PAC instructions + 2025-10-14 4dbf1a5a4c cmd/compile/internal/devirtualize: do not track assignments to non-PAUTO + 2025-10-14 0ddb5ed465 cmd/compile/internal/devirtualize: use FatalfAt instead of Fatalf where possible + 2025-10-14 0a239bcc99 Revert "net/url: disallow raw IPv6 addresses in host" + 2025-10-14 5a9ef44bc0 cmd/compile/internal/devirtualize: fix OCONVNOP assertion + 2025-10-14 3765758b96 go/types, types2: minor cleanup (remove TODO) + 2025-10-14 f6b9d56aff crypto/internal/fips140/entropy: fix benign race + 2025-10-14 60f6d2f623 crypto/internal/fips140/entropy: support SHA-384 sizes for ACVP tests + 2025-10-13 6fd8e88d07 encoding/json/v2: restrict presence of default options + 2025-10-13 1abc6b0204 go/types, types2: permit type cycles through type parameter lists + 2025-10-13 9fdd6904da strconv: add tests that Java once mishandled + 2025-10-13 9b8742f2e7 cmd/compile: don't depend on arch-dependent conversions in the compiler + 2025-10-13 0e64ee1286 encoding/json/v2: report EOF for top-level values in UnmarshalDecode + 2025-10-13 6bcd97d9f4 all: replace calls to errors.As with errors.AsType + 2025-10-11 1cd71689f2 crypto/x509: rework fix for CVE-2025-58187 + 2025-10-11 8aa1efa223 cmd/link: in TestFallocate, only check number of blocks on Darwin + 2025-10-10 b497a29d25 encoding/json: fix regression in quoted numbers under goexperiment.jsonv2 + 2025-10-10 48bb7a6114 cmd/compile: repair bisection behavior for float-to-unsigned conversion + 2025-10-10 e8a53538b4 runtime: fail TestGoroutineLeakProfile on data race + 2025-10-10 e3be2d1b2b net/url: disallow raw IPv6 addresses in host + 2025-10-10 aced4c79a2 net/http: strip request body headers on POST to GET redirects + 2025-10-10 584a89fe74 all: omit unnecessary reassignment + 2025-10-10 69e8279632 net/http: set cookie host to Request.Host when available + 2025-10-10 6f4c63ba63 cmd/go: unify "go fix" and "go vet" + 2025-10-10 955a5a0dc5 runtime: support arm64 Neon in async preemption + 2025-10-10 5368e77429 net/http: run TestRequestWriteTransport with fake time to avoid flakes + 2025-10-09 c53cb642de internal/buildcfg: enable greenteagc experiment for loong64 + 2025-10-09 954fdcc51a cmd/compile: declare no output register for loong64 LoweredAtomic{And,Or}32 ops + 2025-10-09 19a30ea3f2 cmd/compile: call generated size-specialized malloc functions directly + 2025-10-09 80f3bb5516 reflect: remove timeout in TestChanOfGC + 2025-10-09 9db7e30bb4 net/url: allow IP-literals with IPv4-mapped IPv6 addresses + 2025-10-09 8d810286b3 cmd/compile: make wasm match other platforms for FP->int32/64 conversions + 2025-10-09 b9f3accdcf runtime: adjust softfloat corner cases to match amd64/arm64 + 2025-10-09 78d75b3799 cmd/compile: make 386 float-to-int conversions match amd64 + 2025-10-09 0e466a8d1d cmd/compile: modify float-to-[u]int so that amd64 and arm64 match + 2025-10-08 4837fbe414 net/http/httptest: check whether response bodies are allowed + 2025-10-08 ee163197a8 path/filepath: return cleaned path from Rel + 2025-10-08 de9da0de30 cmd/compile/internal/devirtualize: improve concrete type analysis + 2025-10-08 ae094a1397 crypto/internal/fips140test: make entropy file pair names match + 2025-10-08 941e5917c1 runtime: cleanup comments from asm_ppc64x.s improvements + 2025-10-08 d945600d06 cmd/gofmt: change -d to exit 1 if diffs exist + 2025-10-08 d4830c6130 cmd/internal/obj: fix Link.Diag printf errors + 2025-10-08 e1ca1de123 net/http: format pprof.go + 2025-10-08 e5d004c7a8 net/http: update HTTP/2 documentation to reference new config features + 2025-10-08 97fd6bdecc cmd/compile: fuse NaN checks with other comparisons + 2025-10-07 78b43037dc cmd/go: refactor usage of `workFilePath` + 2025-10-07 bb1ca7ae81 cmd/go, testing: add TB.ArtifactDir and -artifacts flag + 2025-10-07 1623927730 cmd/go: refactor usage of `requirements` + 2025-10-07 a1661e776f Revert "crypto/internal/fips140/subtle: add assembly implementation of xorBytes for mips64x" + 2025-10-07 cb81270113 Revert "crypto/internal/fips140/subtle: add assembly implementation of xorBytes for mipsx" + 2025-10-07 f2d0d05d28 cmd/go: refactor usage of `MainModules` + 2025-10-07 f7a68d3804 archive/tar: set a limit on the size of GNU sparse file 1.0 regions + 2025-10-07 463165699d net/mail: avoid quadratic behavior in mail address parsing + 2025-10-07 5ede095649 net/textproto: avoid quadratic complexity in Reader.ReadResponse + 2025-10-07 5ce8cd16f3 encoding/pem: make Decode complexity linear + 2025-10-07 f6f4e8b3ef net/url: enforce stricter parsing of bracketed IPv6 hostnames + 2025-10-07 7dd54e1fd7 runtime: make work.spanSPMCs.all doubly-linked + 2025-10-07 3ee761739b runtime: free spanQueue on P destroy + 2025-10-07 8709a41d5e encoding/asn1: prevent memory exhaustion when parsing using internal/saferio + 2025-10-07 9b9d02c5a0 net/http: add httpcookiemaxnum GODEBUG option to limit number of cookies parsed + 2025-10-07 3fc4c79fdb crypto/x509: improve domain name verification + 2025-10-07 6e4007e8cf crypto/x509: mitigate DoS vector when intermediate certificate contains DSA public key + 2025-10-07 6f7926589d cmd/go: refactor usage of `modRoots` + 2025-10-07 11d5484190 runtime: fix self-deadlock on sbrk platforms + 2025-10-07 2e52060084 cmd/go: refactor usage of `RootMode` + 2025-10-07 f86ddb54b5 cmd/go: refactor usage of `ForceUseModules` + 2025-10-07 c938051dd0 Revert "cmd/compile: redo arm64 LR/FP save and restore" + 2025-10-07 6469954203 runtime: assert p.destroy runs with GC not running + 2025-10-06 4c0fd3a2b4 internal/goexperiment: remove the synctest GOEXPERIMENT + 2025-10-06 c1e6e49d5d fmt: reduce Errorf("x") allocations to match errors.New("x") + 2025-10-06 7fbf54bfeb internal/buildcfg: enable greenteagc experiment by default + 2025-10-06 7bfeb43509 cmd/go: refactor usage of `initialized` + 2025-10-06 1d62e92567 test/codegen: make sure assignment results are used. + 2025-10-06 4fca79833f runtime: delete redundant code in the page allocator + 2025-10-06 719dfcf8a8 cmd/compile: redo arm64 LR/FP save and restore + 2025-10-06 f3312124c2 runtime: remove batching from spanSPMC free + 2025-10-06 24416458c2 cmd/go: export type State + 2025-10-06 c2fb15164b testing/synctest: remove Run + 2025-10-06 ac2ec82172 runtime: bump thread count slack for TestReadMetricsSched + 2025-10-06 e74b224b7c crypto/tls: streamline BoGo testing w/ -bogo-local-dir + 2025-10-06 3a05e7b032 spec: close tag + 2025-10-03 2a71af11fc net/url: improve URL docs + 2025-10-03 ee5369b003 cmd/link: add LIBRARY statement only with -buildmode=cshared + 2025-10-03 1bca4c1673 cmd/compile: improve slicemask removal + 2025-10-03 38b26f29f1 cmd/compile: remove stores to unread parameters + 2025-10-03 003b5ce1bc cmd/compile: fix SIMD const rematerialization condition + 2025-10-03 d91148c7a8 cmd/compile: enhance prove to infer bounds in slice len/cap calculations + 2025-10-03 20c9377e47 cmd/compile: enhance the chunked indexing case to include reslicing + 2025-10-03 ad3db2562e cmd/compile: handle rematerialized op for incompatible reg constraint + 2025-10-03 18cd4a1fc7 cmd/compile: use the right type for spill slot + 2025-10-03 1caa95acfa cmd/compile: enhance prove to deal with double-offset IsInBounds checks + 2025-10-03 ec70d19023 cmd/compile: rewrite to elide Slicemask from len==c>0 slicing + 2025-10-03 10e7968849 cmd/compile: accounts rematerialize ops's output reginfo + 2025-10-03 ab043953cb cmd/compile: minor tweak for race detector + 2025-10-03 ebb72bef44 cmd/compile: don't treat devel compiler as a released compiler + 2025-10-03 c54dc1418b runtime: support valgrind (but not asan) in specialized malloc functions + 2025-10-03 a7917eed70 internal/buildcfg: enable specializedmalloc experiment + 2025-10-03 630799c6c9 crypto/tls: add flag to render HTML BoGo report Change-Id: I6bf904c523a77ee7d3dea9c8ae72292f8a5f2ba5
2025-11-13runtime: prefer to restart Ps on the same M after STWMichael Pratt
Today, Ps jump around arbitrarily across STW. Instead, try to keep the P on the previous M it ran on. In the future, we'll likely want to try to expand this beyond STW to create a more general affinity for specific Ms. For this to be useful, the Ps need to have runnable Gs. Today, STW preemption goes through goschedImpl, which places the G on the global run queue. If that was the only G then the P won't have runnable goroutines anymore. It makes more sense to keep the G with its P across STW anyway, so add a special case to goschedImpl for that. On my machine, this CL reduces the error rate in TestTraceSTW from 99.8% to 1.9%. As a nearly 2% error rate shows, there are still cases where this best effort scheduling doesn't work. The most obvious is that while procresize assigns Ps back to their original M, startTheWorldWithSema calls wakep to start a spinning M. The spinning M may steal a goroutine from another P if that P is too slow to start. For #65694. Change-Id: I6a6a636c0969c587d039b68bc68ea16c74ff1fc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/714801 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-11runtime: doubly-linked sched.midle listMichael Pratt
This will be used by CL 714801 to remove Ms from the middle of the list. We could simply convert schedlink to the doubly-linked list, bringing along all other uses of schedlink. However, CL 714801 removes Ms from the middle of the midle list. It would be an easy mistake to make to accidentally remove an M from schedlink, assuming that it is on the midle list when it is actually on a completely different list. Using separate a list node makes this impossible. For #65694. Change-Id: I6a6a636c223d925fdc30c0c648460cbf5c2af4d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/714800 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
2025-11-03runtime: don't panic in castogscanstatusMichael Anthony Knyszek
The panic calls gopanic which may have write barriers, but castogscanstatus is called from //go:nowritebarrier contexts. The panic is dead code anyway, and appears immediately before a call to 'throw'. Change-Id: I4a8e296b71bf002295a3aa1db4f723c305ed939a Reviewed-on: https://go-review.googlesource.com/c/go/+/717406 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-10-30runtime: prioritize panic output over racefiniMichael Anthony Knyszek
For some reason CL 646198 uncovered #3934 and #20018 again, but only in race mode. It turns out that because racefini does not return, and racefini is called early after main returns, we would not properly wait for a concurrent panic to complete. This would result in fairly consistent failures of TestPanicRace, which specifically looks for the panic output to appear if main concurrently exits. The important part of this change is that race mode will no longer have the bug described in #3934 and #20018. A byproduct, however, is that racefini is that we're essentially prioritizing the panic output over racefini in this scenario. If racefini were to reveal a latent race condition and fail, we'll prefer to surface the panic. Such a case is probably fine, because the panic is always an crashing, unrecoverable panic. For #3934. For #20018. Change-Id: I0674a75c918563c5ec4ee1eec057dfd096fcfbc8 Reviewed-on: https://go-review.googlesource.com/c/go/+/691795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-30runtime: optimistically CAS atomicstatus directly in enter/exitsyscallMichael Anthony Knyszek
This change steals the performance trick from the coro implementation to try to do the CAS directly first before calling into casgstatus, a much more heavyweight function. We have to be careful about synctest bubbling, but overall it's a good bit faster, and easy low-hanging fruit. goos: linux goarch: amd64 pkg: internal/runtime/cgobench cpu: AMD EPYC 7B13 │ after-2-2.out │ after-3.out │ │ sec/op │ sec/op vs base │ CgoCall-64 34.62n ± 1% 30.55n ± 1% -11.76% (p=0.002 n=6) Change-Id: Ic38620233b55f58b8a07510666aa18648373e2e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/708596 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-30runtime: don't track scheduling latency for _Grunning <-> _GsyscallMichael Anthony Knyszek
The current logic causes much more tracking than necessary, when really _Grunning and _Gsyscall are both sort of "running" from the perspective of tracking scheduling latency. This makes cgo calls and syscalls a little faster in the single-threaded case, and shows much larger improvement in the multi-threaded case by removing updates of shared variables (though this parallel microbenchmark is a little unrealistic, so don't ascribe too much weight to it). goos: linux goarch: amd64 pkg: internal/runtime/cgobench cpu: AMD EPYC 7B13 │ after.out │ after-2.out │ │ sec/op │ sec/op vs base │ CgoCall-64 35.83n ± 1% 34.69n ± 1% -3.20% (p=0.002 n=6) CgoCallParallel-64 5.338n ± 1% 1.352n ± 4% -74.67% (p=0.002 n=6) Change-Id: I2ea494dd5ebbbfb457373549986fbe2fbe318d45 Reviewed-on: https://go-review.googlesource.com/c/go/+/646275 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-30runtime: document tracer invariants explicitlyMichael Anthony Knyszek
This change is a documentation update for the execution tracer. Far too much is left to small comments scattered around places. This change accumulates the big important trace invariants, with rationale, into one file: trace.go. Change-Id: I5fd1402a3d8fdf14a0051e305b3a8fb5dfeafcb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/708398 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-30runtime: eliminate _PsyscallMichael Anthony Knyszek
This change eliminates the _Psyscall state by using synchronization on the G status _Gsyscall to make syscalls work instead. This removes an atomic Store and an atomic CAS on the syscall path, which reduces syscall and cgo overheads. It also simplifies the syscall paths quite a bit. The one danger with this change is that we have a new combination of states that was previously impossible. There are brief windows where it's possible to observe a goroutine in _Grunning but without a P. This change is careful to hide this detail from the execution tracer, but it may have unexpected effects in the rest of the runtime, making this change somewhat risky. goos: linux goarch: amd64 pkg: internal/runtime/cgobench cpu: AMD EPYC 7B13 │ before.out │ after.out │ │ sec/op │ sec/op vs base │ CgoCall-64 43.69n ± 1% 35.83n ± 1% -17.99% (p=0.002 n=6) CgoCallParallel-64 5.306n ± 1% 5.338n ± 1% ~ (p=0.132 n=6) Change-Id: I4551afc1eea0c1b67a0b2dd26b0d49aa47bf1fb8 Reviewed-on: https://go-review.googlesource.com/c/go/+/646198 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-29internal/itoa, internal/runtime/strconv: deleteRuss Cox
Replaced by internal/strconv. Change-Id: I0656a9ad5075e60339e963fbae7d194d2f3e16be Reviewed-on: https://go-review.googlesource.com/c/go/+/716001 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-20runtime: add _Gdeadextra statusMichael Anthony Knyszek
_Gdeadextra is almost the same as _Gdead but for goroutines attached to extra Ms. The primary difference is that it can be transitioned into a _Gscan status, unlike _Gdead. (Why not just use _Gdead? For safety, mostly. There's exactly one case where we're going to want to transition _Gdead to _Gscan|_Gdead, and it's for extra Ms. It's also a bit weird to call this state dead when it can still have a syscalling P attached to it.) This status is used in a follow-up change that changes entersyscall and exitsyscall. Change-Id: I169a4c8617aa3dc329574b829203f56c86b58169 Reviewed-on: https://go-review.googlesource.com/c/go/+/646197 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-07runtime: free spanQueue on P destroyMichael Pratt
Span queues must be empty when destroying a P since we are outside of the mark phase. But we don't actually free them, so they simply sit around using memory. More importantly, they are still in work.spanSPMCs.all, so freeDeadSpanSPMCs must continue traversing past them until the end of time. Prior to CL 709575, keeping them in work.spanSPMCs.all allowed programs with low GOMAXPROCS to continue triggering the bug if they ever had high GOMAXPROCS in the past. The spanSPMCs list is singly-linked, so it is not efficient to remove a random element from the middle. Instead, we simply mark it as dead to all freeDeadSpanSPMCs to free it when it scans the full list. For #75771. Change-Id: I6a6a636cfa22a4bdef0c273d083c91553e923fe5 Reviewed-on: https://go-review.googlesource.com/c/go/+/709656 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-10-07runtime: assert p.destroy runs with GC not runningMichael Pratt
This is already guaranteed by stopTheWorldGC prior to procresize. Thus the cleanup code here is dead, which is a bit confusing. Replace it with a throw for clarity. Change-Id: I6a6a636c8ca1487b720c4fab41b2b86c13d1d9e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/709655 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-10-03[dev.simd] all: merge master (adce7f1) into dev.simdCherry Mui
Conflicts: - src/internal/goexperiment/flags.go - src/runtime/export_test.go Merge List: + 2025-10-03 adce7f196e cmd/link: support .def file with MSVC clang toolchain + 2025-10-03 d5b950399d cmd/cgo: fix unaligned arguments typedmemmove crash on iOS + 2025-10-02 53845004d6 net/http/httputil: deprecate ReverseProxy.Director + 2025-10-02 bbdff9e8e1 net/http: update bundled x/net/http2 and delete obsolete http2inTests + 2025-10-02 4008e07080 io/fs: move path name documentation up to the package doc comment + 2025-10-02 0e4e2e6832 runtime: skip TestGoroutineLeakProfile under mayMoreStackPreempt + 2025-10-02 f03c392295 runtime: fix aix/ppc64 library initialization + 2025-10-02 707454b41f cmd/go: update `go help mod edit` with the tool and ignore sections + 2025-10-02 8c68a1c1ab runtime,net/http/pprof: goroutine leak detection by using the garbage collector + 2025-10-02 84db201ae1 cmd/compile: propagate len([]T{}) to make builtin to allow stack allocation + 2025-10-02 5799c139a7 crypto/tls: rm marshalEncryptedClientHelloConfigList dead code + 2025-10-01 633dd1d475 encoding/json: fix Decoder.InputOffset regression in goexperiment.jsonv2 + 2025-10-01 8ad27fb656 doc/go_spec.html: update date + 2025-10-01 3f451f2c54 testing/synctest: fix inverted test failure message in TestContextAfterFunc + 2025-10-01 be0fed8a5f cmd/go/testdata/script/test_fuzz_fuzztime.txt: disable + 2025-09-30 eb1c7f6e69 runtime: move loong64 library entry point to os-agnostic file + 2025-09-30 c9257151e5 runtime: unify ppc64/ppc64le library entry point + 2025-09-30 4ff8a457db test/codegen: codify handling of floating point constants on arm64 + 2025-09-30 fcb893fc4b cmd/compile/internal/ssa: remove redundant "type:" prefix check + 2025-09-30 19cc1022ba mime: reduce allocs incurred by ParseMediaType + 2025-09-30 08afc50bea mime: extend "builtinTypes" to include a more complete list of common types + 2025-09-30 97da068774 cmd/compile: eliminate nil checks on .dict arg + 2025-09-30 300d9d2714 runtime: initialise debug settings much earlier in startup process + 2025-09-30 a846bb0aa5 errors: add AsType + 2025-09-30 7c8166d02d cmd/link/internal/arm64: support Mach-O ARM64_RELOC_SUBTRACTOR in internal linking + 2025-09-30 6e95748335 cmd/link/internal/arm64: support Mach-O ARM64_RELOC_POINTER_TO_GOT in internal linking + 2025-09-30 742f92063e cmd/compile, runtime: always enable Wasm signext and satconv features + 2025-09-30 db10db6be3 internal/poll: remove operation fields from FD + 2025-09-29 75c87df58e internal/poll: pass the I/O mode instead of an overlapped object in execIO + 2025-09-29 fc88e18b4a crypto/internal/fips140/entropy: add CPU jitter-based entropy source + 2025-09-29 db4fade759 crypto/internal/fips140/mlkem: make CAST conditional + 2025-09-29 db3cb3fd9a runtime: correct reference to getStackMap in comment + 2025-09-29 690fc2fb05 internal/poll: remove buf field from operation + 2025-09-29 eaf2345256 cmd/link: use a .def file to mark exported symbols on Windows + 2025-09-29 4b77733565 internal/syscall/windows: regenerate GetFileSizeEx + 2025-09-29 4e9006a716 crypto/tls: quote protocols in ALPN error message + 2025-09-29 047c2ab841 cmd/link: don't pass -Wl,-S on Solaris + 2025-09-29 ae8eba071b cmd/link: use correct length for pcln.cutab + 2025-09-29 fe3ba74b9e cmd/link: skip TestFlagW on platforms without DWARF symbol table + 2025-09-29 d42d56b764 encoding/xml: make use of reflect.TypeAssert + 2025-09-29 6d51f93257 runtime: jump instead of branch in netbsd/arm64 entry point + 2025-09-28 5500cbf0e4 debug/elf: prevent offset overflow + 2025-09-27 34e67623a8 all: fix typos + 2025-09-27 af6999e60d cmd/compile: implement jump table on loong64 + 2025-09-26 63cd912083 os/user: simplify go:build + 2025-09-26 53009b26dd runtime: use a smaller arena size on Wasm + 2025-09-26 3a5df9d2b2 net/http: add HTTP2Config.StrictMaxConcurrentRequests + 2025-09-26 16be34df02 net/http: add more tests of transport connection pool + 2025-09-26 3e4540b49d os/user: use getgrouplist on illumos && cgo + 2025-09-26 15fbe3480b internal/poll: simplify WriteMsg and ReadMsg on Windows + 2025-09-26 16ae11a9e1 runtime: move TestReadMetricsSched to testprog + 2025-09-26 459f3a3adc cmd/link: don't pass -Wl,-S on AIX + 2025-09-26 4631a2d3c6 cmd/link: skip TestFlagW on AIX + 2025-09-26 0f31d742cd cmd/compile: fix ICE with new(<untyped expr>) + 2025-09-26 7d7cd6e07b internal/poll: don't call SetFilePointerEx in Seek for overlapped handles + 2025-09-26 41cba31e66 mime/multipart: percent-encode CR and LF in header values to avoid CRLF injection + 2025-09-26 dd1d597c3a Revert "cmd/internal/obj/loong64: use the MOVVP instruction to optimize prologue" + 2025-09-26 45d6bc76af runtime: unify arm64 entry point code + 2025-09-25 fdea7da3e6 runtime: use common library entry point on windows amd64/386 + 2025-09-25 e8a4f508d1 lib/fips140: re-seal v1.0.0 + 2025-09-25 9b7a328089 crypto/internal/fips140: remove key import PCTs, make keygen PCTs fatal + 2025-09-25 7f9ab7203f crypto/internal/fips140: update frozen module version to "v1.0.0" + 2025-09-25 fb5719cbda crypto/internal/fips140/ecdsa: make TestingOnlyNewDRBG generic + 2025-09-25 56067e31f2 std: remove unused declarations Change-Id: Iecb28fd62c69fbed59da557f46d31bae55889e2c
2025-10-02runtime,net/http/pprof: goroutine leak detection by using the garbage collectorVlad Saioc
Proposal #74609 Change-Id: I97a754b128aac1bc5b7b9ab607fcd5bb390058c8 GitHub-Last-Rev: 60f2a192badf415112246de8bc6c0084085314f6 GitHub-Pull-Request: golang/go#74622 Reviewed-on: https://go-review.googlesource.com/c/go/+/688335 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: t hepudds <thepudds1460@gmail.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
2025-09-30runtime: initialise debug settings much earlier in startup processSteve Muir
This is necessary specifically to set the value of `debug.decoratemappings` sufficiently early in the startup sequence that all memory ranges allocated can be named appropriately using the new Linux-specific naming API introduced in #71546. Example output (on ARM64): https://gist.github.com/9muir/3667654b9c3f52e8be92756219371672 Fixes: #75324 Change-Id: Ic0b16233f54a45adef1660c4d0df59af2f5af86a Reviewed-on: https://go-review.googlesource.com/c/go/+/703476 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-09-25[dev.simd] all: merge master (d70ad4e) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/types2/stdlib_test.go - src/go/types/stdlib_test.go Merge List: + 2025-09-25 d70ad4e740 sync/atomic: correct Uintptr.Or return doc + 2025-09-25 d7abfe4f0d runtime: acquire/release C TSAN lock when calling cgo symbolizer/tracebacker + 2025-09-25 393d91aea0 cmd/fix: remove all functionality + 2025-09-25 6dceff8bad cmd/link: handle -w flag in external linking mode + 2025-09-25 76d088eb74 cmd/internal/obj/riscv: remove ACFLWSP/ACFSWSP and ACFLW/ACFSW + 2025-09-25 5225e9dc49 doc/next: document new image/jpeg DCT in release notes + 2025-09-25 81a83bba21 cmd: update x/tools@4df13e3 + 2025-09-25 6b32c613ca go/types: make typeset return an iterator + 2025-09-25 fbba930271 image/jpeg: replace fdct.go and idct.go with new implementation in dct.go + 2025-09-25 92e093467f image/jpeg: correct and test reference slowFDCT and slowIDCT + 2025-09-25 27c7bbc51c image/jpeg: prepare for new FDCT/IDCT implementations + 2025-09-24 f15cd63ec4 cmd/compile: don't rely on loop info when there are irreducible loops + 2025-09-24 371c1d2fcb cmd/internal/obj/riscv: add support for vector unit-stride fault-only-first load instructions + 2025-09-23 411c250d64 runtime: add specialized malloc functions for sizes up to 512 bytes + 2025-09-23 d7a38adf4c runtime: eliminate global span queue [green tea] + 2025-09-23 7bc1935db5 cmd/compile/internal: support new(expr) + 2025-09-23 eb78f13c9f doc/go_spec.html: document new(expr) + 2025-09-23 74cc463f9e go/token: add TestRemovedFileFileReturnsNil test + 2025-09-23 902dc27ae9 go/token: clear cache after grabbing the mutex in RemoveFile + 2025-09-23 a13d085a5b cmd/cgo: don't hardcode section name in TestNumberOfExportedFunctions + 2025-09-23 61bf26a9ee cmd/link: fix Macho-O X86_64_RELOC_SUBTRACTOR in internal linking + 2025-09-23 4b787c8c2b reflect: remove stale comment in unpackEface + 2025-09-23 3df27cd21a cmd/compile: fix typo in comment + 2025-09-23 684e8d3363 reflect: allocate memory in TypeAssert[I] only when the assertion succeeds + 2025-09-23 a5866ebe40 cmd/compile: prevent shapifying of pointer shape type + 2025-09-23 a27261c42f go/types,types2: allow new(expr) + 2025-09-23 e93f439ac4 runtime/cgo: retry when CreateThread fails with ERROR_ACCESS_DENIED + 2025-09-23 69e74b0aac runtime: deduplicate pMask resize code + 2025-09-23 fde10c4ce7 runtime: split gcMarkWorkAvailable into two separate conditions + 2025-09-23 5d040df092 runtime: use scan kernels in scanSpan [green tea] + 2025-09-23 7e0251bf58 runtime: don't report non-blocked goroutines as "(durable)" in stacks + 2025-09-23 22ac328856 cmd/link: make -w behavior consistent on Windows Change-Id: Id76b5a30a3b6f6669437f97e3320c9bca65a1e96
2025-09-23runtime: eliminate global span queue [green tea]Michael Anthony Knyszek
This change removes the locked global span queue and replaces the fixed-size local span queue with a variable-sized local span queue. The variable-sized local span queue grows as needed to accomodate local work. With no global span queue either, GC workers balance work amongst themselves by stealing from each other. The new variable-sized local span queues are inspired by the P-local deque underlying sync.Pool. Unlike the sync.Pool deque, however, both the owning P and stealing Ps take spans from the tail, making this incarnation a strict queue, not a deque. This is intentional, since we want a queue-like order to encourage objects to accumulate on each span. These variable-sized local span queues are crucial to mark termination, just like the global span queue was. To avoid hitting the ragged barrier too often, we must check whether any Ps have any spans on their variable-sized local span queues. We maintain a per-P atomic bitmask (another pMask) that contains this state. We can also use this to speed up stealing by skipping Ps that don't have any local spans. The variable-sized local span queues are slower than the old fixed-size local span queues because of the additional indirection, so this change adds a non-atomic local fixed-size queue. This risks getting work stuck on it, so, similarly to how workbufs work, each worker will occasionally dump some spans onto its local variable-sized queue. This scales much more nicely than dumping to a global queue, but is still visible to all other Ps. For #73581. Change-Id: I814f54d9c3cc7fa7896167746e9823f50943ac22 Reviewed-on: https://go-review.googlesource.com/c/go/+/700496 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-09-23runtime: deduplicate pMask resize codeMichael Anthony Knyszek
Change-Id: I04a9a69904710a488c685cb9eee9c3313ed8e97b Reviewed-on: https://go-review.googlesource.com/c/go/+/701896 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-09-23runtime: split gcMarkWorkAvailable into two separate conditionsMichael Anthony Knyszek
Right now, gcMarkWorkAvailable is used in two scenarios. The first is critical: we use it to determine whether we're approaching mark termination, and it's crucial to reaching a fixed point across the ragged barrier in gcMarkDone. The second is a heuristic: should we spin up another GC worker? This change splits gcMarkWorkAvailable into these two separate conditions. This change also deduplicates the logic for updating work.nwait into more abstract helpers "gcBeginWork" and "gcEndWork." This change is solely refactoring, and should be a no-op. There are only two functional changes: - work.nwait is incremented after setting pp.gcMarkWorkerMode in the background worker code. I don't believe this change is observable except if the code fails to update work.nwait (either it results in a non-sensical number, or the stack is corrupted) in which case the goroutine may not be labeled as a mark worker in the resulting stack trace (it should be obvious from the stack frames though). - endCheckmarks also checks work.nwait == work.nproc, which should be fine since we never mutate work.nwait on that path. That extra check should be a no-op. Splitting these two use-cases for gcMarkWorkAvailable is conceptually helpful, and the checks may also diverge from Green Tea once we get rid of the global span queue. Change-Id: I0bec244a14ee82919c4deb7c1575589c0dca1089 Reviewed-on: https://go-review.googlesource.com/c/go/+/701176 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-09-11[dev.simd] all: merge master (cf5e993) into dev.simdCherry Mui
Merge List: + 2025-09-11 cf5e993177 cmd/link: allow one to specify the data section in the internal linker + 2025-09-11 cdb3d467fa encoding/gob: make use of reflect.TypeAssert + 2025-09-11 fef360964c archive/tar: fix typo in benchmark name + 2025-09-11 7d562b8460 syscall: actually remove unreachable code + 2025-09-11 c349582344 crypto/rsa: don't test CL 687836 against v1.0.0 FIPS 140-3 module + 2025-09-11 253dd08f5d debug/macho: filter non-external symbols when reading imported symbols without LC_DYSYMTAB + 2025-09-10 2009e6c596 internal/runtime/maps: remove redundant package docs + 2025-09-10 de5d7eccb9 runtime/internal/maps: only conditionally clear groups when sparse + 2025-09-10 8098b99547 internal/runtime/maps: speed up Clear + 2025-09-10 fe5420b054 cmd: delete some more windows/arm remnants + 2025-09-10 fad1dc608d runtime: don't artificially limit TestReadMetricsSched + 2025-09-10 b1f3e38e41 cmd/compile: when CSEing two values, prefer the statement marked one + 2025-09-10 00824f5ff5 types2: better documentation for resolve() + 2025-09-10 5cf8ca42e3 internal/trace/raw: use strings.Cut instead of strings.SplitN 2 + 2025-09-10 80a2aae922 Revert "cmd/compile: improve stp merging for non-sequent cases" + 2025-09-10 f327a05419 go/token, syscall: annotate if blocks that defeat vet's unreachable pass + 2025-09-10 9650c97d0f syscall: remove unreachable code + 2025-09-10 f1c4b860d4 Revert "crypto/internal/fips140: update frozen module version to "v1.0.0"" + 2025-09-10 30686c4cc8 encoding/json/v2: document context annotation with SemanticError + 2025-09-09 c5737dc21b runtime: when using cgo on 386, call C sigaction function + 2025-09-09 b9a4a09b0f runtime: remove duff support for riscv64 + 2025-09-09 4dac9e093f cmd/compile: use generated loops instead of DUFFCOPY on riscv64 + 2025-09-09 879ff736d3 cmd/compile: use generated loops instead of DUFFZERO on riscv64 + 2025-09-09 77643dc63f cmd/compile: simplify zerorange on riscv64 + 2025-09-09 e6605a1bcc encoding/json: use reflect.TypeAssert + 2025-09-09 4c20f7f15a cmd/cgo: run gcc to get errors and debug info in parallel + 2025-09-09 5dcedd6550 runtime: lock mheap_.speciallock when allocating synctest specials + 2025-09-09 d3be949ada runtime: don't negate eventfd errno + 2025-09-09 836fa74518 syscall: optimise cgo clearenv + 2025-09-09 ce39174482 crypto/rsa: check PrivateKey.D for consistency with Dp and Dq + 2025-09-09 5d9d0513dc crypto/rsa: check for post-Precompute changes in Validate + 2025-09-09 968a5107a9 crypto/internal/fips140: update frozen module version to "v1.0.0" + 2025-09-09 645ee44492 crypto/ecdsa: deprecate direct use of big.Int fields in keys + 2025-09-09 a67977da5e cmd/compile/internal/inline: ignore superfluous slicing + 2025-09-09 a5fa5ea51c cmd/compile/internal/ssa: expand runtime.memequal for length {3,5,6,7} + 2025-09-09 4c63d798cb cmd/compile: improve stp merging for non-sequent cases + 2025-09-09 bdd51e7855 cmd/compile: use constant zero register instead of specialized zero instructions on mips64x + 2025-09-09 10ac80de77 cmd/compile: introduce CCMP generation + 2025-09-09 3b3b16957c Revert "cmd/go: use os.Rename to move files on Windows" + 2025-09-09 e3223518b8 cmd/go: split generating cover files into its own action + 2025-09-09 af03343f93 cmd/compile: fix bounds check report + 2025-09-08 6447ff409a cmd/compile: fold constant in ADDshift op on loong64 + 2025-09-08 5b218461f9 cmd/compile: optimize loads from abi.Type.{Size_,PtrBytes,Kind_} + 2025-09-08 b915e14490 cmd/compile: consolidate logic for rewriting fixed loads + 2025-09-08 06e791c0cd cmd/compile: simplify zerorange on mips + 2025-09-08 cf42b785b7 cmd/cgo: run recordTypes for each of the debugs at the end of Translate + 2025-09-08 5e6296f3f8 archive/tar: optimize nanosecond parsing in parsePAXTime + 2025-09-08 ea00650784 debug/pe: permit symbols with no name + 2025-09-08 4cc7cc74c3 crypto: update Hash comments to point to crypto/sha3 + 2025-09-08 ff45d5d53c encoding/json/internal/jsonflags: fix comment with wrong field name + 2025-09-06 861c90c907 net/http: pool transport gzip readers + 2025-09-06 57769b5532 os: reject OpenDir of a non-directory file in Plan 9 + 2025-09-06 a6144613d3 crypto/tls: use context.AfterFunc in handshakeContext + 2025-09-05 e8126bce9e runtime/cgo: save and restore R31 for crosscall1 on loong64 + 2025-09-05 d767064170 cmd/compile: mark abi.PtrType.Elem sym as used + 2025-09-05 0b1eed09a3 vendor/golang.org/x/tools: update to a09a2fb + 2025-09-05 f5b20689e9 cmd/compile: optimize loads from readonly globals into constants on loong64 + 2025-09-05 3492e4262b cmd/compile: simplify specific addition operations using the ADDV16 instruction + 2025-09-05 459b85ccaa cmd/fix: remove all functionality except for buildtag + 2025-09-05 87e72769fa runtime: simplify openbsd check in usesLibcall and mStackIsSystemAllocated + 2025-09-05 bb48272e24 cmd/compile: simplify zerorange on mips64 + 2025-09-05 d52a56cce1 cmd/link/internal/ld: unconditionally use posix_fallocate on FreeBSD + 2025-09-04 9d0829963c net/http: fix cookie value of "" being interpreted as empty string. + 2025-09-04 ddce0522be cmd/internal/obj/loong64: add ADDU16I.D instruction support + 2025-09-04 00b8474e47 cmd/trace: don't filter events for profile by whether they have stack + 2025-09-04 e36c5aead6 log/slog: add multiple handlers support for logger + 2025-09-04 150fae714e crypto/x509: don't force system roots load in SetFallbackRoots + 2025-09-04 4f7bbc62c7 runtime, cmd/compile, cmd/internal/obj: remove duff support for loong64 + 2025-09-04 b8cc907425 cmd/internal/obj/loong64: fix the usage of offset in the instructions [X]VLDREPL.{B/H/W/D} + 2025-09-04 8c27a80890 path{,/filepath}: speed up Match + 2025-09-04 b7c20413c5 runtime: remove obsolete osArchInit function + 2025-09-04 df29038486 cmd/compile/internal/ssa: load constant values from abi.PtrType.Elem + 2025-09-04 4373754bc9 cmd/compile: add store to load forwarding rules on riscv64 + 2025-09-03 80038586ed cmd/compile: export to DWARF types only referenced through interfaces + 2025-09-03 91e76a513b cmd/compile: use generated loops instead of DUFFCOPY on loong64 + 2025-09-03 c552ad913f cmd/compile: simplify memory load and store operations on loong64 + 2025-09-03 e8f9127d1f net/netip: export Prefix.Compare, fix ordering + 2025-09-03 731e546166 cmd/compile: simplify the support for 32bit high multiply on loong64 Change-Id: I2c124fb8071e2972d39804867cafb6806e601aba
2025-09-05runtime: simplify openbsd check in usesLibcall and mStackIsSystemAllocatedTobias Klauser
The openbsd/mips64 runtime code was removed in CL 649659. For #61546 Change-Id: I03f16c3396baddb0ee9aa751dd6f699a835e7586 Reviewed-on: https://go-review.googlesource.com/c/go/+/700976 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Joel Sing <joel@sing.id.au> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-09-03[dev.simd] all: merge master (4c4cefc) into dev.simdCherry Mui
Merge List: + 2025-09-03 4c4cefc19a cmd/gofmt: simplify logic to process arguments + 2025-09-03 925a3cdcd1 unicode/utf8: make DecodeRune{,InString} inlineable + 2025-09-03 3e596d448f math: rename Modf parameter int to integer + 2025-09-02 2a7f1d47b0 runtime: use one more address bit for tagged pointers + 2025-09-02 b09068041a cmd/dist: run racebench tests only in longtest mode + 2025-09-02 355370ac52 runtime: add comment for concatstring2 + 2025-09-02 1eec830f54 go/doc: linkify interface methods + 2025-08-31 7bba745820 cmd/compile: use generated loops instead of DUFFZERO on loong64 + 2025-08-31 882335e2cb cmd/internal/obj/loong64: add LDPTR.{W/D} and STPTR.{W/D} instructions support + 2025-08-31 d4b17f5869 internal/runtime/atomic: reset wrong jump target in Cas{,64} on loong64 + 2025-08-31 6a08e80399 net/http: skip redirecting in ServeMux when URL path for CONNECT is empty + 2025-08-29 8bcda6c79d runtime/race: add race detector support for linux/riscv64 + 2025-08-29 8377adafc5 cmd/cgo: split loadDWARF into two parts + 2025-08-29 a7d9d5a80a cmd/cgo: move typedefs and typedefList out of Package + 2025-08-29 1d459c4357 all: delete more windows/arm remnants + 2025-08-29 27ce6e4e26 cmd/compile: remove sign extension before MULW on riscv64 + 2025-08-29 84b070bfb1 cmd/compile/internal/ssa: make oneBit function generic + 2025-08-29 fe42628dae internal/cpu: inline DebugOptions + 2025-08-29 94b7d519bd net: update document on limitation of iprawsock on Windows + 2025-08-29 ba9e1ddccf testing: allow specify temp dir by GOTMPDIR environment variable + 2025-08-29 9f6936b8da cmd/link: disallow linkname of runtime.addmoduledata + 2025-08-29 89d41d254a bytes, strings: speed up TrimSpace + 2025-08-29 38204e0872 testing/synctest: call out common issues with tests + 2025-08-29 252c901125 os,syscall: pass file flags to CreateFile on Windows + 2025-08-29 53515fb0a9 crypto/tls: use hash.Cloner + 2025-08-28 13bb48e6fb go/constant: fix complex != unknown comparison + 2025-08-28 ba1109feb5 net: remove redundant cgoLookupCNAME return parameter + 2025-08-28 f74ed44ed9 net/http/httputil: remove redundant pw.Close() call in DumpRequestOut + 2025-08-28 a9689d2e0b time: skip TestLongAdjustTimers in short mode on single CPU systems + 2025-08-28 ebc763f76d syscall: only get parent PID if SysProcAttr.Pdeathsig is set + 2025-08-28 7f1864b0a8 strings: remove redundant "runs" from string.Fields docstring + 2025-08-28 90c21fa5b6 net/textproto: eliminate some bounds checks + 2025-08-27 e47d88beae os: return nil slice when ReadDir is used with a file on file_windows + 2025-08-27 6b837a64db cmd/internal/obj/loong64: simplify buildop + 2025-08-27 765905e3bd debug/elf: don't panic if symtab too small + 2025-08-27 2ee4b31242 net/http: Ensure that CONNECT proxied requests respect MaxResponseHeaderBytes + 2025-08-27 b21867b1a2 net/http: require exact match for CrossSiteProtection bypass patterns + 2025-08-27 d19e377f6e cmd/cgo: make it safe to run gcc in parallel + 2025-08-27 49a2f3ed87 net: allow zero value destination address in WriteMsgUDPAddrPort + 2025-08-26 afc51ed007 internall/poll: remove bufs field from Windows' poll.operation + 2025-08-26 801b74eb95 internal/poll: remove rsa field from Windows' poll.operation + 2025-08-26 fa18c547cd syscall: sort Windows env block in StartProcess + 2025-08-26 bfd130db02 internal/poll: don't use stack-allocated WSAMsg parameters + 2025-08-26 dae9e456ae runtime: identify virtual memory layout for riscv64 + 2025-08-25 25c2d4109f math: use Trunc to implement Modf + 2025-08-25 4e05a070c4 math: implement IsInf using Abs + 2025-08-25 1eed4f32a0 math: optimize Signbit implementation slightly + 2025-08-25 bd71b94659 cmd/compile/internal: optimizing add+sll rule using ALSLV instruction on loong64 + 2025-08-25 ea55ca3600 runtime: skip doInit of plugins in runtime.main + 2025-08-25 9ae2f1fb57 internal/trace: skip async preempt off tests on low end systems + 2025-08-25 bbd5342a62 net: fix cgoResSearch + 2025-08-25 ed7f804775 os: set full name for Roots created with Root.OpenRoot + 2025-08-25 a21249436b internal/poll: use fdMutex to provide read/write locking on Windows + 2025-08-24 44c5956bf7 test/codegen: add Mul2 and DivPow2 test for loong64 + 2025-08-24 0aa8019e94 test/codegen: add Mul* test for loong64 + 2025-08-24 83420974b7 test/codegen: add sqrt* abs and copysign test for loong64 + 2025-08-23 f2db0dca0b net/http/httptest: redirect example.com requests to server + 2025-08-22 d86ec92499 internal/syscall/windows: increase internal Windows O_ flags values + 2025-08-22 9d3f7fda70 crypto/tls: fix quic comment typo + 2025-08-22 78a05c541f internal/poll: don't pass non-nil WSAMsg.Name with 0 namelen on windows + 2025-08-22 52c3f73fda runtime/metrics: improve doc + 2025-08-22 a076f49757 os: fix Root.MkdirAll to handle race of directory creation + 2025-08-22 98238fd495 all: delete remaining windows/arm code + 2025-08-21 1ad30844d9 cmd/asm: process forward jump to PCALIGN + 2025-08-21 13c082601d internal/poll: permit nil destination address in WriteMsg{Inet4,Inet6} + 2025-08-21 9b0a507735 runtime: remove remaining windows/arm files and comments + 2025-08-21 1843f1e9c0 cmd/compile: use zero register instead of specialized *zero instructions on loong64 + 2025-08-21 e0870a0a12 cmd/compile: simplify zerorange on loong64 + 2025-08-21 fb8bbe46d5 cmd/compile/internal/ssa: eliminate unnecessary extension operations + 2025-08-21 9632ba8160 cmd/compile: optimize some patterns into revb2h/revb4h instruction on loong64 + 2025-08-21 8dcab6f450 syscall: simplify execve handling on libc platforms + 2025-08-21 ba840c1bf9 cmd/compile: deduplication in the source code generated by mknode + 2025-08-21 fa706ea50f cmd/compile: optimize rule (x + x) << c to x << c+1 on loong64 + 2025-08-21 ffc85ee1f1 cmd/internal/objabi,cmd/link: add support for additional riscv64 relocations Change-Id: I3896f74b1a3cc0a52b29ca48767bb0ba84620f71
2025-08-29internal/cpu: inline DebugOptionsTobias Klauser
internal/cpu.DebugOptions is only ever set in runtime.cpuinit on unix-like platforms. DebugOptions itself is only used in MustHaveDebugOptionsSupport, so inline the GOOS check there. Change-Id: I6a35d6b8afcdadfc59585258002f53c20026116c Reviewed-on: https://go-review.googlesource.com/c/go/+/699775 Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
2025-08-25runtime: skip doInit of plugins in runtime.mainWang Deyu
Plugins may be loaded in the user's init code. If loading fails, md.bad is true, and doInit should not be executed. If loading succeeds, the plugin must run modulesinit and typelinksinit before doInit. Here is not protected by pluginsMu, and in concurrent scenarios it is possible to obtain the moduledata of the plugin that is still in the loading process. Any added modules after loop starts will do their own doInit calls. This fixes the issue introduced by CL 520375. Fixes #75102 Change-Id: I48e91ae21615a0c54176875a6a2dea8e1dade906 Reviewed-on: https://go-review.googlesource.com/c/go/+/697675 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-08-22[dev.simd] cmd/compile: ensure the whole X15 register is zeroedCherry Mui
On AMD64, we reserve the X15 register as the zero register. Currently we use an SSE instruction to zero it, and we only use it in SSE contexts. When the machine supports AVX, the high bits of the register is not necessarily zeroed. Now that the compiler generates AVX code for SIMD, it would be great to have a zero register in the AVX context. This CL zeroes the whole X15 register if AVX is supported. Change-Id: I4dc803362f2e007b1614b90de435fbb7814cebc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/698237 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>
2025-08-15runtime/metrics: add metric for current Go-owned thread countMichael Anthony Knyszek
Fixes #15490. Change-Id: I6ce9edc46398030ff639e22d4ca4adebccdfe1b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/690399 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-08-15runtime/metrics: add metric for total goroutines createdMichael Anthony Knyszek
For #15490. Change-Id: Ic587dda1f42d613ea131a6b53ce6ba6e6cadf4c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/690398 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-08-15runtime/metrics: add metrics for goroutine sched statesMichael Anthony Knyszek
This is largely a port of CL 38180. For #15490. Change-Id: I2726111e472e81e9f9f0f294df97872c2689f061 Reviewed-on: https://go-review.googlesource.com/c/go/+/690397 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-08-15runtime: disable stack shrinking for all waiting-for-suspendG casesMichael Anthony Knyszek
Currently isShrinkStackSafe returns false if a goroutine is put into _Gwaiting while it actually goes and executes on the system stack. For a long time, we needed to be robust to the goroutine's stack shrinking while we're executing on the system stack. Unfortunately, this has become harder and harder to do over time. First, the execution tracer might be invoked in these contexts and it may wish to take a stack trace. We cannot take the stack trace if the garbage collector might concurrently shrink the stack of the user goroutine we want to trace. So, isShrinkStackSafe grew the condition that we wouldn't try to shrink the stack in these cases if execution tracing was enabled. Today, runtime.mutex may wish to take a stack trace for the mutex profile, and it can happen in a very similar context. Taking the stack trace is no longer safe. This change takes the stance that we stop trying to make this work at all, and instead guarantee that the stack won't move while we're in these sensitive contexts. Change-Id: Ibfad2d7a335ee97cecaa48001df0db9812deeab1 Reviewed-on: https://go-review.googlesource.com/c/go/+/692716 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2025-08-05runtime: save scalar registers off stack in amd64 async preemptionAustin Clements
Asynchronous preemption must save all registers that could be in use by Go code. Currently, it saves all of these to the goroutine stack. As a result, the stack frame requirements of asynchronous preemption can be rather high. On amd64, this requires 368 bytes of stack space, most of which is the XMM registers. Several RISC architectures are around 0.5 KiB. As we add support for SIMD instructions, this is going to become a problem. The AVX-512 register state is 2.5 KiB. This well exceeds the nosplit limit, and even if it didn't, could constrain when we can asynchronously preempt goroutines on small stacks. This CL fixes this by moving pure scalar state stored in non-GP registers off the stack and into an allocated "extended register state" object. To reduce space overhead, we only allocate these objects as needed. While in the theoretical limit, every G could need this register state, in practice very few do at a time. However, we can't allocate when we're in the middle of saving the register state during an asynchronous preemption, so we reserve scratch space on every P to temporarily store the register state, which can then be copied out to an allocated state object later by Go code. This commit only implements this for amd64, since that's where we're about to add much more vector state, but it lays the groundwork for doing this on any architecture that could benefit. This is a cherry-pick of CL 680898 plus bug fix CL 684836 from the dev.simd branch. Change-Id: I123a95e21c11d5c10942d70e27f84d2d99bbf735 Reviewed-on: https://go-review.googlesource.com/c/go/+/669195 Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-07-24runtime: randomize heap base addressRoland Shoemaker
During initialization, allow randomizing the heap base address by generating a random uint64 and using its bits to randomize various portions of the heap base address. We use the following method to randomize the base address: * We first generate a random heapArenaBytes aligned address that we use for generating the hints. * On the first call to mheap.grow, we then generate a random PallocChunkBytes aligned offset into the mmap'd heap region, which we use as the base for the heap region. * We then mark a random number of pages within the page allocator as allocated. Our final randomized "heap base address" becomes the first byte of the first available page returned by the page allocator. This results in an address with at least heapAddrBits-gc.PageShift-1 bits of entropy. Fixes #27583 Change-Id: Ideb4450a5ff747a132f702d563d2a516dec91a88 Reviewed-on: https://go-review.googlesource.com/c/go/+/674835 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-24runtime: drop NetBSD kernel bug sysmon workaround fixed in NetBSD 9.2Tobias Klauser
The NetBSD releases supported by the NetBSD project as off today are 9.4 and 10.1. The Go project's NetBSD builders are on 9.3. Thus, it is fine to drop the workaround which was only needed for NetBSD before 9.2. Fixes #46495 Cq-Include-Trybots: luci.golang.try:gotip-netbsd-arm64 Change-Id: I3c2ec42fb0f08f7dafdfb7f1dbd97853afc16386 Reviewed-on: https://go-review.googlesource.com/c/go/+/687735 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>