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
- Branch
- stakingrewards_fix_asan
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 25060 Build 49708: Build Diff lint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang Build 49707: arc lint + arc unit