HomePhabricator

[avalanche] Fix a use after free bug in the peer manager unit tests

Description

[avalanche] Fix a use after free bug in the peer manager unit tests

Summary: D14825 introduced a new facility to clear the peer set in the tests, however the loop doesn't account for the rehash occuring by the erasal.

Test Plan:
With ASAN:

ninja check-avalanche-peermanager_tests

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Nov 21 2023, 15:33
FabienPushed on Nov 21 2023, 19:19
Reviewer
Restricted Project
Differential Revision
D14830: [avalanche] Fix a use after free bug in the peer manager unit tests
Parents
rABC2cdd79b987c7: refactor: use Span in random.*
Branches
Unknown
Tags
Unknown