-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: miscompilation (missing BSWAPL) in go1.8 #19201
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
Comments
Go1.8 regression, it's not in go1.7.5. Git bisect says: introduced in 10f7574. |
Stepping through instructions in gdb shows that bswap + store are executed twice. bswap(bswap(x)) == x, so this case fails. First execution of bswap is on normal path and the second is after runtime.selectgo sets pc to the basic block containing bswap. I suspect fuse pass, which puts shits/ors into the same block as newselect/selectrecv |
CL https://golang.org/cl/37376 mentions this issue. |
Created https://go-review.googlesource.com/c/38587 for the change to the release branch. @TocarIP, would you mind paring down the one for master (https://go-review.googlesource.com/c/37376) to just the test? |
CL https://golang.org/cl/38587 mentions this issue. |
…s after select Scheduling values after calls to selectrecv, will cause them to be executed multiple times, due to runtime.selectgo jumping to the next instruction in the selectrecv basic block. Prevent this by scheduling calls to selectrecv as late as possible Fixes #19201 Change-Id: I6415792e2c465dc6d9bd6583ba1e54b107bcf5cc Reviewed-on: https://go-review.googlesource.com/38587 Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Keith Randall <[email protected]>
What version of Go are you using (
go version
)?go version go1.8 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/O9a63D2aU4:
What did you expect to see?
Nothing.
What did you see instead?
wrong msg main.msg{code:0x1000061}, want code 0x61000001
The text was updated successfully, but these errors were encountered: