Skip to content
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

go/types: stack overflow in Alignof #71143

Open
adonovan opened this issue Jan 6, 2025 · 2 comments
Open

go/types: stack overflow in Alignof #71143

adonovan opened this issue Jan 6, 2025 · 2 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@adonovan
Copy link
Member

adonovan commented Jan 6, 2025

#!stacks
"crash/crash" &&
 "go/types.(*gcSizes).Alignof:+29" &&
 "go/types.(*Named).resolve:+0"

Issue created by stacks.

Looks like Alignof was applied to a named struct type (illegally) containing itself as its first field.

This stack gYYnog was reported by telemetry:

golang.org/x/tools/[email protected] go1.23.3 windows/amd64 vscode (1)
@adonovan adonovan added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. gopls/telemetry-wins labels Jan 6, 2025
@adonovan
Copy link
Member Author

adonovan commented Jan 6, 2025

Hmm, the underlying type of the struct literal in type S struct { S } is invalid type, so the real question is how did the self-containing struct type get constructed?

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants