Skip to content

[pull] master from golang:master#109

Merged
pull[bot] merged 4 commits into
trailofbits:masterfrom
golang:master
Jun 26, 2026
Merged

[pull] master from golang:master#109
pull[bot] merged 4 commits into
trailofbits:masterfrom
golang:master

Conversation

@pull

@pull pull Bot commented Jun 26, 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 : )

mrkfrmn and others added 4 commits June 25, 2026 12:15
Currently, there is a known issue when type checking programs like:

type X A
type A = N
type N G[A]
type G[_ any] int

This change just improves the error message from "panic: nil" to
"panic: cannot type hash incomplete alias (see go.dev/...)". This
should prevent duplicate reports like #79655 and #80150.

For #78296

Change-Id: Id89d1d45d60a59164b802f2ea25f27c70ae46cdf
Reviewed-on: https://go-review.googlesource.com/c/go/+/794400
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>
Inside mallocStub, combine all of the fast path (!isSlowPath_) logic
into a single block, and all of the slow path logic into a single block.

This is primarily a refactor with no semantic change. The intention is
to make it easier to read which part are fast/slow, and to make it
easier for a follow up to change to acquirem early in the fast path.

The only semantic change is to move doubleCheckMalloc earlier. If the
fast path decides to fall back to the slow path, that case will execute
twice, but it is a trivial check and it's even compiled in by default.

This arrangement does require duplicating lockRankMayQueueFinalizer in
both blocks. We can't move it earlier because the fast path falling back
to the slow path would call this twice, which would trigger a lock rank
violation. We could potentially move it below (just before
inlineMalloc). I don't believe it needs to come before
deductAssistCredit, but I'd rather do that in a separate change.

For #79667.
For #79699.

Change-Id: I1101cb112e0c48280c0317d986607ba66a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/794120
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
In size-specialized malloc, the fast path assumes that GC marking is not
occurring. Thus once we decide to take the fast path, we must guarantee
that the GC cannot start.

No such guarantee exists today because the forceSlowPath check occurs
outside of any locking.

This may not have any impact on normal builds because we don't async
preempt the runtime, and I'm not sure there are any preemptible calls
before acquirem. But when inlining is disabled, there are preemptible
calls which could thus allow a GC cycle to start.

Fix this by calling acquirem prior to the forceSlowPath check and
holding it through inlinedStub.

Note that the slow path takes acquirem a bit later because we must not
acquirem before deductAssistCredit, as that function won't run any
assists when locked.

For #79667.
For #79699.

Change-Id: Ief7220435b6a5fd70d721f58cbeac86e6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/794121
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Document that ChaCha8 is the general-purpose source resistant to
prediction, and that PCG is faster but unfit for security-relevant
purposes.

Fixes #79891

Change-Id: Ic4133dd9bd860c2643c622f799f2c54b1678e4f0
GitHub-Last-Rev: 93d2251
GitHub-Pull-Request: #79926
Reviewed-on: https://go-review.googlesource.com/c/go/+/789040
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>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
@pull pull Bot locked and limited conversation to collaborators Jun 26, 2026
@pull pull Bot added the ⤵️ pull label Jun 26, 2026
@pull pull Bot merged commit 8cfdca2 into trailofbits:master Jun 26, 2026
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.

3 participants