validation: Check absence of locks at compile-time (LOCKS_EXCLUDED) in addition to the current run-time checking (AssertLockNotHeld) #15721

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:negative-locking-annotations changing 1 files +2 −2
  1. practicalswift commented at 2:33 PM on April 2, 2019: contributor

    Check absence of locks at compile-time (using LOCKS_EXCLUDED annotation) in addition to the current run-time checking (using AssertLockNotHeld(…)).

    In line with the developer notes:

    Generally; compile-time checking is preferred over run-time checking.

    For people who are not compiling with clang -Werror=thread-safety-analysis -- this is the type of checking these annotations enable:

    […]: error: cannot call function 'LimitValidationInterfaceQueue' while mutex 'cs_main' is
         held [-Werror,-Wthread-safety-analysis]
                LimitValidationInterfaceQueue();
                ^
    
  2. validation: Check absence of locks at compile-time (LOCKS_EXCLUDED) in addition to the current run-time checking (AssertLockNotHeld) c348a5fef3
  3. fanquake added the label Validation on Apr 2, 2019
  4. DrahtBot commented at 5:04 PM on April 2, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15921 (Tidy up ValidationState interface by jnewbery)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. practicalswift commented at 7:41 PM on April 4, 2019: contributor

    FWIW: I've verified that a disassembly of the bitcoind binary built on a Ubuntu 18.04 machine with this patch applied is identical to a disassembly of the bitcoind binary built against master (as expected).

  6. practicalswift commented at 4:36 PM on May 7, 2019: contributor

    Oh, forgot that I submitted this PR back in April. Replaced by #15967 submitted earlier today which covers a few more functions. See also #15967.

  7. practicalswift closed this on May 7, 2019

  8. practicalswift deleted the branch on Apr 10, 2021
  9. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me