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: "runtime: bad pointer in frame" in riscv64 with complier optimizations [1.17 backport] #51199

Closed
gopherbot opened this issue Feb 14, 2022 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@cherrymui requested issue #51101 to be considered for backport to the next 1.17 minor release.

@gopherbot please backport this to previous releases. This can cause runtime crashes.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Feb 14, 2022
@gopherbot gopherbot added this to the Go1.17.8 milestone Feb 14, 2022
@dmitshur
Copy link
Contributor

Per discussion in a release meeting, approving as a serious issue without a workaround. This backport applies to both 1.17 and 1.16.

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Feb 16, 2022
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/386474 mentions this issue: [release-branch.go1.17] cmd/compile: correct type of pointer difference on RISCV64

gopherbot pushed a commit that referenced this issue Feb 18, 2022
…ce on RISCV64

Pointer comparison is lowered to the following on RISCV64

(EqPtr x y) => (SEQZ (SUB <x.Type> x y))

The difference of two pointers (the SUB) should not be pointer
type. Otherwise it can cause the GC to find a bad pointer.

Updates #51101.
Fixes #51199.

Change-Id: I7e73c2155c36ff403c032981a9aa9cccbfdf0f64
Reviewed-on: https://go-review.googlesource.com/c/go/+/385655
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 1ed30ca)
Reviewed-on: https://go-review.googlesource.com/c/go/+/386474
@gopherbot
Copy link
Contributor Author

Closed by merging 7d8fa65 to release-branch.go1.17.

@golang golang locked and limited conversation to collaborators Feb 18, 2023
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