]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips/check: fix for ASAN builds
authorRuss Cox <rsc@golang.org>
Thu, 14 Nov 2024 11:56:46 +0000 (12:56 +0100)
committerGopher Robot <gobot@golang.org>
Fri, 15 Nov 2024 15:49:34 +0000 (15:49 +0000)
commit534551d55a8adff53a506a8fcea387c3ade346f6
tree7d0caad35293c3f0943ef7bf2ee680d920d744c1
parent102d031a5833cdbcd4accfcd9d6d632d95fd1d61
crypto/internal/fips/check: fix for ASAN builds

For now, FIPS does not work with ASAN: ASAN detects reads
it doesn't like during the scans of memory done by verification.
It could be made to work if there was a way to disable ASAN
during verification, but that doesn't appear to be possible.

Instead of a cryptic ASAN message, panic with a clear error.
And disable the test during ASAN.

Fixes #70321.

Change-Id: Ibc3876836abb83248a23c18c3b44c4cbb4a0c600
Reviewed-on: https://go-review.googlesource.com/c/go/+/627603
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/crypto/internal/fips/check/check.go
src/crypto/internal/fips/check/check_test.go
src/crypto/internal/fips/check/checktest/asm.s
src/crypto/internal/fips/check/checktest/test.go