-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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 compile error when using sync.Pool: mismatched zero/store sizes #39459
Comments
I can reproduce this with Go 1.12, 1.13, and 1.14, but it is fixed on tip. |
Do you really need an array of elements of zero size? Given that this is fixed on tip, I'm trying to judge how important it is to backport a fix to 1.14. |
For me personally, I'm able to work around the problem by replacing |
According to bisection, this was fixed by 396833c |
Thanks for the bisection. |
The underlying bug is just a mistaken invariant check. For the opcode I'll see if I can make a repro that works at tip. The fix is just to remove the invariant check. It isn't generating any wrong code that I can see. Might be worth auditing all our rules to make sure we're not depending on the types of |
Change https://golang.org/cl/239817 mentions this issue: |
@gopherbot please open backport issues for 1.14 and 1.13. This issue can cause the compiler to crash. The compiler was checking an invariant that doesn't, and does not need to, hold. |
Backport issue(s) opened: #39848 (for 1.13), #39849 (for 1.14). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, go1.14.4 is the latest release (released about a week ago). I've also reproduced this using go1.14.1.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I attempted to compile the following program, which is a minimum working example that exhibits the problem:
https://play.golang.org/p/C5P2Zh6X_i-
What did you expect to see?
The program to compile successfully.
What did you see instead?
The following is emitted from the go toolchain:
The text was updated successfully, but these errors were encountered: