Page MenuHomePhabricator

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

Authored by Fabien on Dec 1 2020, 11:04.

Details

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

Event Timeline

Fabien requested review of this revision.Dec 1 2020, 11:04

Tail of the build log:

[360/418] bitcoin: testing torcontrol_tests
[361/418] bitcoin: testing sync_tests
[362/418] Running utility command for check-bitcoin-torcontrol_tests
[363/418] bitcoin: testing settings_tests
[364/418] Running utility command for check-bitcoin-sync_tests
[365/418] bitcoin: testing timedata_tests
[366/418] Running utility command for check-bitcoin-settings_tests
[367/418] bitcoin: testing streams_tests
[368/418] Running utility command for check-bitcoin-timedata_tests
[369/418] Running utility command for check-bitcoin-streams_tests
[370/418] bitcoin: testing undo_tests
[371/418] bitcoin: testing util_threadnames_tests
[372/418] Running utility command for check-bitcoin-undo_tests
[373/418] Running utility command for check-bitcoin-util_threadnames_tests
[374/418] bitcoin: testing validation_chainstatemanager_tests
[375/418] Running utility command for check-bitcoin-validation_chainstatemanager_tests
[376/418] bitcoin: testing compilerbug_tests
[377/418] bitcoin: testing checkpoints_tests
[378/418] Running utility command for check-bitcoin-compilerbug_tests
[379/418] bitcoin: testing txvalidationcache_tests
[380/418] Running utility command for check-bitcoin-checkpoints_tests
[381/418] Running utility command for check-bitcoin-txvalidationcache_tests
[382/418] bitcoin: testing validationinterface_tests
[383/418] Running utility command for check-bitcoin-validationinterface_tests
[384/418] bitcoin: testing cashaddr_tests
[385/418] bitcoin: testing radix_tests
[386/418] Running utility command for check-bitcoin-cashaddr_tests
[387/418] Running utility command for check-bitcoin-radix_tests
[388/418] bitcoin: testing getarg_tests
[389/418] Running utility command for check-bitcoin-getarg_tests
[390/418] bitcoin: testing crypto_tests
[391/418] Running utility command for check-bitcoin-crypto_tests
[392/418] bitcoin: testing ref_tests
[393/418] bitcoin: testing blockcheck_tests
[394/418] Running utility command for check-bitcoin-ref_tests
[395/418] Running utility command for check-bitcoin-blockcheck_tests
[396/418] bitcoin: testing script_tests
[397/418] bitcoin: testing monolith_opcodes_tests
[398/418] bitcoin: testing validation_tests
[399/418] Running utility command for check-bitcoin-script_tests
[400/418] Running utility command for check-bitcoin-monolith_opcodes_tests
[401/418] Running utility command for check-bitcoin-validation_tests
[402/418] bitcoin: testing cuckoocache_tests
[403/418] Running utility command for check-bitcoin-cuckoocache_tests
[404/418] bitcoin: testing skiplist_tests
[405/418] Running utility command for check-bitcoin-skiplist_tests
[406/418] bitcoin: testing coinselector_tests
[407/418] Running utility command for check-bitcoin-coinselector_tests
[408/418] bitcoin: testing util_tests
[409/418] Running utility command for check-bitcoin-util_tests
[410/418] bitcoin: testing op_reversebytes_tests
[411/418] Running utility command for check-bitcoin-op_reversebytes_tests
[412/418] bitcoin: testing transaction_tests
[413/418] Running utility command for check-bitcoin-transaction_tests
[414/418] bitcoin: testing coins_tests
[415/418] Running utility command for check-bitcoin-coins_tests
[416/418] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Unrelated avalanche test failure

This revision is now accepted and ready to land.Dec 1 2020, 14:34
This revision was landed with ongoing or failed builds.Dec 1 2020, 16:26
This revision was automatically updated to reflect the committed changes.