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
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@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 gopherbot added the CherryPickCandidate Used during the release process for point releases label Apr 14, 2020
@gopherbot gopherbot added this to the Go1.13.11 milestone Apr 14, 2020
@gopherbot
Copy link
Author

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

@andybons andybons added the CherryPickApproved Used during the release process for point releases label Apr 28, 2020
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Apr 28, 2020
@gopherbot
Copy link
Author

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

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
@golang golang locked and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants