Skip to content

[pull] master from golang:master - #192

Merged
pull[bot] merged 11 commits into
trailofbits:masterfrom
golang:master
Sep 1, 2026
Merged

[pull] master from golang:master#192
pull[bot] merged 11 commits into
trailofbits:masterfrom
golang:master

Conversation

@pull

@pull pull Bot commented Sep 1, 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 : )

4a6f656c and others added 11 commits September 1, 2026 05:57
…iscv64

Shift instructions on riscv64 only use the lower six bits (or the lower
five bits for word based shift instructions) - this means that masking
the lower bits is unnecessary and can be eliminated.

Change-Id: Ic0804ebe12de1054d4d6993cfc267579ff4ae527
Reviewed-on: https://go-review.googlesource.com/c/go/+/748923
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Julian Zhu <jz531210@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
This makes phi source locations more similar to how they
were before CL 819540, which affects scheduling and
debugging.

It still changes the order in which children are visited, using the
sibling links in sparse-dominators instead of the block order.
(Sibling links are derived from reverse post order, which ought to be
more stable in the face of minor changes, hence "better" from the POV
of minimizing unintended changes/surprises in the future.)

The original CL comes from Josh Bleecher Snyder
and his silicon minions.

Change-Id: If0d54ca26f1a0af55cbadbaaf638c6aaa5a8a914
Reviewed-on: https://go-review.googlesource.com/c/go/+/825184
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>
It was fixed by CL 804320, just adding the regression test.

Fixes #80534

Change-Id: Id18bdd9eb84f91d0dc7db1545e913ab8284d6333
Reviewed-on: https://go-review.googlesource.com/c/go/+/809660
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Int.Divide preserves y.abs for rounding adjustments, but currently
copies it only when the quotient aliases the divisor.

When the remainder aliases the divisor, nat.div may overwrite y.abs
before the Floor, Ceil, or Round adjustment uses it. This can produce
an incorrect remainder.

Copy the divisor magnitude when either output aliases it, and add
tests for remainder-divisor aliasing.

Fixes #80882

Change-Id: Ifce2d3fef94b955d43d35bd015cd3e2e74645e35
Reviewed-on: https://go-review.googlesource.com/c/go/+/814621
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
The cpufeatures pass treated any SIMD-typed value in a block as
implying the presence of the CPU feature its type needs ("a fault is
a fault"). That reasoning is wrong for values that emit no machine
code: in particular, a SIMD-typed zero is materialized as a reference
to the fixed all-zeros register X15 and flows freely through code that
must run on machines without AVX. Since rematerializable values are
placed in the entry block, a single inlined SIMD zero could mark an
entire function as AVX-capable. Under GOEXPERIMENT=simd this happened
to the map fast paths: the inlined AES hash (guarded only by a runtime
flag the pass cannot see) put a SIMD zero in the entry block, so every
block of mapaccess claimed AVX, including the unconditionally executed
legacy-SSE group-match code. This is latent until block features gain
consumers that change instruction encodings.

Skip no-code values (SIMD zeros, phis, copies, args, SelectN) when
computing block feature effects. Functions whose signatures mention
SIMD types still claim features for their entry block; that is a
deliberate contract, not an inference from generated code.

The loop-header expectation removed from test/simd.go relied on the
old behavior: that block holds only rematerializable SIMD zeros and
emits no vector instruction.

For #80835

Change-Id: Iec0ab0cf2f1df6c31951b6c36d1f5ae64653531e
Reviewed-on: https://go-review.googlesource.com/c/go/+/825185
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
…r edge

Blocks created by the critical pass start with no CPU features, so
later consumers of block features (e.g. the encoding of
regalloc-inserted shuffle copies placed in split blocks) had no facts
to work with there.

CPU features are execution-invariant facts. A split block executes
only after its predecessor and unconditionally proceeds to its
successor, so the features of both hold in it; a split block reused
for several predecessor edges keeps only what all of them guarantee.

The features given to split blocks are reported at
-d=ssa/critical/debug=1, and test/simd_critical.go exercises all
three paths through the pass: fresh split blocks for edges into
single-phi and multi-phi merge blocks, and the reuse of a split block
for several edges carrying the same phi argument.

For #80835

Change-Id: Ibcf0a15bc47260abbff2b3b3e9fbcc24f0dc3bd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/825186
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The move of HTTP/2 into std made errChanPool a field on http2.Server
so that pooled channels wouldn't be reused across synctest bubbles.
But that regressed memory for servers using the ServeConn-per-conn
pattern (HTTP/2 over hijacked or tunneled conns): every sync.Pool
re-pins after each GC, allocating a GOMAXPROCS-sized poolLocal array
(4 KB at GOMAXPROCS=32) per pool, and a per-conn pool provides no
reuse anyway. On a production proxy with ~400k conns, the poolLocal
arrays accounted for ~2 GB, ~10% of heap.

Instead, go back to a single global pool and skip pooling entirely
when the current goroutine is in a synctest bubble.

Change-Id: I8a8df547507b185b7943ab8d227da8262acf8a49
Reviewed-on: https://go-review.googlesource.com/c/go/+/825424
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
The test selected clang whenever it was present on PATH, even when CC
was configured to gcc. On Windows builders where clang lacked the
required C headers, this caused go run to fail.

Use the cc condition to select the configured compiler, keeping the test
focused on handling quotes and spaces in CC.

Change-Id: Ib4f7288f16966ce605f10e1326158a91ef27b8a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/825644
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
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>
/sched/goroutines/not-in-go is documented as an approximate count, and a
single read of it can legitimately come up one short. While a third party
is partway through taking a P away from a goroutine in a cgo call, that
goroutine is briefly counted in neither half of the runtime's accounting:
it is no longer reachable through its P, and sched.nGsyscallNoP has not
been incremented for it yet. See go.dev/issue/78877 for the analysis.

Read the metric until it settles instead of trusting one sample. The
accounting bugs this program exists to catch, including the negative
nGsyscallNoP of go.dev/issue/76435, make the count wrong and keep it
wrong, so they never settle and still fail here.

Also fix the failure reporting. failed was declared false and never
assigned, so a bad reading exited 0 and the program only failed because
the stray println perturbed the output runTestProg compares against.

Measured on linux/amd64 against an unpatched runtime: 5 of 150000 runs
of NotInGoMetricCgoCallAndCallback saw the short reading, and every one
of them settled after a single 1ms retry. 250000 runs of
NotInGoMetricCgoCallAndCallback and 150000 each of NotInGoMetricCgoCall
and NotInGoMetricCgoCallback then passed with no failures, against a
baseline of 5 and 2 failures respectively.

Updates #78877.

Change-Id: I8165f8731c6d04503e8c49b809b0cf696a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/822584
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TestScript/goauth_git sets up a file-backed credential helper for the
test, but Git treats credential.helper as multi-valued. As a result,
helpers from system Git configuration can still be invoked.

This showed up in one test run as a 349-second timeout in the
authenticated go get case. At the deadline, one git credential fill and
two asynchronous git credential approve commands were still blocked.

Clear the inherited helper list before adding the test helper. Besides
making the test self-contained, this keeps its credentials out of system
keychains.

On a Windows host with a system credential manager, the test also
dropped from 15.38 seconds to 2.74 seconds.

Change-Id: I488beaf09c4df7d4a67fe5c2b3307acb29ec088c
Reviewed-on: https://go-review.googlesource.com/c/go/+/825664
Reviewed-by: Michael Matloob <matloob@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@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This change hashes the export and object data separately, so that
we can more granularly determine whether a build action (only needing
the export data) or a link action (depending on the object data)
should be run.

Fixes #15752

Change-Id: Ie61dcb96cc7efb53653ffb392dee60f96a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/818461
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
@pull pull Bot locked and limited conversation to collaborators Sep 1, 2026
@pull pull Bot added the ⤵️ pull label Sep 1, 2026
@pull
pull Bot merged commit 365bf56 into trailofbits:master Sep 1, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants