Page MenuHomePhabricator

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

Authored by deadalnix on Fri, Jul 5, 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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 6686
Build 11419: Bitcoin ABC Teamcity Staging
Build 11418: arc lint + arc unit

Event Timeline

deadalnix created this revision.Fri, Jul 5, 16:28
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Jul 5, 16:28

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

Fabien requested changes to this revision.Fri, Jul 5, 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.Fri, Jul 5, 17:24
deadalnix planned changes to this revision.Sat, Jul 6, 15:04

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