aboutsummaryrefslogtreecommitdiff
path: root/src/sync
AgeCommit message (Collapse)Author
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-12sync/atomic: amend comments for Value.{Swap,CompareAndSwap}Jes Cok
Related to CL 241661, CL 403094. Change-Id: I86877d9a013b05b1a97f9aa1333cd96ce98469cb GitHub-Last-Rev: 7fedca5848cb17730d4ccb586dc03cfcb1b83259 GitHub-Pull-Request: golang/go#76259 Reviewed-on: https://go-review.googlesource.com/c/go/+/719660 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@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-11-10sync: don't call Done when f() panics in WaitGroup.GoJes Cok
This change is based on https://github.com/golang/go/issues/76126#issuecomment-3473417226 by adonovan. Fixes #76126 Fixes #74702 Change-Id: Ie404d8204be8917fa8a7b414bb6d319238267c83 GitHub-Last-Rev: b1beddcd725e9168d4d544a9d0322a5a6d8d65b2 GitHub-Pull-Request: golang/go#76172 Reviewed-on: https://go-review.googlesource.com/c/go/+/717760 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-27sync: update comments for Once.doneJes Cok
Sync with CL 666895. Change-Id: I49c4a7f88d87cee9c30a858facd3cd8348efdf94 GitHub-Last-Rev: 88ac1c9c4131aa3f5dfb9c7923e49e46808c409d GitHub-Pull-Request: golang/go#76026 Reviewed-on: https://go-review.googlesource.com/c/go/+/714360 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
2025-10-21sync: re-enable race even when panickingNicolas Hillegeer
Not doing this can cause user code running after this panic (e.g.: defers) to produce non-existing races. Change-Id: Ia6aec88aaeee3b9c17e7b8019d697ffa88dfb492 Reviewed-on: https://go-review.googlesource.com/c/go/+/713460 Commit-Queue: Nicolas Hillegeer <aktau@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Nicolas Hillegeer <aktau@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-17all: remove unnecessary loop variable copies in testsTobias Klauser
Copying the loop variable is no longer necessary since Go 1.22. Change-Id: Iebb21dac44a20ec200567f1d786f105a4ee4999d Reviewed-on: https://go-review.googlesource.com/c/go/+/711640 Reviewed-by: Florian Lehner <lehner.florian86@gmail.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.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-25sync/atomic: correct Uintptr.Or return docMichael Pratt
Uintptr.Or returns the old value, just like all of the other Or functions. This was a typo in the original CL 544455. Fixes #75607. Change-Id: I260959e7e32e51f1152b5271df6cc51adfa02a4d Reviewed-on: https://go-review.googlesource.com/c/go/+/706816 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
2025-08-04[dev.simd] all: merge master (7a1679d) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/amd64/ssa.go - src/cmd/compile/internal/ssa/rewriteAMD64.go - src/internal/buildcfg/exp.go - src/internal/cpu/cpu.go - src/internal/cpu/cpu_x86.go - src/internal/goexperiment/flags.go Merge List: + 2025-08-04 7a1679d7ae cmd/compile: move s390x over to new bounds check strategy + 2025-08-04 95693816a5 cmd/compile: move riscv64 over to new bounds check strategy + 2025-08-04 d7bd7773eb go/parser: remove safePos + 2025-08-04 4b6cbc377f cmd/cgo/internal/test: use (syntactic) constant for C array bound + 2025-08-03 b2960e3580 cmd/internal/obj/loong64: add {V,XV}{BITCLR/BITSET/BITREV}[I].{B/H/W/D} instructions support + 2025-08-03 abeeef1c08 cmd/compile/internal/test: fix typo in comments + 2025-08-03 d44749b65b cmd/internal/obj/loong64: add [X]VLDREPL.{B/H/W/D} instructions support + 2025-08-03 d6beda863e runtime: add reference to debugPinnerV1 + 2025-08-01 4ab1aec007 cmd/go: modload should use a read-write lock to improve concurrency + 2025-08-01 e666972a67 runtime: deduplicate Windows stdcall + 2025-08-01 ef40549786 runtime,syscall: move loadlibrary and getprocaddress to syscall + 2025-08-01 336931a4ca cmd/go: use os.Rename to move files on Windows + 2025-08-01 eef5f8d930 cmd/compile: enforce that locals are always accessed with SP base register + 2025-08-01 e071617222 cmd/compile: optimize multiplication rules on loong64 + 2025-07-31 eb7f515c4d cmd/compile: use generated loops instead of DUFFZERO on amd64 + 2025-07-31 c0ee2fd4e3 cmd/go: explicitly reject module paths "go" and "toolchain" + 2025-07-30 a4d99770c0 runtime/metrics: add cleanup and finalizer queue metrics + 2025-07-30 70a2ff7648 runtime: add cgo call benchmark + 2025-07-30 69338a335a cmd/go/internal/gover: fix ModIsPrerelease for toolchain versions + 2025-07-30 cedf63616a cmd/compile: add floating point min/max intrinsics on s390x + 2025-07-30 82a1921c3b all: remove redundant Swiss prefixes + 2025-07-30 2ae059ccaf all: remove GOEXPERIMENT=swissmap + 2025-07-30 cc571dab91 cmd/compile: deduplicate instructions when rewrite func results + 2025-07-30 2174a7936c crypto/tls: use standard chacha20-poly1305 cipher suite names + 2025-07-30 8330fb48a6 cmd/compile: move mips32 over to new bounds check strategy + 2025-07-30 9f9d7b50e8 cmd/compile: move mips64 over to new bounds check strategy + 2025-07-30 5216fd570e cmd/compile: move loong64 over to new bounds check strategy + 2025-07-30 89a0af86b8 cmd/compile: allow ops to specify clobbering input registers + 2025-07-30 5e94d72158 cmd/compile: simplify zerorange on arm64 + 2025-07-30 8cd85e602a cmd/compile: check domination of loop return in both controls + 2025-07-30 cefaed0de0 reflect: fix noswiss builder + 2025-07-30 3aa1b00081 regexp: fix compiling alternate patterns of different fold case literals + 2025-07-30 b1e933d955 cmd/compile: avoid extending when already sufficiently masked on loong64 + 2025-07-29 880ca333d7 cmd/compile: removing log2uint32 function + 2025-07-29 1513661dc3 cmd/compile: simplify logX implementations + 2025-07-29 bd94ae8903 cmd/compile: use unsigned power-of-two detector for unsigned mod + 2025-07-29 f3582fc80e cmd/compile: add unsigned power-of-two detector + 2025-07-29 f7d167fe71 internal/abi: move direct/indirect flag from Kind to TFlag + 2025-07-29 e0b07dc22e os/exec: fix incorrect expansion of "", "." and ".." in LookPath + 2025-07-29 25816d401c internal/goexperiment: delete RangeFunc goexperiment + 2025-07-29 7961bf71f8 internal/goexperiment: delete CacheProg goexperiment + 2025-07-29 e15a14c4dd sync: remove synchashtriemap GOEXPERIMENT + 2025-07-29 7dccd6395c cmd/compile: move arm32 over to new bounds check strategy + 2025-07-29 d79405a344 runtime: only deduct assist credit for arenas during GC + 2025-07-29 19a086f716 cmd/go/internal/telemetrystats: count goexperiments + 2025-07-29 aa95ab8215 image: fix formatting of godoc link + 2025-07-29 4c854b7a3e crypto/elliptic: change a variable name that have the same name as keywords + 2025-07-28 b10eb1d042 cmd/compile: simplify zerorange on amd64 + 2025-07-28 f8eae7a3c3 os/user: fix tests to pass on non-english Windows + 2025-07-28 0984264471 internal/poll: remove msg field from Windows' poll.operation + 2025-07-28 d7b4114346 internal/poll: remove rsan field from Windows' poll.operation + 2025-07-28 361b1ab41f internal/poll: remove sa field from Windows' poll.operation + 2025-07-28 9b6bd64e46 internal/poll: remove qty and flags fields from Windows' poll.operation + 2025-07-28 cd3655a824 internal/runtime/maps: fix spelling errors in comments + 2025-07-28 d5dc36af45 runtime: remove openbsd/mips64 related code + 2025-07-28 64ba72474d errors: omit redundant nil check in type assertion for Join + 2025-07-28 e151db3e06 all: omit unnecessary type conversions + 2025-07-28 4569255f8c cmd/compile: cleanup SelectN rules by indexing into args + 2025-07-28 94645d2413 cmd/compile: rewrite cmov(x, x, cond) into x + 2025-07-28 10c5cf68d4 net/http: add proper panic message + 2025-07-28 46b5839231 test/codegen: fix failing condmove wasm tests + 2025-07-28 98f301cf68 runtime,syscall: move SyscallX implementations from runtime to syscall + 2025-07-28 c7ed3a1c5a internal/runtime/syscall/windows: factor out code from runtime + 2025-07-28 e81eac19d3 hash/crc32: fix incorrect checksums with avx512+race + 2025-07-25 6fbad4be75 cmd/compile: remove no-longer-necessary call to calculateDepths + 2025-07-25 5045fdd8ff cmd/compile: fix containsUnavoidableCall computation + 2025-07-25 d28b27cd8e go/types, types2: use nil to represent incomplete explicit aliases + 2025-07-25 7b53d8d06e cmd/compile/internal/types2: add loaded state between loader calls and constraint expansion + 2025-07-25 374e3be2eb os/user: user random name for the test user account + 2025-07-25 1aa154621d runtime: rename scanobject to scanObject + 2025-07-25 41b429881a runtime: duplicate scanobject in greentea and non-greentea files + 2025-07-25 aeb256e98a cmd/compile: remove unused arg from gorecover + 2025-07-25 08376e1a9c runtime: iterate through inlinings when processing recover() + 2025-07-25 c76c3abc54 encoding/json: fix truncated Token error regression in goexperiment.jsonv2 + 2025-07-25 ebdbfccd98 encoding/json/jsontext: preserve buffer capacity in Encoder.Reset + 2025-07-25 91c4f0ccd5 reflect: avoid a bounds check in stack-constrained code + 2025-07-24 3636ced112 encoding/json: fix extra data regression under goexperiment.jsonv2 + 2025-07-24 a6eec8bdc7 encoding/json: reduce error text regressions under goexperiment.jsonv2 + 2025-07-24 0fa88dec1e time: remove redundant uint32 conversion in split + 2025-07-24 ada30b8248 internal/buildcfg: add ability to get GORISCV64 variable in GOGOARCH + 2025-07-24 6f6c6c5782 cmd/internal/obj: rip out argp adjustment for wrapper frames + 2025-07-24 7b50024330 runtime: detect successful recovers differently + 2025-07-24 7b9de668bd unicode/utf8: skip ahead during ascii runs in Valid/ValidString + 2025-07-24 076eae436e cmd/compile: move amd64 and 386 over to new bounds check strategy + 2025-07-24 f703dc5bef cmd/compile: add missing StringLen rule in prove + 2025-07-24 394d0bee8d cmd/compile: move arm64 over to new bounds check strategy + 2025-07-24 3024785b92 cmd/compile,runtime: remember idx+len for bounds check failure with less code + 2025-07-24 741a19ab41 runtime: move bounds check constants to internal/abi + 2025-07-24 ce05ad448f cmd/compile: rewrite condselects into doublings and halvings + 2025-07-24 fcd28070fe cmd/compile: add opt branchelim to rewrite some CondSelect into math + 2025-07-24 f32cf8e4b0 cmd/compile: learn transitive proofs for safe unsigned subs + 2025-07-24 d574856482 cmd/compile: learn transitive proofs for safe negative signed adds + 2025-07-24 1a72920f09 cmd/compile: learn transitive proofs for safe positive signed adds + 2025-07-24 e5f202bb60 cmd/compile: learn transitive proofs for safe unsigned adds + 2025-07-24 bd80f74bc1 cmd/compile: fold shift through AND for slice operations + 2025-07-24 5c45fe1385 internal/runtime/syscall: rename to internal/runtime/syscall/linux + 2025-07-24 592c2db868 cmd/compile: improve loopRotate to handle nested loops + 2025-07-24 dcb479c2f9 cmd/compile: optimize slice bounds checking with SUB/SUBconst comparisons + 2025-07-24 f11599b0b9 internal/poll: remove handle field from Windows' poll.operation + 2025-07-24 f7432e0230 internal/poll: remove fd field from Windows' poll.operation + 2025-07-24 e84ed38641 runtime: add benchmark for small-size memmory operation + 2025-07-24 18dbe5b941 hash/crc32: add AVX512 IEEE CRC32 calculation + 2025-07-24 c641900f72 cmd/compile: prefer base.Fatalf to panic in dwarfgen + 2025-07-24 d71d8aeafd cmd/internal/obj/s390x: add MVCLE instruction + 2025-07-24 b6cf1d94dc runtime: optimize memclr on mips64x + 2025-07-24 a8edd99479 runtime: improvement in memclr for s390x + 2025-07-24 bd04f65511 internal/runtime/exithook: fix a typo + 2025-07-24 5c8624a396 cmd/internal/goobj: make error output clear + 2025-07-24 44d73dfb4e cmd/go/internal/doc: clean up after merge with cmd/internal/doc + 2025-07-24 bd446662dd cmd/internal/doc: merge with cmd/go/internal/doc + 2025-07-24 da8b50c830 cmd/doc: delete + 2025-07-24 6669aa3b14 runtime: randomize heap base address + 2025-07-24 26338a7f69 cmd/compile: use better fatal message for staticValue1 + 2025-07-24 8587ba272e cmd/cgo: compare malloc return value to NULL instead of literal 0 + 2025-07-24 cae45167b7 go/types, types2: better error messages for certain type mismatches + 2025-07-24 2ddf542e4c cmd/compile: use ,ok return idiom for sparsemap.get + 2025-07-24 6505fcbd0a cmd/compile: use generics for sparse map + 2025-07-24 14f5eb7812 cmd/api: rerun updategolden + 2025-07-24 52b6d7f67a runtime: drop NetBSD kernel bug sysmon workaround fixed in NetBSD 9.2 + 2025-07-24 1ebebf1cc1 cmd/go: clean should respect workspaces + 2025-07-24 6536a93547 encoding/json/jsontext: preserve buffer capacity in Decoder.Reset + 2025-07-24 efc37e97c0 cmd/go: always return the cached path from go tool -n + 2025-07-23 98a031193b runtime: check TestUsingVDSO ExitError type assertion + 2025-07-23 6bb42997c8 doc/next: initialize + 2025-07-23 2696a11a97 internal/goversion: update Version to 1.26 + 2025-07-23 489868f776 cmd/link: scope test to linux & net.sendFile + 2025-07-22 71c2bf5513 cmd/compile: fix loclist for heap return vars without optimizations + 2025-07-22 c74399e7f5 net: correct comment for ListenConfig.ListenPacket + 2025-07-22 4ed9943b26 all: go fmt + 2025-07-22 1aaf7422f1 cmd/internal/objabi: remove redundant word in comment + 2025-07-21 d5ec0815e6 runtime: relax TestMemoryLimitNoGCPercent a bit + 2025-07-21 f7cc61e7d7 cmd/compile: for arm64 epilog, do SP increment with a single instruction + 2025-07-21 5dac42363b runtime: fix asan wrapper for riscv64 + 2025-07-21 e5502e0959 cmd/go: check subcommand properties + 2025-07-19 2363897932 cmd/internal/obj: enable got pcrel itype in fips140 for riscv64 + 2025-07-19 e32255fcc0 cmd/compile/internal/ssa: restrict architectures for TestDebugLines_74576 + 2025-07-18 0451816430 os: revert the use of AddCleanup to close files and roots + 2025-07-18 34b70684ba go/types: infer correct type for y in append(bytes, y...) + 2025-07-17 66536242fc cmd/compile/internal/escape: improve DWARF .debug_line numbering for literal rewriting optimizations + 2025-07-16 385000b004 runtime: fix idle time double-counting bug + 2025-07-16 f506ad2644 cmd/compile/internal/escape: speed up analyzing some functions with many closures + 2025-07-16 9c507e7942 cmd/link, runtime: on Wasm, put only function index in method table and func table + 2025-07-16 9782dcfd16 runtime: use 32-bit function index on Wasm + 2025-07-16 c876bf9346 cmd/internal/obj/wasm: use 64-bit instructions for indirect calls + 2025-07-15 b4309ece66 cmd/internal/doc: upgrade godoc pkgsite to 01b046e + 2025-07-15 75a19dbcd7 runtime: use memclrNoHeapPointers to clear inline mark bits + 2025-07-15 6d4a91c7a5 runtime: only clear inline mark bits on span alloc if necessary + 2025-07-15 0c6296ab12 runtime: have mergeInlineMarkBits also clear the inline mark bits + 2025-07-15 397d2117ec runtime: merge inline mark bits with gcmarkBits 8 bytes at a time + 2025-07-15 7dceabd3be runtime/maps: fix typo in group.go comment (instrinsified -> intrinsified) + 2025-07-15 d826bf4d74 os: remove useless error check + 2025-07-14 bb07e55aff runtime: expand GOMAXPROCS documentation + 2025-07-14 9159cd4ec6 encoding/json: decompose legacy options + 2025-07-14 c6556b8eb3 encoding/json/v2: add security section to doc + 2025-07-11 6ebb5f56d9 runtime: gofmt after CL 643897 and CL 662455 + 2025-07-11 1e48ca7020 encoding/json: remove legacy option to EscapeInvalidUTF8 + 2025-07-11 a0a99cb22b encoding/json/v2: report wrapped io.ErrUnexpectedEOF + 2025-07-11 9d04122d24 crypto/rsa: drop contradictory promise to keep PublicKey modulus secret + 2025-07-11 1ca23682dd crypto/rsa: fix documentation formatting + 2025-07-11 4bc3373c8e runtime: turn off large memmove tests under asan/msan Change-Id: I1e32d964eba770b85421efb86b305a2242f24466
2025-07-29sync: remove synchashtriemap GOEXPERIMENTMichael Anthony Knyszek
It's been true by default for a full release. It's time to remove the old map. Change-Id: I65507f07725e0084aabd389f37d73ade0b7dc35b Reviewed-on: https://go-review.googlesource.com/c/go/+/690395 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-07-28all: omit unnecessary type conversionsJes Cok
Found by github.com/mdempsky/unconvert Change-Id: Ib78cceb718146509d96dbb6da87b27dbaeba1306 GitHub-Last-Rev: dedf354811701ce8920c305b6f7aa78914a4171c GitHub-Pull-Request: golang/go#74771 Reviewed-on: https://go-review.googlesource.com/c/go/+/690735 Reviewed-by: Mark Freeman <mark@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2025-06-30[dev.simd] all: merge master (740857f) into dev.simdCherry Mui
Merge List: + 2025-06-30 740857f529 runtime: stash allpSnapshot on the M + 2025-06-30 9ae38be302 sync: disassociate WaitGroups from bubbles on Wait + 2025-06-30 4731832342 crypto/hmac: wrap ErrUnsupported returned by Clone + 2025-06-30 03ad694dcb runtime: update skips for TestGdbBacktrace + 2025-06-30 9d1cd0b881 iter: add missing type parameter in doc + 2025-06-29 acb914f2c2 cmd/doc: fix -http on Windows + 2025-06-27 b51f1cdb87 runtime: remove arbitrary 5-second timeout in TestNeedmDeadlock + 2025-06-27 f1e6ae2f6f reflect: fix TypeAssert on nil interface values + 2025-06-27 e81c624656 os: use minimal file permissions when opening parent directory in RemoveAll + 2025-06-27 2a22aefa1f encoding/json: add security section to doc + 2025-06-27 742fda9524 runtime: account for missing frame pointer in preamble + 2025-06-27 fdc076ce76 net/http: fix RoundTrip context cancellation for js/wasm + 2025-06-27 d9d2cadd63 encoding/json: fix typo in hotlink for jsontext.PreserveRawStrings + 2025-06-26 0f8ab2db17 cmd/link: permit a larger size BSS reference to a smaller DATA symbol + 2025-06-26 988a20c8c5 cmd/compile/internal/escape: evaluate any side effects when rewriting with literals + 2025-06-25 b5d555991a encoding/json/jsontext: remove Encoder.UnusedBuffer + 2025-06-25 0b4d2eab2f encoding/json/jsontext: rename Encoder.UnusedBuffer as Encoder.AvailableBuffer Change-Id: Iea44ab825bdf087fbe7570df8d2d66d1d3327c31
2025-06-30sync: disassociate WaitGroups from bubbles on WaitDamien Neil
Fix a race condition in disassociating a WaitGroup in a synctest bubble from its bubble. We previously disassociated the WaitGroup when count becomes 0, but this causes problems when an Add call setting count to 0 races with one incrementing the count. Instead, disassociate a WaitGroup from its bubble when Wait returns. Wait must not be called concurrently with an Add call with a positive delta and a 0 count, so we know that the disassociation will not race with an Add call trying to create a new association. Fixes #74386 Change-Id: I9b519519921f7691869a64a245a5ee65d071d054 Reviewed-on: https://go-review.googlesource.com/c/go/+/684635 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-25[dev.simd] all: merge master (f8ccda2) into dev.simdCherry Mui
Merge List: + 2025-06-25 f8ccda2e05 runtime: make explicit nil check in (*spanInlineMarkBits).init + 2025-06-25 f069a82998 runtime: note custom GOMAXPROCS even if value doesn't change + 2025-06-24 e515ef8bc2 context: fix typo in context_test.go + 2025-06-24 47b941f445 cmd/link: add one more linkname to the blocklist + 2025-06-24 34cf5f6205 go/types: add test for interface method field type + 2025-06-24 6e618cd42a encoding/json: use zstd compressed testdata + 2025-06-24 fcb9850859 net/http: reduce allocs in CrossOriginProtection.Check + 2025-06-24 11f11f2a00 encoding/json/v2: support ISO 8601 durations + 2025-06-24 62deaf4fb8 doc: fix links to runtime Environment Variables + 2025-06-24 2e9bb62bfe encoding/json/v2: reject unquoted dash as a JSON field name + 2025-06-23 ed7815726d encoding/json/v2: report error on time.Duration without explicit format + 2025-06-23 f866958246 cmd/dist: test encoding/json/... with GOEXPERIMENT=jsonv2 + 2025-06-23 f77a0aa6b6 internal/trace: improve gc-stress test + 2025-06-23 4506796a6e encoding/json/jsontext: consistently use JSON terminology + 2025-06-23 456a90aa16 runtime: add missing unlock in sysReserveAlignedSbrk + 2025-06-23 1cf6386b5e Revert "go/types, types2: don't register interface methods in Info.Types map" + 2025-06-20 49cdf0c42e testing, testing/synctest: handle T.Helper in synctest bubbles + 2025-06-20 3bf1eecbd3 runtime: fix struct comment + 2025-06-20 8ed23a2936 crypto/cipher: fix link to crypto/aes + 2025-06-20 ef60769b46 go/doc: add a golden test that reproduces #62640 + 2025-06-18 8552bcf7c2 cmd/go/internal/fips140: ignore GOEXPERIMENT on error + 2025-06-18 4c7567290c runtime: set mspan limit field early and eagerly + 2025-06-18 c6ac736288 runtime: prevent mutual deadlock between GC stopTheWorld and suspendG + 2025-06-17 53af292aed encoding/json/jsontext: fix spelling error + 2025-06-16 d058254689 cmd/dist: always include variant in package names + 2025-06-16 3254c2bb83 internal/reflectlite: fix comment about meaning of flag field + 2025-06-16 816199e421 runtime: don't let readTrace spin on trace.shutdown + 2025-06-16 ea00461b17 internal/trace: make Value follow reflect conventions + 2025-06-13 96a6e147b2 runtime: comment that some linknames are used by runtime/trace + 2025-06-13 644905891f runtime: remove unused unique.runtime_blockUntilEmptyFinalizerQueue + 2025-06-13 683810a368 cmd/link: block new standard library linknames + 2025-06-12 9149876112 all: replace a few user-visible mentions of golang.org and godoc.org + 2025-06-12 934d5f2cf7 internal/trace: end test programs with SIGQUIT + 2025-06-12 5a08865de3 net: remove some BUG entries + 2025-06-11 d166a0b03e encoding/json/jsontext, encoding/json/v2: document experimental nature + 2025-06-11 d4c6effaa7 cmd/compile: add up-to-date test for generated files + 2025-06-10 7fa2c736b3 os: disallow Root.Remove(".") on Plan 9, js, and Windows + 2025-06-10 281cfcfc1b runtime: handle system goroutines later in goroutine profiling + 2025-06-10 4f86f22671 testing/synctest, runtime: avoid panic when using linker-alloc WG from bubble Change-Id: I8bbbf40ce053a80395b08977e21b1f34c67de117
2025-06-20[dev.simd] sync: correct the type of runtime_StoreReluintptrCherry Mui
runtime_StoreReluintptr linknames to internal/runtime/atomic.StoreReluintptr, which does not have a result. Change-Id: I468cce82985f391c221768188a5eaff43cbcd037 Reviewed-on: https://go-review.googlesource.com/c/go/+/683095 TryBot-Bypass: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com>
2025-06-10testing/synctest, runtime: avoid panic when using linker-alloc WG from bubbleDamien Neil
We associate WaitGroups with synctest bubbles by attaching a special to the WaitGroup. It is not possible to attach a special to a linker-allocated value, such as: var wg sync.WaitGroup Avoid panicking when accessing a linker-allocated WaitGroup from a bubble. We have no way to associate these WaitGroups with a bubble, so just treat them as always unbubbled. This is probably fine, since the WaitGroup was always created outside the bubble in this case. Fixes #74005 Change-Id: Ic71514b0b8d0cecd62e45cc929ffcbeb16f54a55 Reviewed-on: https://go-review.googlesource.com/c/go/+/679695 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-29runtime, internal/synctest, sync: associate WaitGroups with bubblesDamien Neil
Add support to internal/synctest for managing associations between arbitrary pointers and synctest bubbles. (Implemented internally to the runtime package by attaching a special to the pointer.) Associate WaitGroups with bubbles. Since WaitGroups don't have a constructor, perform the association when Add is called. All Add calls must be made from within the same bubble, or outside any bubble. When a bubbled goroutine calls WaitGroup.Wait, the wait is durably blocking iff the WaitGroup is associated with the current bubble. Change-Id: I77e2701e734ac2fa2b32b28d5b0c853b7b2825c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/676656 Reviewed-by: 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> Auto-Submit: Damien Neil <dneil@google.com>
2025-05-16sync: set GOMAXPROCS to 1 in TestPoolGCMichael Anthony Knyszek
This test expects to be able to drain a Pool using only Get. This isn't actually possible in the general case, since a pooled value could get stuck in some P's private slot. However, if GOMAXPROCS=1, there's only 1 P we could be running on, so getting stuck becomes impossible. This test isn't checking any concurrent properties of Pool, so this is fine. Just set GOMAXPROCS=1 for this one particular test. Fixes #73728. Change-Id: I9053e28118060650f2cd7d0d58f5a86d630b36f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/673375 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-05-14sync: use blockUntilCleanupQueueEmpty instead of busy-looping in testsMichael Anthony Knyszek
testPool currently does the old-style busy loop to wait until cleanups have executed. Clean this up by using the linkname'd blockUntilCleanupQueueEmpty. For #73642. Change-Id: Ie0c2614db858a984f25b33a805dc52948069eb52 Reviewed-on: https://go-review.googlesource.com/c/go/+/671675 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-08runtime: schedule cleanups across multiple goroutinesMichael Anthony Knyszek
This change splits the finalizer and cleanup queues and implements a new lock-free blocking queue for cleanups. The basic design is as follows: The cleanup queue is organized in fixed-sized blocks. Individual cleanup functions are queued, but only whole blocks are dequeued. Enqueuing cleanups places them in P-local cleanup blocks. These are flushed to the full list as they get full. Cleanups can only be enqueued by an active sweeper. Dequeuing cleanups always dequeues entire blocks from the full list. Cleanup blocks can be dequeued and executed at any time. The very last active sweeper in the sweep phase is responsible for flushing all local cleanup blocks to the full list. It can do this without any synchronization because the next GC can't start yet, so we can be very certain that nobody else will be accessing the local blocks. Cleanup blocks are stored off-heap because the need to be allocated by the sweeper, which is called from heap allocation paths. As a result, the GC treats cleanup blocks as roots, just like finalizer blocks. Flushes to the full list signal to the scheduler that cleanup goroutines should be awoken. Every time the scheduler goes to wake up a cleanup goroutine and there were more signals than goroutines to wake, it then forwards this signal to runtime.AddCleanup, so that it creates another goroutine the next time it is called, up to gomaxprocs goroutines. The signals here are a little convoluted, but exist because the sweeper and the scheduler cannot safely create new goroutines. For #71772. For #71825. Change-Id: Ie839fde2b67e1b79ac1426be0ea29a8d923a62cc Reviewed-on: https://go-review.googlesource.com/c/go/+/650697 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2025-05-01sync: WaitGroup.Go: document that f must not panicAlan Donovan
Fixes #63796 Change-Id: Ib11d32574011e13aab3a0ad504f0d10009627503 Reviewed-on: https://go-review.googlesource.com/c/go/+/667695 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Commit-Queue: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
2025-04-25sync: tidy WaitGroup documentation, add WaitGroup.Go exampleAustin Clements
This reframes the WaitGroup documentation with Go at its center and Add/Done as more "advanced" features. Updates #63796 Change-Id: I8101972626fdb00c6f7fb185b685227823d10db1 Reviewed-on: https://go-review.googlesource.com/c/go/+/662975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
2025-04-24sync/atomic: document that atomic types should not be copiedMateusz Poliwczak
Change-Id: I3c557d02cd676a389b5c5ea70ed92c8959041e3b GitHub-Last-Rev: 8732da19a64853834ca155cafc1d7b2967290c31 GitHub-Pull-Request: golang/go#63256 Reviewed-on: https://go-review.googlesource.com/c/go/+/531375 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Sean Liao <sean@liao.dev>
2025-04-22sync: use atomic.Bool for Once.donePrabhav Dogra
Updated the use of atomic.Uint32 to atomic.Bool for sync package. Change-Id: Ib8da66fea86ef06e1427ac5118016b96fbcda6b1 GitHub-Last-Rev: d36e0f431fcde988f90badf86bbf04a18a411947 GitHub-Pull-Request: golang/go#73447 Reviewed-on: https://go-review.googlesource.com/c/go/+/666895 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
2025-04-04sync: add WaitGroup.Goqiulaidongfeng
Fixes #63796 Change-Id: I2a941275dd64ef858cbf02d31a759fdc5c082ceb Reviewed-on: https://go-review.googlesource.com/c/go/+/662635 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Carlos Amedee <carlos@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
2025-03-05sync: document behavior of Map.Delete when key is not presentFilippo Valsorda
Change-Id: I6a6a465631e91141a5fcc9c04a7df0dc47780731 Reviewed-on: https://go-review.googlesource.com/c/go/+/643955 Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-02-26sync: don't keep func alive after OnceFunc panicsMateusz Poliwczak
This moves the f = nil assignment to the defer statement, so that in case the functions panics, the f func is not referenced anymore. Change-Id: I3e53b90a10f21741e26602270822c8a75679f163 GitHub-Last-Rev: bda01100c6d48d1b0ca3e1baefef4d592cca1fee GitHub-Pull-Request: golang/go#68636 Reviewed-on: https://go-review.googlesource.com/c/go/+/601240 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2025-02-25sync: reduce OnceFunc (and variants) heap allocationsBrian Byrne
The lifetime of the variables are identical; capture them in a single struct to avoid individual allocations. The inner closure can also avoid allocation by using the capture of the outer closure. Escape analysis for OnceValues: /go/src/sync/oncefunc.go:74:29: moved to heap: sync.f /go/src/sync/oncefunc.go:76:3: moved to heap: sync.once /go/src/sync/oncefunc.go:77:3: moved to heap: sync.valid /go/src/sync/oncefunc.go:78:3: moved to heap: sync.p /go/src/sync/oncefunc.go:79:3: moved to heap: sync.r1 /go/src/sync/oncefunc.go:80:3: moved to heap: sync.r2 /go/src/sync/oncefunc.go:82:7: func literal escapes to heap /go/src/sync/oncefunc.go:83:9: func literal does not escape /go/src/sync/oncefunc.go:93:9: func literal escapes to heap After provided changes: /go/src/sync/oncefunc.go:86:2: moved to heap: sync.d /go/src/sync/oncefunc.go:96:9: func literal escapes to heap /go/src/sync/oncefunc.go:99:13: func literal does not escape /go/src/sync/oncefunc.go:100:10: func literal does not escape Change-Id: Ib06e650fd427b57e0bdbdf1fe759fe436104ff79 Reviewed-on: https://go-review.googlesource.com/c/go/+/601596 Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com>
2025-02-24all: use testenv.Executable instead of os.Executable and os.Args[0]qmuntal
In test files, using testenv.Executable is more reliable than os.Executable or os.Args[0]. Change-Id: I88e577efeabc20d02ada27bf706ae4523129128e Reviewed-on: https://go-review.googlesource.com/c/go/+/651955 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2025-02-14sync: use runtime.AddCleanup instead of runtime.SetFinalizerCarlos Amedee
This changes the use of finalizers to the cleanup implementation in tests. Updates #70907 Change-Id: I7d7289999a83fa53f538698f34294f7d9651c921 Reviewed-on: https://go-review.googlesource.com/c/go/+/640735 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-12-04sync: document RWMutex locks cannot be upgraded / downgradedSean Liao
Fixes #38859 Change-Id: I9f4f6fa4cb529aaadfb3812e3a5c0da982a95f68 Reviewed-on: https://go-review.googlesource.com/c/go/+/633415 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-11-19internal/synctest: new package for testing concurrent codeDamien Neil
Add an internal (for now) implementation of testing/synctest. The synctest.Run function executes a tree of goroutines in an isolated environment using a fake clock. The synctest.Wait function allows a test to wait for all other goroutines within the test to reach a blocking point. For #67434 For #69687 Change-Id: Icb39e54c54cece96517e58ef9cfb18bf68506cfc Reviewed-on: https://go-review.googlesource.com/c/go/+/591997 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-18sync: make HashTrieMap[any, any] the default implementation of MapMichael Anthony Knyszek
This change adds a GOEXPERIMENT, synchashtriemap, which replaces the internals of a sync.Map with internal/sync.HashTrieMap[any, any]. The main purpose behind this change is improved performance. Across almost every benchmark, HashTrieMap[any, any] performs better than Map. Also, relax TestMapClearNoAllocations to allow for one allocation. Currently, the HashTrieMap allocates a new empty root node and stores it: that's the whole clear operation. At the cost of some complexity, we could allow Clear to have zero allocations by clearing the root node. The complexity comes down to allowing threads to race to install a new root node *or* creating a top-level mutex for installing a root node. But I'm not sure this is worth it. Whether Clear or some other operation takes the hit for allocating a single node almost certainly doesn't matter. And Clear is still much, much faster in the new implementation than the old, so I don't consider this a regression. Change-Id: I939aa70a0edf2e850cedbea239aaf29a11a77b79 Reviewed-on: https://go-review.googlesource.com/c/go/+/608335 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2024-11-18sync: add HashTrieMap to Map tests and benchmarksMichael Anthony Knyszek
Also, rename Map benchmarks to make them easier to single out via regexp. Change-Id: I4dcb066745aba1c340f56050d08539ae2976274d Reviewed-on: https://go-review.googlesource.com/c/go/+/606461 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2024-11-18internal/sync: move sync.Mutex implementation into new packageMichael Anthony Knyszek
This CL refactors sync.Mutex such that its implementation lives in the new internal/sync package. The purpose of this change is to eventually reverse the dependency edge between internal/concurrent and sync, such that sync can depend on internal/concurrent (or really, its contents, which will likely end up in internal/sync). The only change made to the sync.Mutex code is the frame skip count for mutex profiling, so that the internal/sync frames are omitted in the profile. Change-Id: Ib3603d30e8e71508c4ea883a584ae2e51ce40c3f Reviewed-on: https://go-review.googlesource.com/c/go/+/594056 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2024-11-18sync: add explicit noCopy fields to Map, Mutex, and OnceMichael Anthony Knyszek
Following CLs will refactor Mutex and change the internals of Map. This ends up breaking tests in x/tools for the copylock vet check, because the error message changes. Let's insulate ourselves from such things permanently by adding an explicit noCopy field. We'll update the vet check to accept that as the problem, rather than depend on less explicit internals. We capture Once here too to clean up the error message as well. Change-Id: Iead985fc8ec9ef3ea5ff615f26dde17bb03aeadb Reviewed-on: https://go-review.googlesource.com/c/go/+/627777 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Tim King <taking@google.com>
2024-11-15sync/atomic: make intrinsics noescape except 64bits op on 32bits arch and ↵Jorropo
unsafe.Pointer Fixes #16241 I made 64 bits op on 32 bits arches still leak since it was kinda promised. The promised leaks were wider than this but I don't belive it's effect can be observed in an breaking maner without using unsafe the way it's currently setup. Change-Id: I66d8df47bfe49bce3efa64ac668a2a55f70733a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/462298 Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-07-11all: make struct comments match struct namescuishuang
Change-Id: I011f66854a9af5f3baa20abebd4b315c15db571f Reviewed-on: https://go-review.googlesource.com/c/go/+/596715 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: shuang cui <imcusg@gmail.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-07-01sync: refer to Locker interface methods in RWMutex.RLocker docDmitri Shuralyov
The methods being implemented are part of the Locker interface, not the RWMutex struct. Fixes #68250. Change-Id: I609c4d5c44e90a12914a8678971ba295519cc265 Reviewed-on: https://go-review.googlesource.com/c/go/+/595875 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
2024-06-21sync/atomic: correct result names for Or methodsAustin Clements
A few of the new Or methods of the atomic types use "new" as the name for the result value, but it actually returns the old value. Fix this by renaming the result values to "old". Updates #61395. Change-Id: Ib08db9964f5dfe91929f216d50ff0c9cc891ee49 Reviewed-on: https://go-review.googlesource.com/c/go/+/593855 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> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2024-06-07sync: include links to the Go memory model in package documentationRodrigo Orselli
The lack of links to https://go.dev/ref/mem in the sync package documentation makes it difficult to read for people who have no previous knowledge of that page. This PR includes the links where needed. Fixes #67891 Change-Id: I0e1344cc6d7b702f4cb2e55fe0fcee3eb089391a GitHub-Last-Rev: 427cf58aaeaae2e4b060248dd592e5fe8c6b7df4 GitHub-Pull-Request: golang/go#67892 Reviewed-on: https://go-review.googlesource.com/c/go/+/591395 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-29all: document legacy //go:linkname for modules with ≥100 dependentsRuss Cox
For #67401. Change-Id: I015408a3f437c1733d97160ef2fb5da6d4efcc5c Reviewed-on: https://go-review.googlesource.com/c/go/+/587598 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org>
2024-05-23all: document legacy //go:linkname for modules with ≥500 dependentsRuss Cox
For #67401. Change-Id: I7dd28c3b01a1a647f84929d15412aa43ab0089ee Reviewed-on: https://go-review.googlesource.com/c/go/+/587575 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-23all: change from sort functions to slices functions where feasibleIan Lance Taylor
Doing this because the slices functions are slightly faster and slightly easier to use. It also removes one dependency layer. This CL does not change packages that are used during bootstrap, as the bootstrap compiler does not have the required slices functions. It does not change the go/scanner package because the ErrorList Len, Swap, and Less methods are part of the Go 1 API. Change-Id: If52899be791c829198e11d2408727720b91ebe8a Reviewed-on: https://go-review.googlesource.com/c/go/+/587655 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com>
2024-05-17sync/atomic: public And/Or ops and race instrumentationMauri de Souza Meneguzzo
This CL implements the new sync/atomic AND and OR apis as well as their race counterparts. Fixes #61395 Change-Id: I294eefe4b3ac27bc4ed237edcbfa88a8c646d86f GitHub-Last-Rev: f174297007c7b81b1ff4a687ef23d955a3ffd4db GitHub-Pull-Request: golang/go#64331 Reviewed-on: https://go-review.googlesource.com/c/go/+/544455 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
2024-05-17all: add push linknames to allow legacy pull linknamesCherry Mui
CL 585358 adds restrictions to disallow pull-only linknames (currently off by default). Currently, there are quite some pull- only linknames in user code in the wild. In order not to break those, we add push linknames to allow them to be pulled. This CL includes linknames found in a large code corpus (thanks Matthew Dempsky and Michael Pratt for the analysis!), that are not currently linknamed. Updates #67401. Change-Id: I32f5fc0c7a6abbd7a11359a025cfa2bf458fe767 Reviewed-on: https://go-review.googlesource.com/c/go/+/586137 Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-23sync: add examples for OnceValue and OnceValuesAustin Clements
Updates #56102. Change-Id: I2ee2dbc43b4333511d9d23752fdc574dfbf5f5bd Reviewed-on: https://go-review.googlesource.com/c/go/+/481062 Reviewed-by: Andrew Gerrand <adg@golang.org> Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Joedian Reid <joedian@google.com>
2024-03-25runtime: migrate internal/atomic to internal/runtimeAndy Pan
For #65355 Change-Id: I65dd090fb99de9b231af2112c5ccb0eb635db2be Reviewed-on: https://go-review.googlesource.com/c/go/+/560155 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ibrahim Bazoka <ibrahimbazoka729@gmail.com> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
2024-03-21sync: name the Map.CompareAndSwap return valuePeter Collingbourne
The godoc for sync.Map.CompareAndSwap does not document the meaning of its return value. Document it by giving it a name. Change-Id: I50ad9c078a7885f5ce83489d66d138d491c35861 Reviewed-on: https://go-review.googlesource.com/c/go/+/572657 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-02-28all: run go fmtsivchari
I ran go fmt to fix format on the entire repository. Change-Id: I2f09166b6b8ba0ffb0ba27f6500efb0ea4cf21ff Reviewed-on: https://go-review.googlesource.com/c/go/+/566835 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org>