Skip to content

[release-branch.go1.26] Suppress follow-on systemcrypto errors without cgo - #2480

Merged
George Adams (gdams) merged 1 commit into
microsoft/release-branch.go1.26from
dev/gadams/cgoerr
Aug 25, 2026
Merged

[release-branch.go1.26] Suppress follow-on systemcrypto errors without cgo#2480
George Adams (gdams) merged 1 commit into
microsoft/release-branch.go1.26from
dev/gadams/cgoerr

Conversation

@gdams

@gdams George Adams (gdams) commented Aug 25, 2026

Copy link
Copy Markdown
Member

When systemcrypto is requested on Linux with CGO disabled, select the inert FIPS backend alongside the existing no-backend implementation. This preserves the intended CGO diagnostic while preventing follow-on undefined-symbol errors from crypto/internal/backend/fips140.

The cmd/go regression test now verifies that the CGO diagnostic is present and no FIPS backend diagnostic is emitted.

Tested with:

go test cmd/go -run '^TestSystemCryptoNoCgoChecks$' -count=1

Fixes #2473

Copilot AI lite review requested due to automatic review settings August 25, 2026 09:46
@gdams
George Adams (gdams) requested a review from a team as a code owner August 25, 2026 09:46
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a Linux + CGO_ENABLED=0 scenario where requesting GOEXPERIMENT=systemcrypto produces the intended CGO diagnostic but was followed by additional, misleading crypto/internal/backend/fips140 undefined-symbol compiler errors. The change adjusts backend selection so an inert FIPS backend is chosen in that configuration, and updates the cmd/go regression test to assert the output is limited to the expected diagnostic.

Changes:

  • Extend the crypto/internal/backend/fips140 “no-backend” selection logic to cover the systemcrypto + OpenSSL-without-cgo configuration, preventing follow-on undefined-symbol errors.
  • Update cmd/go regression coverage to assert the CGO diagnostic is present and that no crypto/internal/backend/fips140 diagnostic is emitted.
  • Minor patch hygiene updates (patch stats/index updates) as part of the patch file refresh.
Show a summary per file
File Description
patches/0003-Implement-crypto-internal-backend.patch Updates backend build-tag selection and strengthens cmd/go regression testing to avoid follow-on FIPS backend compiler diagnostics when systemcrypto is requested without CGO.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread patches/0003-Implement-crypto-internal-backend.patch
Comment thread patches/0003-Implement-crypto-internal-backend.patch
@gdams
George Adams (gdams) merged commit 29061e3 into microsoft/release-branch.go1.26 Aug 25, 2026
42 checks passed
@gdams
George Adams (gdams) deleted the dev/gadams/cgoerr branch August 25, 2026 10:35
@dagood Davis Goodin (dagood) changed the title Suppress follow-on systemcrypto errors without cgo [release-branch.go1.26] Suppress follow-on systemcrypto errors without cgo Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The error describing a failure due to CGO_ENABLED=0 is followed by additional compiler errors in 1.26

3 participants