HomePhabricator

rpc: Avoid initialization-order-fiasco on static CRPCCommand tables

Description

rpc: Avoid initialization-order-fiasco on static CRPCCommand tables

Summary:

Currently the fiasco is only theoretical because all content of the
table are compile-time constants. However, the fiasco materializes
should they ever become run-time constants (e.g. #18531).

Backport of core PR18532.

Depends on D8553.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Apr 5 2020, 16:21
FabienCommitted on Dec 1 2020, 16:24
FabienPushed on Dec 1 2020, 16:26
Reviewer
Restricted Project
Differential Revision
D8567: rpc: Avoid initialization-order-fiasco on static CRPCCommand tables
Parents
rABC41441cb8ee36: util: Add Assert identity function
Branches
Unknown
Tags
Unknown