-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: out of range for go.shape.int64 #60601
Comments
Simpler reproducer:
This seems to be a bug in Unified IR:
IIUC, Unified IR does constant folding for
In https://go-review.googlesource.com/c/go/+/469595, typecheck.EvalConst is removed, so the expression is not constant evaluated by the compiler anymore. |
Since 1.21 seems ok, is this a backport issue at this point? |
I'm afraid not. Removing typecheck.EvalConst is the final CL in a chain, which the main purpose is simplifying the code base, but fixed this bug un-intentionally. Backport the CL is too risky. Users who face this issue can use |
I think we can probably just suppress the overflow errors in typecheck for 1.20. types2 will have already errored about any spec-required overflows. |
Change https://go.dev/cl/501735 mentions this issue: |
@gopherbot please backport this issue to go1.20, it's a compiler crash for legal user code. |
Backport issue(s) opened: #60675 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Requested freeze exception for this. cc @golang/release |
@cuonglm Thanks for letting us know, but I don't see what aspect of this needs a freeze exception and why. This seems to be a recently reported bug. Please see https://golang.org/s/release#freeze-exceptions (we've made clarifying edits there recently) and if you still think a freeze exception is needed, please file it as a new issue with a detailed rationale. Thanks. |
I don't think this needs a freeze exception for Go 1.21. It's only an issue with Go 1.20. We can commit a fix directly to release-branch.go1.20. I think adding the regress test case to master for 1.21 is fine though. |
I found a reproducer for 1.21, too:
|
Hey all, I'm doing a sweep of the Go 1.21 milestone compiler/runtime issues. Sounds like this is both a Go 1.21 and Go 1.20 issue. Do y'all still plan to work on it for Go 1.21? Thanks. |
Hey @mknyszek , yes, https://go.dev/cl/501735 will fix this. |
Short program - https://go.dev/play/p/moV9U70P1pd
I am not attaching any information about the environment because it is reproduced on play.golang.org.
Yes, code is not ok, but compiler asks for a report.
The text was updated successfully, but these errors were encountered: