]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] cmd/go/internal/fips140: ignore GOEXPERIMENT on error
authorMichael Pratt <mpratt@google.com>
Wed, 11 Jun 2025 20:46:21 +0000 (16:46 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 26 Jun 2025 17:26:56 +0000 (10:26 -0700)
commite03869084788ed039f04336d9d8f7e9fa43c534e
treeed2e214d80b25fe177d178aba4897d3bdd6d7dcd
parent1575127ef82d9a49c620734112fa2c72b74c6a55
[release-branch.go1.24] cmd/go/internal/fips140: ignore GOEXPERIMENT on error

During toolchain selection, the GOEXPERIMENT value may not be valid for
the current version (but it is valid for the selected version). In this
case, cfg.ExperimentErr is set and cfg.Experiment is nil.

Normally cmd/go main exits when ExperimentErr is set, so Experiment is
~never nil. But that is skipped during toolchain selection, and
fips140.Init is used during toolchain selection.

For #74111.
Fixes #74113

Change-Id: I6a6a636c65ee5831feaf3d29993a60613bbec6f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/680976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
(cherry picked from commit 8552bcf7c261cd150d0074c4ec7e2412b20af0a5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/682735
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
src/cmd/go/internal/fips140/fips140.go