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

x/tools/gopls/internal/analysis/modernize: nil deref in minmax #72928

Closed
adonovan opened this issue Mar 18, 2025 · 1 comment
Closed

x/tools/gopls/internal/analysis/modernize: nil deref in minmax #72928

adonovan opened this issue Mar 18, 2025 · 1 comment
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

This input _ = f() causes minmax to panic because TypeOf(_) is nil. (There's another edge-case to document in the big checklist.)

We need to make it easier to do routine large-scale testing of analyzers.

@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Mar 18, 2025
@adonovan adonovan added this to the gopls/v0.18.2 milestone Mar 18, 2025
@seankhliao seankhliao changed the title gopls/internal/analysis/modernize: nil deref in minmax x/tools/gopls/internal/analysis/modernize: nil deref in minmax Mar 18, 2025
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 18, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Mar 18, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/662195 mentions this issue: internal/typeparams/copretype: check nil before getting coretype

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 Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants