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, types2: index out of range panic in Checker.arguments [1.21 backport] #61932

Closed
gopherbot opened this issue Aug 10, 2023 · 2 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases release-blocker
Milestone

Comments

@gopherbot
Copy link
Contributor

@findleyr requested issue #61931 to be considered for backport to the next 1.21 minor release.

@gopherbot please backport this to 1.21; it is a type checker and compiler panic.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 10, 2023
@gopherbot gopherbot added this to the Go1.21.1 milestone Aug 10, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/519417 mentions this issue: [release-branch.go1.21] go/types, types2: use correct parameter list when checking argument passing

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Aug 16, 2023
gopherbot pushed a commit that referenced this issue Aug 17, 2023
…when checking argument passing

The existing code was simply wrong: we cannot ever use the result
signature parameter list (rsig.params) if sigParams was adjusted
for variadic functions. If it was adjusted, we always must either
use sigParams or its separately instantiated version.

In the condition "n > 0 && adjusted", the "n > 0" should have
been in either of the respective "if statement" branches.

Simplified the code by merging with the result signature parameter
update.

Fixes #61932.

Change-Id: I5d39bc8bbc4dd85c7c985055d29532b4b176955e
Reviewed-on: https://go-review.googlesource.com/c/go/+/519456
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/519417
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
@gopherbot
Copy link
Contributor Author

Closed by merging d91843f to release-branch.go1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants