-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
go/reflect: Incorrect behavior on arm64 when using MakeFunc / Call #52788
Comments
Change https://go.dev/cl/405114 mentions this issue: |
Change https://go.dev/cl/405115 mentions this issue: |
Following CL 405114, the extension rule is also wrong. It is safe to drop the extension if the value is from a boolean-generating instruction, but not a boolean-typed Value in general (e.g. a Phi or a in-register parameter). Fix it. Updates #52788. Change-Id: Icf3028fe8e90806f9f57fbe2b38d47da27a97e2a Reviewed-on: https://go-review.googlesource.com/c/go/+/405115 Reviewed-by: David Chase <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Change https://go.dev/cl/405116 mentions this issue: |
Following CL 405114, for PPC64. Should fix PPC64 builds. Updates #52788. Change-Id: I193ac31cfba18b4f907dd2523b51368251fd6fad Reviewed-on: https://go-review.googlesource.com/c/go/+/405116 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Cherry Mui <[email protected]> Reviewed-by: David Chase <[email protected]>
Change https://go.dev/cl/405553 mentions this issue: |
Following CL 405114, for RISCV64. May fix RISCV64 builds. Updates #52788. Change-Id: Ifc34658703d1e8b97665e7b862060152e3005d71 Reviewed-on: https://go-review.googlesource.com/c/go/+/405553 Reviewed-by: David Chase <[email protected]> Run-TryBot: Cherry Mui <[email protected]>
@gopherbot please open backport issues for previous releases. This is a miscompilation that could cause valid programs to behave incorrectly. Thanks. |
Backport issue(s) opened: #53396 (for 1.17), #53397 (for 1.18). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
It seems that |
No. In general the compiler and the ABI only guarantee that the low bits of a Value is meaningful. |
Change https://go.dev/cl/421457 mentions this issue: |
Change https://go.dev/cl/421459 mentions this issue: |
Change https://go.dev/cl/421460 mentions this issue: |
Change https://go.dev/cl/421458 mentions this issue: |
On ARM64, an If block is lowered to (NZ cond yes no). This is incorrect because cond is a boolean value and therefore only the last byte is meaningful (same as AMD64, see ARM64Ops.go). But here we are comparing a full register width with 0. Correct it by comparing only the last bit. For #52788. Fixes #53397. Change-Id: I2cacf9f3d2f45e149c361a290f511b2d4ed845c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/405114 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: David Chase <[email protected]> Run-TryBot: Cherry Mui <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/421457 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]>
Following CL 421457, the extension rule is also wrong. It is safe to drop the extension if the value is from a boolean-generating instruction, but not a boolean-typed Value in general (e.g. a Phi or a in-register parameter). Fix it. Updates #52788. Updates #53397. Change-Id: Icf3028fe8e90806f9f57fbe2b38d47da27a97e2a Reviewed-on: https://go-review.googlesource.com/c/go/+/405115 Reviewed-by: David Chase <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/421458 Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Following CL 421457, for PPC64. Should fix PPC64 builds. Updates #52788. Updates #53397. Change-Id: I193ac31cfba18b4f907dd2523b51368251fd6fad Reviewed-on: https://go-review.googlesource.com/c/go/+/405116 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Cherry Mui <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/421459 Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Following CL 421457, for RISCV64. May fix RISCV64 builds. Updates #52788. Updates #53397. Change-Id: Ifc34658703d1e8b97665e7b862060152e3005d71 Reviewed-on: https://go-review.googlesource.com/c/go/+/405553 Reviewed-by: David Chase <[email protected]> Run-TryBot: Cherry Mui <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/go/+/421460 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (using gotip)
What operating system and processor architecture are you using (
go env
)?QEMU AARCH64 emulation (this bug does not reproduce on x86)
What did you do?
With main.go
What did you expect to see?
Empty output
What did you see instead?
The text was updated successfully, but these errors were encountered: