HomePhabricator

[avalanche] Early bail when no matchign slot exists

Description

[avalanche] Early bail when no matchign slot exists

Summary: In cases where the end is at the end of the array, this ensure we don't access out of bounds. In practice, this isn't a huge deal because the value read is not used and, unless it happens to precisely match a page boundary, it can't fail. Still worth fixing.

Test Plan:

Repeatedly ran `ninja check-avalanche` under asan.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6786

Details

Provenance
deadalnixAuthored on Jun 30 2020, 14:24
deadalnixPushed on Jun 30 2020, 14:30
Reviewer
Restricted Project
Differential Revision
D6786: [avalanche] Early bail when no matchign slot exists
Parents
rABC31839eeb4bbc: [avalanche] Track slots as start+score rather than start/stop
Branches
Unknown
Tags
Unknown