Skip to content

[pull] master from golang:master#136

Open
pull[bot] wants to merge 16 commits into
trailofbits:masterfrom
golang:master
Open

[pull] master from golang:master#136
pull[bot] wants to merge 16 commits into
trailofbits:masterfrom
golang:master

Conversation

@pull

@pull pull Bot commented Jul 16, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mauri870 and others added 9 commits July 16, 2026 07:44
Add an align128 sentinel type to sync/atomic and
internal/runtime/atomic, analogous to align64. Embedding `_ align128`
in a struct causes the compiler to enforce 16-byte alignment on the
containing struct.

This is required for 128-bit atomic operations (CMPXCHG16B on amd64,
CASP on arm64), which require a 16-byte-aligned memory operand. A
struct containing two uint64 fields has natural alignment of 8 bytes,
so it may otherwise be placed at a non-16-byte-aligned offset within a
larger struct, causing faults or incorrect behavior.

No test: align128 is unexported in sync/atomic, and testing it in internal
would create cyclic dependencies with reflect.

For #61236.

Change-Id: Iab0502776141aed309457b462f2fdb60ec0d5245
GitHub-Last-Rev: 8cf3794
GitHub-Pull-Request: #79991
Reviewed-on: https://go-review.googlesource.com/c/go/+/790320
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This is done similarly to in CL 646335.

Fixes #80278

Change-Id: Idc0abb682797b9f4e23842b332428a486a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/799984
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Replace the scalar chunk loop with a 64-byte/iter NEON loop.

For inputs >= 64 bytes, each iteration loads and compares 64 bytes from
both sides using NEON. The compare results are reduced to a single byte;
zero indicates a mismatch.

On mismatch, both pointers are rewound by 64 bytes and the existing
scalar chunk16 path locates the first differing byte pair and produces
the lexicographic result. This fallback is taken at most once.

Inputs < 64 bytes continue to use the existing scalar chunk16 and tail
paths unchanged.

This brings the overall structure closer to equal_arm64.s.

     goos: darwin
     goarch: arm64
     pkg: bytes
     cpu: Apple M3 Pro
                                              │   old.txt   │                new.txt                │
                                              │   sec/op    │   sec/op     vs base                  │
     CompareBytesBigUnaligned/offset=1-11       26.55µ ± 1%   19.21µ ± 1%  -27.63% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=2-11       26.83µ ± 3%   19.11µ ± 1%  -28.78% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=3-11       26.59µ ± 1%   19.28µ ± 2%  -27.50% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=4-11       26.49µ ± 1%   19.11µ ± 1%  -27.84% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=5-11       27.04µ ± 3%   19.05µ ± 1%  -29.54% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=6-11       27.12µ ± 1%   18.92µ ± 1%  -30.24% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=7-11       27.00µ ± 0%   18.90µ ± 0%  -30.01% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=0-11   26.56µ ± 1%   18.01µ ± 1%  -32.20% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=1-11   27.27µ ± 1%   19.43µ ± 0%  -28.77% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=2-11   26.83µ ± 2%   18.68µ ± 1%  -30.38% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=3-11   27.24µ ± 0%   19.45µ ± 0%  -28.62% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=4-11   27.07µ ± 1%   18.67µ ± 1%  -31.03% (p=0.000 n=7+10)
     geomean                                    26.88µ        10.82µ       -29.39%

                                              │   old.txt    │                new.txt                 │
                                              │     B/s      │     B/s       vs base                  │
     CompareBytesBigUnaligned/offset=1-11       36.78Gi ± 1%   50.82Gi ± 1%  +38.18% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=2-11       36.40Gi ± 3%   51.11Gi ± 1%  +40.41% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=3-11       36.73Gi ± 1%   50.66Gi ± 2%  +37.93% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=4-11       36.87Gi ± 1%   51.09Gi ± 1%  +38.59% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=5-11       36.12Gi ± 3%   51.27Gi ± 1%  +41.92% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=6-11       36.00Gi ± 1%   51.61Gi ± 1%  +43.35% (p=0.000 n=10)
     CompareBytesBigUnaligned/offset=7-11       36.17Gi ± 0%   51.68Gi ± 0%  +42.88% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=0-11   36.77Gi ± 1%   54.23Gi ± 1%  +47.48% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=1-11   35.81Gi ± 1%   50.27Gi ± 0%  +40.39% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=2-11   36.40Gi ± 2%   52.29Gi ± 1%  +43.64% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=3-11   35.85Gi ± 0%   50.22Gi ± 0%  +40.09% (p=0.000 n=10)
     CompareBytesBigBothUnaligned/offset=4-11   36.07Gi ± 1%   52.30Gi ± 1%  +45.00% (p=0.000 n=7+10)
     geomean                                    36.33Gi        90.30Gi       +41.63%

Change-Id: I4ce9a26f7d434eb4f6447d8a5cbebee5d0901753
GitHub-Last-Rev: 1bf14dc
GitHub-Pull-Request: #79800
Reviewed-on: https://go-review.googlesource.com/c/go/+/786560
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
CL 782461 added new test for avoiding temporary on non-softfloat system.
However, the test was set to be run unconditionally, thus it would be
failed on softfloat builders.

Fixing this by moving the test to be run under cmd/internal/testdir, so
it's possible to exclude unwanted softfloat platforms. While at it, also
tighten the test to ensure there would be temporary if the compiler is
forced to emit softfloat code.

Updates #28698
Fixes #80422

Cq-Include-Trybots: luci.golang.try:gotip-linux-386-softfloat
Change-Id: I5f7b3a19fe36d070d819d58cc29d43e4b44bb1fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/801560
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
CL 787320 changed

go list -compiled -x -f '{{.CompiledGoFiles}}' .

output. But the CL did not changed build_cwd_newline.txt
test because it is only running when CGO_ENABLED=0.

Adjust the test.

Updates #75238

Change-Id: I675abd19ef8fc75e0a8367ef937b202e8ba768ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/801420
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
…Bytes for mipsx

This CL reapplies CL 666275 , and fixes the previous implementation's unaligned access and panic on mipsx.

Updates #74998

Change-Id: I26cd3fdeb54419407bdc0a2f9616924e2e825bc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/696076
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
…Bytes for mips64x

This CL reapplies CL 666255 , and fixes the previous implementation's unaligned access and panic on mips64x.

Updates #74998

Change-Id: I8e58d25ba5f11520bfbe6e515d378c805bd5984f
Reviewed-on: https://go-review.googlesource.com/c/go/+/696075
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
The Go 1.28 development tree has opened. This is a time to update all
golang.org/x/... module versions that contribute packages to the std and
cmd modules in the standard library to latest master versions.

For #36905.

[git-generate]
go install golang.org/x/build/cmd/updatestd@latest
go install golang.org/x/tools/cmd/bundle@latest
updatestd -goroot=$(pwd) -branch=master

Change-Id: I11731202ff1ede6ed905c667b5bbd7546a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/801060
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Nicholas Husin <nsh@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
…unctions"

This reverts CL 548317.

Reason for revert: breaks darwin-amd64

Change-Id: I2dec9a5f9b5213b0e3e2b2788ff4e92ee56d3b7c
Reviewed-on: https://go-review.googlesource.com/c/go/+/801740
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
@pull pull Bot locked and limited conversation to collaborators Jul 16, 2026
@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Jul 16, 2026
@pull
pull Bot requested a review from kevin-valerio July 16, 2026 18:37
griesemer and others added 7 commits July 16, 2026 11:43
For #12854.

Change-Id: I424abb56fc2abb4d94425adba1aab04ebf974810
Reviewed-on: https://go-review.googlesource.com/c/go/+/785200
Reviewed-by: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
For #12854.

Change-Id: I10ad6e979165903be43d0d4a0eddbca897e9d767
Reviewed-on: https://go-review.googlesource.com/c/go/+/785002
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
For channel sends, we currently check the sent value before inspecting
the channel element type. If we check the channel element type first,
we can extract a target type for the value. This change reorders
processing to do so.

This is a necessary prerequisite for composite literal type inference.

For #12854

Change-Id: I19b1ef73a2f82b3c45cd3f4a3f0dc32cd795e7ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/793980
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
This change threads a type target through the major expression type
checking logic in Checker.expr and its related methods. For now,
this new argument isn't used.

This is done to reduce the surface area of upcoming changes.

For #12854

Change-Id: I0e21c010c5d0d6ea3fd6dd09b5289b1479a88f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/794040
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This change checks for a type target for composite literals and performs
the appropriate type inference. Note that U is currently always nil; we
still need to pipe in the types for the relevant contexts. Thus, this
change is a no-op for now.

For #12854

Change-Id: I8517ef72da3b09328be5661021f700b6b00e5f1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/794060
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This change handles the more straightforward targets for composite
literal type inference; they are typically identical to the targets
passed for generic function values.

A variety of test cases are added. Those which are awaiting
implementation are commented out for now.

For #12854

Change-Id: I776e160dd7bce0768589a552c4e7913b1c70220f
Reviewed-on: https://go-review.googlesource.com/c/go/+/794088
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
https://developer.arm.com/documentation/111108/2026-03/Base-Instructions/CASP--CASPA--CASPAL--CASPL--Compare-and-swap-pair-of-words-or-doublewords-in-memory-

For #61236.

Change-Id: I48d6c2548a5bc6c09ad50cef6261b455761db389
GitHub-Last-Rev: b5fa3b3
GitHub-Pull-Request: #79992
Reviewed-on: https://go-review.googlesource.com/c/go/+/790321
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants