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: unexpected nil dereference on s390x [1.13 backport] #38442

Closed
gopherbot opened this issue Apr 14, 2020 · 2 comments
Closed

cmd/compile: unexpected nil dereference on s390x [1.13 backport] #38442

gopherbot opened this issue Apr 14, 2020 · 2 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 14, 2020

@mundaym requested issue #38195 to be considered for backport to the next 1.13 minor release.

@gopherbot please consider this for a backport

This is a bug in the register allocator that results in the compiled program behaving incorrectly. There is currently no workaround and it results in very hard to debug issues. It has only been seen to cause problems on s390x but theoretically it affects all platforms.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Apr 27, 2020

Change https://golang.org/cl/230358 mentions this issue: [release-branch.go1.13] cmd/compile: fix deallocation of live value copies in regalloc

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Apr 28, 2020

Closed by merging 6b974e2 to release-branch.go1.13.

@gopherbot gopherbot closed this Apr 28, 2020
gopherbot pushed a commit that referenced this issue Apr 28, 2020
…opies in regalloc

When deallocating the input register to a phi so that the phi
itself could be allocated to that register the code was also
deallocating all copies of that phi input value. Those copies
of the value could still be live and if they were the register
allocator could reuse them incorrectly to hold speculative
copies of other phi inputs. This causes strange bugs.

No test because this is a very obscure scenario that is hard
to replicate but CL 228060 adds an assertion to the compiler
that does trigger when running the std tests on linux/s390x
without this CL applied. Hopefully that assertion will prevent
future regressions.

Fixes #38442.

Change-Id: Id975dadedd731c7bb21933b9ea6b17daaa5c9e1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/228061
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 382fe3e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/230358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.