-
Notifications
You must be signed in to change notification settings - Fork 18k
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: stack overflow with a recursive type #22904
Comments
Reproduced at tip, but also with
|
gccgo prints
|
I've binary search narrowed the cause of this regression to 295307a CL https://go-review.googlesource.com/#/c/38139/ /cc @philhofer and @dr2chase However, I can't directly see how that change causes the type breakage tests to fail. You can verify the analysis by visiting |
A possibility is that the plain call enables more aggressive escape analysis, which can make a stack (much?) larger than it was before. |
The crash is because isdirectiface is infinitely recursing on the broken types. A simple
check fixes it. This is another symptom of the general problem that we trudge forward into the backend even when we've found typechecking errors. (Edit: Filed #22909 to track this.) |
(I'm working on a CL now, since it's trivial to fix.) |
Change https://golang.org/cl/80301 mentions this issue: |
@odeke-em Thanks for bisecting. |
Cheers, and thank you for the identification and quick fix @mdempsky! |
What version of Go are you using (
go version
)?go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
go build
this programWhat did you expect to see?
Probably the
invalid recursive type
error messageWhat did you see instead?
cmd/compile
crashes with the following stack overflow.The text was updated successfully, but these errors were encountered: