HomePhabricator

Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if…

Description

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

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

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity

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

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Jul 25 2017, 07:30
deadalnixCommitted on Oct 9 2018, 19:09
deadalnixPushed on Oct 9 2018, 19:38
Reviewer
Restricted Project
Differential Revision
D1902: Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if available.
Parents
rSTAGING81324a9c0052: Remove unused fTry from push_lock
Branches
Unknown
Tags
Unknown