Most of the tests create blocks and involve the validation queue. When
the test fixture is destructed at the end of a test, the queue might not
be empty and attempt to access destructed content, leading to the
spurious segfault. This diff fixes the issue by force-waiting for the
queue to clear on fixture destruction.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC1ec2717d4433: Fix the processor_tests spurious segmentation fault
With both gcc and clang, but no debug:
ninja check for i in {1..1000}; do ./src/avalanche/test/test-avalanche -t processor_tests || exit 1; done
Before this patch: about 3% failure rate. After this patch, no issue
during the 1000x loop with both compilers.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- fix_processor_tests_segfault
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 16024 Build 31944: Build Diff build-debug · lint-circular-dependencies · build-without-wallet · build-diff · build-clang · build-clang-tidy Build 31943: arc lint + arc unit