HomePhabricator

test: Plug memory leaks and stack-use-after-scope

Description

test: Plug memory leaks and stack-use-after-scope

Summary:
Backport of core PR12477
https://github.com/bitcoin/bitcoin/pull/12477/files

The modifications in checkqueue_tests.cpp are already part of our
codebase.

The modifications of test_bitcoin are only required to clear memory
from avalanche_tests and DoS_tests. Avalanche tests use
std::_unique_ptr, making this fix useless, and so does DoS tests
since D2919.

Depends on D2919

Test Plan:

./src/bench/bitcoin-bench

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, deadalnix, jasonbcox

Subscribers: jasonbcox

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

Details

Provenance
FabienAuthored on May 3 2019, 20:15
deadalnixPushed on May 6 2019, 12:16
Reviewer
Restricted Project
Differential Revision
D2918: test: Plug memory leaks and stack-use-after-scope
Parents
rSTAGING4859174c016e: Fix a memory leak in DoS_tests
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/8435, tag: phabricator/base/8433, tag: phabricator/base/8414, tag: phabricator/base/8413