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

gopherbot opened this issue Mar 21, 2022 · 3 comments


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

Copy link

@gopherbot gopherbot commented Mar 21, 2022

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

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

@toothrot toothrot commented Mar 23, 2022

Approved. This is a serious issue with no workaround.

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

@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

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

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
Trust: Matthew Dempsky <>
Run-TryBot: Matthew Dempsky <>
Reviewed-by: Cuong Manh Le <>
TryBot-Result: Gopher Robot <>
Reviewed-by: Keith Randall <>
(cherry picked from commit adae6ec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants