The issue has been introduced in D14484. The blockhash for the blockindex is built and set from a loop local variable but not reset to some larger scope pointer after the loop exists, causing the fault on the subsequent use of the block hash. It doesn't impact the behavior of the test though, because at this point it checks there is no winner, so any blockhash value will work the same including garbage from freed memory.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC464f0e25cd02: [avalanche] Fix a use after out-of-scope in peermanager tests
With ASAN:
ninja check-avalanche-peermanager_tests
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable