-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashing with Go 1.22 #400
Comments
This was referenced Jan 30, 2024
I have the same issue. Has anyone looked at it yet? |
@Chris-Sheridan the proposed fix is in #401 |
Yep, the same issue here. After upgrade to the release Go version $ go run github.com/google/wire/cmd/wire@latest ./...
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=0x2 addr=0x0 pc=0x102eaa670]
goroutine 92 [running]:
go/types.(*Checker).handleBailout(0x140007a6000, 0x1400089dc78)
/Users/user/sdk/go1.22.0/src/go/types/check.go:367 +0x9c
panic({0x102ff98c0?, 0x103196580?})
/Users/user/sdk/go1.22.0/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/sizes.go:228 +0x320
go/types.(*Config).sizeof(...)
/Users/user/sdk/go1.22.0/src/go/types/sizes.go:333
go/types.representableConst.func1({0x103038e18?, 0x10319a880?})
/Users/user/sdk/go1.22.0/src/go/types/const.go:76 +0x9c
go/types.representableConst({0x10303a808, 0x10318ef40}, 0x140007a6000, 0x10319a880, 0x1400089c078)
/Users/user/sdk/go1.22.0/src/go/types/const.go:92 +0x138
go/types.(*Checker).representation(0x140007a6000, 0x14000890bc0, 0x10319a880)
/Users/user/sdk/go1.22.0/src/go/types/const.go:256 +0x68
go/types.(*Checker).implicitTypeAndValue(0x140007a6000, 0x14000890bc0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:375 +0x340
go/types.(*Checker).convertUntyped(0x140007a6000, 0x14000890bc0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/const.go:289 +0x30
go/types.(*Checker).matchTypes(0x140007a6000, 0x14000890b80, 0x14000890bc0)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:926 +0x7c
go/types.(*Checker).binary(0x140007a6000, 0x14000890b80, {0x103039aa0, 0x14000511680}, {0x103039b30, 0x1400050ace0}, {0x10303a070, 0x1400050ad00}, 0x28, 0x133)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:800 +0x114
go/types.(*Checker).exprInternal(0x140007a6000, 0x0, 0x14000890b80, {0x103039aa0, 0x14000511680}, {0x0, 0x0})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:1416 +0x1d4
go/types.(*Checker).rawExpr(0x140007a6000, 0x0, 0x14000890b80, {0x103039aa0?, 0x14000511680?}, {0x0?, 0x0?}, 0x0)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:979 +0x12c
go/types.(*Checker).expr(0x140007a6000, 0x1030391b0?, 0x14000890b80, {0x103039aa0?, 0x14000511680?})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:1513 +0x38
go/types.(*Checker).stmt(0x140007a6000, 0x0, {0x103039e90, 0x140004c7940})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:570 +0xdb0
go/types.(*Checker).stmtList(0x140007a6000, 0x0, {0x1400050ae60?, 0x0?, 0x0?})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:121 +0x88
go/types.(*Checker).funcBody(0x140007a6000, 0x103038e18?, {0x140004eb790?, 0x10319aa60?}, 0x140008908c0, 0x14000511710, {0x0?, 0x0?})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:41 +0x21c
go/types.(*Checker).funcDecl.func1()
/Users/user/sdk/go1.22.0/src/go/types/decl.go:852 +0x44
go/types.(*Checker).processDelayed(0x140007a6000, 0x0)
/Users/user/sdk/go1.22.0/src/go/types/check.go:467 +0x12c
go/types.(*Checker).checkFiles(0x140007a6000, {0x140000580b8, 0x1, 0x1})
/Users/user/sdk/go1.22.0/src/go/types/check.go:411 +0x188
go/types.(*Checker).Files(...)
/Users/user/sdk/go1.22.0/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0x140001501e0, 0x1400049dd40)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:819 +0x4f4
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:677 +0x178
sync.(*Once).doSlow(0x0?, 0x0?)
/Users/user/sdk/go1.22.0/src/sync/once.go:74 +0x100
sync.(*Once).Do(...)
/Users/user/sdk/go1.22.0/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:664 +0x50
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:671 +0x30
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 65
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:670 +0x84
exit status 2 |
1 task
YutaroHayakawa
added a commit
to cilium/cilium
that referenced
this issue
Jul 30, 2024
Upgrading golang to v1.22.5 breaks golang.org/x/tools/go/packages. Seemingly, we are hitting the similar issue as google/wire#400. To solve this, we need to update the golang.org/x/tools. Signed-off-by: Yutaro Hayakawa <[email protected]>
YutaroHayakawa
added a commit
to cilium/cilium
that referenced
this issue
Jul 30, 2024
Upgrading golang to v1.22.5 breaks golang.org/x/tools/go/packages. Seemingly, we are hitting the similar issue as google/wire#400. To solve this, we need to update the golang.org/x/tools. Signed-off-by: Yutaro Hayakawa <[email protected]>
YutaroHayakawa
added a commit
to cilium/cilium
that referenced
this issue
Aug 7, 2024
Upgrading golang to v1.22.5 breaks golang.org/x/tools/go/packages. Seemingly, we are hitting the similar issue as google/wire#400. To solve this, we need to update the golang.org/x/tools. Signed-off-by: Yutaro Hayakawa <[email protected]>
YutaroHayakawa
added a commit
to cilium/cilium
that referenced
this issue
Aug 7, 2024
Upgrading golang to v1.22.5 breaks golang.org/x/tools/go/packages. Seemingly, we are hitting the similar issue as google/wire#400. To solve this, we need to update the golang.org/x/tools. Signed-off-by: Yutaro Hayakawa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Does not work with Go 1.22 (both rc1 and rc2, final is scheduled to be released this February 2024).
Found the problem when trying to run wire in Grafana (see grafana/grafana#80514) but the problem is also reproducable in the Go tests in this rpository.
To Reproduce
go install golang.org/dl/go1.22rc2@latest && go1.22rc2 download
or from https://go.dev/dl/)go1.22rc2 test ./...
Expected behavior
Expected the tests to pass (or to fail the same way as with Go 1.21)
Version
Tests ran on current
HEAD
onmain
branch: 0675cdcgrafana/grafana#80514 uses latest release 0.5.0
Additional context
Noticed problems when testing
Raised the issue in Grafana:
The text was updated successfully, but these errors were encountered: