-
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: addNamedLocal panic: runtime error: invalid memory address or nil pointer dereference #58600
Comments
@golang/tools-team |
@lmxx1234567 it would help if you could post a complete reproducer. |
@thanm ok, I'll try to. It is a litte bit hard to find the code that caused the panic cuz I have built all backage. |
I don't see any problem there: in all cases, the Ident is non-blank and is guaranteed by its context to be a declaration, and the code is well-typed. If you are able to reproduce the problem easily, then please run again with the |
What would help for a reproducer is to also have:
+1 I don't see an obvious way |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create SSA program for a set of packages
What did you expect to see?
Packages loaded without panic.
What did you see instead?
Potentially problematic code
https://cs.opensource.google/go/x/tools/+/refs/tags/v0.6.0:go/ssa/func.go;l=399
f.info.Defs[id]
cloud be nil in some case. Should check ifDefs[id] == nil
at firstThe text was updated successfully, but these errors were encountered: