]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: recognize some OpRsh64Ux64 Values as non-negative
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 25 Apr 2018 20:17:17 +0000 (13:17 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 1 May 2018 19:38:09 +0000 (19:38 +0000)
commit548e1f89363fd3054a0bd8961c6c6b8b8ecbcfaf
treec87c64f93b7a80677642e4b751c0e56cd9cb7349
parent31cfa7f2f2ec40715376aebfdddb8183f5a260dc
cmd/compile: recognize some OpRsh64Ux64 Values as non-negative

Proves IsSliceInBounds one additional time building std+cmd,
at encoding/hex/hex.go:187:8.

The code is:

if numAvail := len(d.in) / 2; len(p) > numAvail {
p = p[:numAvail]
}

Previously we were unable to prove that numAvail >= 0.

Change-Id: Ie74e0aef809f9194c45e129ee3dae60bc3eae02f
Reviewed-on: https://go-review.googlesource.com/109415
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Giovanni Bajo <rasky@develer.com>
src/cmd/compile/internal/ssa/prove.go