Page MenuHomePhabricator

Prevent null pointer dereference in addWallet

Authored by jasonbcox on Nov 27 2019, 19:26.


Group Reviewers
Restricted Project

qt/test/apptests.cpp fails on Xenial, likely due to a race condition
as we do not see this behavior on Buster. This behavior appears to be fixed by
backporting PR15101 but has many dependencies (see T697). Until PR15101 is backported,
this will provide a quick bandaid so that developers working on Xenial machines can continue working.

The failure case for this is that payment server slots/signals are not correctly connected. Depending on how the race condition manifests in the wild, bitcoin-qt may fail for BIP70 payments. I expect this to be low user impact considering
the few users using the wallet software, and the fewer who use it for BIP70 payments.

Test Plan

ninja check

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 8312
Build 14643: Default Diff Build & Tests
Build 14642: arc lint + arc unit

Event Timeline

jasonbcox created this revision.Nov 27 2019, 19:26
jasonbcox edited the summary of this revision. (Show Details)Nov 27 2019, 20:03
deadalnix requested changes to this revision.Nov 27 2019, 23:15

If there is a race condition, then the proper solution is a lock or something lock free using atomics, not a null check that has no ordering constraint.

This revision now requires changes to proceed.Nov 27 2019, 23:15
jasonbcox abandoned this revision.Dec 3 2019, 00:24