Closed anoopcs9 closed 2 months ago
Last time we ran make check
with go1.21 and it was successful. But go1.22 seems to be unhappy with the current golangci-lint version. Adding some reference issues:
From my understanding root cause might be https://github.com/golang/go/issues/31163. To be frank I don't know why this has become a problem with go1.22 🤷🏻♂️ .
Another similar panic with current gosec
version:
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=0x61034f]
goroutine 112 [running]: go/types.(Checker).handleBailout(0xc0011ee000, 0xc0011e9c60) /usr/lib/golang/src/go/types/check.go:367 +0x88 panic({0x777ac0?, 0xae6ed0?}) /usr/lib/golang/src/runtime/panic.go:770 +0x132 go/types.(StdSizes).Sizeof(0x0, {0x875570, 0xaeb720}) /usr/lib/golang/src/go/types/sizes.go:228 +0x30f go/types.(Config).sizeof(...) /usr/lib/golang/src/go/types/sizes.go:333 go/types.representableConst.func1({0x875570?, 0xaeb720?}) /usr/lib/golang/src/go/types/const.go:76 +0x9e go/types.representableConst({0x876988, 0xc00128aa18}, 0xc0011ee000, 0xaeb720, 0xc0011e93d0) /usr/lib/golang/src/go/types/const.go:92 +0x192 go/types.(Checker).representation(0xc0011ee000, 0xc000dc7100, 0xaeb720) /usr/lib/golang/src/go/types/const.go:256 +0x65 go/types.(Checker).implicitTypeAndValue(0xc0011ee000, 0xc000dc7100, {0x875570, 0xaeb720}) /usr/lib/golang/src/go/types/expr.go:375 +0x2d7 go/types.(Checker).assignment(0xc0011ee000, 0xc000dc7100, {0x875570, 0xaeb720}, {0x7dbf19, 0x14}) /usr/lib/golang/src/go/types/assignments.go:52 +0x2e5 go/types.(Checker).initConst(0xc0011ee000, 0xc000427260, 0xc000dc7100) /usr/lib/golang/src/go/types/assignments.go:126 +0x2c5 go/types.(Checker).constDecl(0xc0011ee000, 0xc000427260, {0x875a68, 0xc000f74460}, {0x875ac8, 0xc000f74480}, 0x0) /usr/lib/golang/src/go/types/decl.go:490 +0x311 go/types.(Checker).objDecl(0xc0011ee000, {0x87a418, 0xc000427260}, 0x0) /usr/lib/golang/src/go/types/decl.go:191 +0xa49 go/types.(Checker).packageObjects(0xc0011ee000) /usr/lib/golang/src/go/types/resolver.go:693 +0x4dd go/types.(Checker).checkFiles(0xc0011ee000, {0xc00101c640, 0x2, 0x2}) /usr/lib/golang/src/go/types/check.go:408 +0x1a5 go/types.(Checker).Files(...) /usr/lib/golang/src/go/types/check.go:372 golang.org/x/tools/go/packages.(loader).loadPackage(0xc00105c0e0, 0xc000399f00) /home/anoopcs/go/pkg/mod/golang.org/x/tools@v0.1.12/go/packages/packages.go:1001 +0x76f golang.org/x/tools/go/packages.(loader).loadRecursive.func1() /home/anoopcs/go/pkg/mod/golang.org/x/tools@v0.1.12/go/packages/packages.go:838 +0x1a9 sync.(Once).doSlow(0x0?, 0x0?) /usr/lib/golang/src/sync/once.go:74 +0xc2 sync.(Once).Do(...) /usr/lib/golang/src/sync/once.go:65 golang.org/x/tools/go/packages.(loader).loadRecursive(0x0?, 0x0?) /home/anoopcs/go/pkg/mod/golang.org/x/tools@v0.1.12/go/packages/packages.go:826 +0x4a golang.org/x/tools/go/packages.(loader).refine.func2(0x0?) /home/anoopcs/go/pkg/mod/golang.org/x/tools@v0.1.12/go/packages/packages.go:761 +0x26 created by golang.org/x/tools/go/packages.(*loader).refine in goroutine 51 /home/anoopcs/go/pkg/mod/golang.org/x/tools@v0.1.12/go/packages/packages.go:760 +0xc9a
https://github.com/samba-in-kubernetes/samba-operator/actions/runs/10490329713/job/29093282639