-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/vuln/cmd/govulncheck: stack overflow #51560
Comments
Does gopls/v0.6.0 perhaps use generics? |
Based on https://github.com/golang/tools/blob/gopls/v0.6.0/go.mod But it's possible some dependencies brought in generics code (note: I used |
Ok, will look into this next week. This is definitely unexpected, but likely has a simple fix. Let me know if this is should be a priority. |
Tried to reproduce this today. I got a different error.
My best guess is this has something to do with the way generics and ssa interplay. |
Note: the new version of govulncheck is now in x/vuln/cmd/govulncheck. The previous version is not supported anymore and has been deleted. |
I gotiped the latest version of Go and used the latest version of x/tools
I can see the error, but it is yet a different one
@taking, should we wait for upcoming ssa-generics changes before looking deeper? (Note, the above call stack is suggesting that T is a type parameter that appears as a Field of a named struct.) |
I'm @timothy-king on github. Apologies to @taking. I would wait. The panic is now blocked on #48525. |
Oops, my apologies too. |
#48525 should now be far enough along to retest this. |
Change https://go.dev/cl/399674 mentions this issue: |
Helper type logic did not handle properly pathological recursive types such as type B *B. This CL addresses that. For golang/go#51560 Change-Id: Ibb69ac68d77fc3956b98c701f17d28b9f30ac22c Reviewed-on: https://go-review.googlesource.com/c/tools/+/399674 Reviewed-by: Tim King <[email protected]> Run-TryBot: Zvonimir Pavlinovic <[email protected]> Auto-Submit: Zvonimir Pavlinovic <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
I believe this has been addressed. Closing. |
What version of Go are you using (
go version
)?The problem exists with the
govulncheck
built with upgraded dependency forgolang.org/x/tools
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am not yet sure what exactly triggers this recursion in
go/callgraph/vta
.My repro case is a pathological case - running
govulncheck
withall
can be unusual.Anyhow, I think it's not a bad idea to limit the recursion.
What did you expect to see?
Succeed, or fail with user-friendly message.
What did you see instead?
cc @zpavlinovic
The text was updated successfully, but these errors were encountered: