Page MenuHomePhabricator

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

Authored by deadalnix on Jul 5 2019, 16:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

This is a backport of Core PR12477 . The bench part is irrelevent now that the code is using OutputGroup.

Test Plan

Run

src/test/test_bitcoin -t checkqueue_tests

With both tsan and asan. Verify it is now clean.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
useafterfree
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6686
Build 11419: Bitcoin ABC Buildbot (legacy)
Build 11418: arc lint + arc unit

Event Timeline

Interesting, subtle use-after-scope there...

Fabien requested changes to this revision.Jul 5 2019, 17:24
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/test_bitcoin.cpp
41

This part will conflict with https://reviews.bitcoinabc.org/D2918 and https://reviews.bitcoinabc.org/D2919 and cause double free (see build failure).

This revision now requires changes to proceed.Jul 5 2019, 17:24

Fixing the DoS test require to get the banman PR backported. looks like this will have to wait.