-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
cmd/compile/internal/importer: deadlock in recursion through type parameter #63285
Comments
@mdempsky in this case I think there is a bug in the unified reader (in the compiler only): specifically here: In this case, SetConstraint is called during the set-up of the parent named type, but (for better or worse) is documented that it should be called only after "the bound's underlying is fully defined". The go/types unified importer calls SetConstraint in a later: Can we do the same in the compiler? The obvious alternative is to make the bound calculation lazy, and that is liable to have a larger blast radius than pushing additional complexity into the importer. |
CC @griesemer as well. Tentatively marked this for 1.22, as I think this bug has existed for a long time; if the fix proves to be safe, perhaps we can back-port. |
This didn't make 1.23, unfortunately. Moving to 1.24. |
As mentioned in #60817 (comment)_:
Output:
Here is a Playground where you can reproduce the problem.
Originally posted by @jub0bs in #60817 (comment)
The text was updated successfully, but these errors were encountered: