-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
x/tools/go/ssa: emitConv panic on generics #57272
Comments
Here is what seem to be the relevant bits:
I don't think this seems to be about supporting arrays conversions or multiple distinct kinds of conversions. So I don't think this is a duplicate of #56849. |
The issue could be in
Likely, deref is not picking the type under the pointer. |
Change https://go.dev/cl/458235 mentions this issue: |
Change https://go.dev/cl/458255 mentions this issue: |
Resolves some panics in ssa. Updates golang/go#57272 Change-Id: Icf2bb1d2e0c54f9cf8443e339dd0935019e887e6 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/458255 Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Change https://go.dev/cl/477635 mentions this issue: |
Resolves some panics in ssa. Updates golang/go#57272 Change-Id: Icf2bb1d2e0c54f9cf8443e339dd0935019e887e6 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/458255 Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Resolves some panics in ssa. Updates golang/go#57272 Change-Id: Icf2bb1d2e0c54f9cf8443e339dd0935019e887e6 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/458255 Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Change https://go.dev/cl/492598 mentions this issue: |
The type of an address is now the element type of a type whose core type is a pointer type. Previously this was the element type of a type whose underlying type was a pointer type. emitStore now uses the core type as well. func f[M any, P *M](p P) { var m M *p = m } is emitted as: func f[M any, P *M](p P): 0: *p = *new(M):M return Related to golang/go#57272 Fixes golang/go#58633 Change-Id: I35d4345a9b3f69bcd28cf8342f7fec550329eba4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/492598 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tim King <taking@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Resolves some panics in ssa. Updates golang/go#57272 Change-Id: Icf2bb1d2e0c54f9cf8443e339dd0935019e887e6 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/458255 Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, also reproduced with
go version go1.20-pre3
.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run ssa on https://github.com/minio/minio. Reproducible by running govulncheck, which uses ssa:
govulncheck ./...
Also reproducible if govulncheck uses (the latest)
v0.4.1-0.20221212161611-18f76ecd3f38
version of tools.What did you expect to see?
No panic.
What did you see instead?
It looks like this is the function causing the panic. Perhaps a duplicate of #56849?
Thanks to @harshavardhana for reporting this.
cc @timothy-king
The text was updated successfully, but these errors were encountered: