Closed
Description
Go version
go version go1.22rc1 darwin/amd64
What operating system and processor architecture are you using (go env
)?
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/mjivrajani/Library/Caches/go-build'
GOENV='/Users/mjivrajani/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/mjivrajani/gocode/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/mjivrajani/gocode'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/mjivrajani/gocode/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='go1.22rc1'
GOTOOLDIR='/Users/mjivrajani/gocode/pkg/mod/golang.org/[email protected]/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22rc1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/mjivrajani/gocode/src/github.com/MadhavJivrajani/kubernetes/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/r7/f6kyp7vs0sv90105pjh1t8340000gp/T/go-build620260146=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
Started testing Kubernetes with go1.22rc1.
Ref: kubernetes/kubernetes#122410
Steps to reproduce the error:
Clone Kubernetes
git clone [email protected]:kubernetes/kubernetes.git --depth 1
Run test
In the root of the repo:
GO_VERSION=1.22rc1 ./hack/verify-typecheck-providerless.sh
What did you expect to see?
I expected the test to work as before without the panic.
If you run the same test with go1.21.5:
GO_VERSION=1.21.5 ./hack/verify-typecheck-providerless.sh
This should pass.
What did you see instead?
On running
GO_VERSION=1.22rc1 ./hack/verify-typecheck-providerless.sh
You should see:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8b1d95e]
goroutine 1105 [running]:
go/types.(*Checker).handleBailout(0xc004566e00, 0xc00457fbd0)
/Users/mjivrajani/gocode/src/github.com/MadhavJivrajani/kubernetes/_output/local/.gimme/versions/go1.22rc1.darwin.amd64/src/go/types/check.go:367 +0x88
panic({0x8c0b020?, 0x8da4520?})
/Users/mjivrajani/gocode/src/github.com/MadhavJivrajani/kubernetes/_output/local/.gimme/versions/go1.22rc1.darwin.amd64/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x8c48240, 0x8da7440})
/Users/mjivrajani/gocode/src/github.com/MadhavJivrajani/kubernetes/_output/local/.gimme/versions/go1.22rc1.darwin.amd64/src/go/types/sizes.go:228 +0x31e
...
PS - we get the same result on linux/amd64 as well: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/122410/pull-kubernetes-typecheck/1737348733923758080