]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix off-by-one error in prove pass
authorKeith Randall <khr@golang.org>
Fri, 9 Aug 2024 17:59:43 +0000 (10:59 -0700)
committerKeith Randall <khr@golang.org>
Fri, 9 Aug 2024 20:14:40 +0000 (20:14 +0000)
commitf259e4c916bcde5221dca99ce7d77095a21b9801
tree25f8688bb736d89bcbae3160ac6a5bd6747f1a0b
parent1cf6e31f0d03bb3571cfe034f2d909591a0ae453
cmd/compile: fix off-by-one error in prove pass

I think I introduced #68809 when rewriting the prove pass, by
introducing an off-by-one error here:
https://go-review.googlesource.com/c/go/+/599096/5/src/cmd/compile/internal/ssa/prove.go
lines 872-874.
The min++ is already handled in one of the two following cases with
the (r&eq==0) condition. Move the min++ to just the other case.

Fixes #68809

Change-Id: Iffae99e29219c94aaf584cd7ae247289fa604a00
Reviewed-on: https://go-review.googlesource.com/c/go/+/604100
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssa/prove.go
test/fixedbugs/issue68809.go [new file with mode: 0644]