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.16 backport] #51198

Closed
gopherbot opened this issue Feb 14, 2022 · 2 comments
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 14, 2022

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

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

@gopherbot gopherbot added the CherryPickCandidate label Feb 14, 2022
@gopherbot gopherbot added this to the Go1.16.15 milestone Feb 14, 2022
@dmitshur dmitshur added CherryPickApproved and removed CherryPickCandidate labels Feb 16, 2022
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Feb 17, 2022

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

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Feb 18, 2022

Closed by merging a222963 to release-branch.go1.16.

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 #51198.

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/+/386475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

2 participants