• Josh Bleecher Snyder's avatar
    runtime: fix amd64p32 indexbytes in presence of overflow · aa9c1a8f
    Josh Bleecher Snyder authored
    When the slice/string length is very large,
    probably artifically large as in CL 97523,
    adding BX (length) to R11 (pointer) overflows.
    As a result, checking DI < R11 yields the wrong result.
    Since they will be equal when the loop is done,
    just check DI != R11 instead.
    Yes, the pointer itself could overflow, but if that happens,
    something else has gone pretty wrong; not our concern here.
    
    Fixes #24187
    
    Change-Id: I2f60fc6ccae739345d01bc80528560726ad4f8c6
    Reviewed-on: https://go-review.googlesource.com/97802
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    aa9c1a8f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...