[pull] master from golang:master#109
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )