Go version
v1.24.6 and dev
Output of go env
in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v2'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/go-cache'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/user/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2005339021=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/go/src/github.com/projectcalico/calico/go.mod'
GOMODCACHE='/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/user/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.6'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
Tried to use an uninitialized sha3.SHA3
https://go.dev/play/p/L6aGF48chtv?v=gotip
What did you see happen?
Program does not finish.
What did you expect to see?
Given than SHA3 requires a length, perhaps a panic. But would also be reasonable to "just do a SHA3-512".
Comment From: gabyhelp
Related Issues
- x/crypto/sha3: cSHAKE initialization misbehaves for extremely (unrealistically) large `N` or `S` #66232 (closed)
- x/crypto/sha3: TestCSHAKELargeS times out on s390x #70810
- x/crypto/sha3: build failure on linux/s390x at Go master due to illegal instruction #36459 (closed)
- crypto: can't be used with `crypto/sha3` when `GODEBUG=fips140=only` is set #70879 (closed)
- sha3/xor.go:subtle.XORBytes is undefined #68011 (closed)
- x/crypto/sha3: unsafe pointer conversion #37644 (closed)
- x/crypto/sha3: When compiling for all platforms `undefined: cpu.S390X` #31227 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)