-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 with range over integer value #67141
Comments
stacktrace:
|
I cannot reproduce this, neither at go1.22.3 nor at tip (haven't tried go1.22.2). In both cases, the build terminates. I'm going to close this for now as not reproducible, but feel free to reopen if you still see the problem with up-to-date compilers. If you see the problem, it would be helpful if you could reduced the source to a (ideally small) snippet of code. |
I'm still seeing it here with 1.22.3 as well as with gotip at
And yes, I couldn't come up with a small repo case in the playground, so unfortunately it's this big blob of code. The stacktrace I get with gotip is similar to the one that @seankhliao posted; the one I got is copied below. Let me know if I can help with further digging here...
|
(I'm unable to reopen the bug myself, it seems.) |
Reopened for further investigation. |
I've made some progress that may give some useful clues while working to boil this down to a smaller repro case. Once I got it down to a single file, I got the helpful error message:
and indeed, the
If I modify This seems to track with the panic coming from:
which is |
Scratch that about multi-files. Attached is a single-file, 27 line repro case. Note that Now, you might notice an |
@mmp Excellent! Thanks for narrowing this down. Simplified repro: package p
import "C"
func _() {
for range 10 {
}
} I can reproduce this. Fix forthcoming later today. |
Change https://go.dev/cl/586238 mentions this issue: |
@gopherbot please consider this for backport to 1.22 and 1.21. |
Backport issue(s) opened: Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Go version
go version go1.22.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
% go build .
Repo: bork.zip
I have determined that changing line 412 of
fonts.go
from:to
makes the compiler stop crashing.
What did you see happen?
What did you expect to see?
Successful compilation of my program.
The text was updated successfully, but these errors were encountered: