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

cmd/compile: internal compiler error: panic: runtime error: index out of range [0] with length 0 [1.18 backport] #51855

Closed
gopherbot opened this issue Mar 21, 2022 · 3 comments
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 21, 2022

@mdempsky requested issue #51765 to be considered for backport to the next 1.18 minor release.

@gopherbot please backport to Go 1.18; this is a compiler bug that could theoretically lead to silent miscompilation of valid user code

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Mar 21, 2022

Change https://go.dev/cl/394296 mentions this issue: [release-branch.go1.18] cmd/compile: replace Type.OrigSym with Type.OrigType

@toothrot toothrot added the CherryPickApproved label Mar 23, 2022
@toothrot
Copy link
Contributor

@toothrot toothrot commented Mar 23, 2022

Approved. This is a serious issue with no workaround.

@gopherbot gopherbot removed the CherryPickCandidate label Mar 23, 2022
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Apr 4, 2022

Closed by merging 78b8b4a to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue Apr 4, 2022
…rigType

First law of cmd/compile frontend development: thou shalt not rely on
types.Sym.

This CL replaces Type.OrigSym with Type.OrigType, which semantically
matches what all of the uses within the frontend actually care about,
and avoids using types.Sym, which invariably leads to mistakes because
symbol scoping in the frontend doesn't work how anyone intuitively
expects it to.

Fixes #51855.

Change-Id: I4affe6ee0718103ce5006ab68aa7e1bb0cac6881
Reviewed-on: https://go-review.googlesource.com/c/go/+/394274
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit adae6ec)
Reviewed-on: https://go-review.googlesource.com/c/go/+/394296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

2 participants