HomePhabricator

fix ASAN error relating to nSigChecksBlockLimiter

Description

fix ASAN error relating to nSigChecksBlockLimiter

Summary:
See sanitizer log here, we have a use after scope:
https://build.bitcoinabc.org/viewLog.html?buildId=29430&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterAsan&tab=artifacts

The order of destructor cleanup is reverse of declaration order.
Thus we need nSigChecksBlockLimiter to be declared before control which is the RAII on all script check worker threads having finished their work.

(D5179)

Test Plan: ninja check-all ; run ASAN tests

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Feb 15 2020, 10:02
markblundebergPushed on Feb 15 2020, 10:27
Reviewer
Restricted Project
Differential Revision
D5297: fix ASAN error relating to nSigChecksBlockLimiter
Parents
rABC276a95b8710e: [consensus rule] limit sigchecks in a block after phonon upgrade
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rABC866d72d0f658: fix ASAN error relating to nSigChecksBlockLimiter (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Feb 15 2020, 10:27