Page MenuHomePhabricator

Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if available.
ClosedPublic

Authored by deadalnix on Oct 9 2018, 12:27.

Details

Summary
  • Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror)
  • Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost.

Commit 1.

This code was written by @TheBlueMatt in the following branch:

This commit message was written by me (@practicalswift) who also squashed
@TheBlueMatt's commits into one and tried to summarize the changes made.

Commit 2.

Remove boost include. Remove boost mentions in comments.

  • Add mutex requirement for AddToCompactExtraTransactions(…)

The vector vExtraTxnForCompact, which is guarded by the mutex
cs_main, is accessed in AddToCompactExtraTransactions(…).

This is a backport of Core PR10866

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
threadsafety
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3548
Build 5172: Bitcoin ABC Buildbot (legacy)
Build 5171: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 9 2018, 17:37