Page MenuHomePhabricator

Integrate util/system's CInit into RNGState
ClosedPublic

Authored by nakihito on Nov 5 2019, 22:58.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGING49ceff8b4b78: Integrate util/system's CInit into RNGState
rABC49ceff8b4b78: Integrate util/system's CInit into RNGState
Summary

This guarantees that OpenSSL is initialized properly whenever randomness
is used, even when that randomness is invoked from global constructors.

Note that this patch uses Mutex directly, rather than CCriticalSection.
This is because the lock-detection code is not necessarily initialized
during global constructors.

Partial backport of Core PR14955
https://github.com/bitcoin/bitcoin/pull/14955/commits/16e40a8b562ad849a5f5e8b21ceb375e46038243

Depends on D4393

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR14955-7
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8033
Build 14062: Bitcoin ABC Buildbot (legacy)
Build 14061: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 5 2019, 22:58
This revision is now accepted and ready to land.Nov 5 2019, 23:33