build: Specify AM_CPPFLAGS for ZMQ #16434

pull domob1812 wants to merge 1 commits into bitcoin:master from domob1812:zmq-cppflags changing 1 files +1 −1
  1. domob1812 commented at 12:39 PM on July 22, 2019: contributor

    When building the ZMQ static library, add AM_CPPFLAGS to the library CPPFLAGS. Otherwise, we may miss important flags that are specified elsewhere. For instance, if --enable-debug is passed and -DDEBUG_LOCKORDER set, then that would not apply to the ZMQ library before (causing potential for hard-to-find bugs).

  2. Specify AM_CPPFLAGS for ZMQ.
    When building the ZMQ static library, add AM_CPPFLAGS to the library
    CPPFLAGS.  Otherwise, we may miss important flags that are specified
    elsewhere.  For instance, if --enable-debug is passed and
    -DDEBUG_LOCKORDER set, then that would not apply to the ZMQ library
    before (causing potential for hard-to-find bugs).
    29ee4c417d
  3. domob1812 commented at 12:39 PM on July 22, 2019: contributor

    While this seems to currently not cause any issues, it could do so in the future. For instance, I'm working on some patches applied on top of Bitcoin Core. That code previously had a bug where cs_main was not locked even though it should have been, but AssertLockHeld did not catch this. After 682a1d0f2004d808b87b3106d0dfae547005e638, a different (but also wrong) behaviour showed instead: Now AssertLockHeld triggered, even though cs_main was locked correctly. Both of those bugs were caused because -DDEBUG_LOCKORDER was applied inconsistently between the ZMQ code and other parts of the code.

    Note that even the unmodified ZMQ code does lock cs_main. So presumably if ReadBlockFromDisk were changed to AssertLockHeld(cs_main), then the same bug would actively occur in the vanilla codebase as well.

  4. fanquake added the label Build system on Jul 22, 2019
  5. fanquake added the label RPC/REST/ZMQ on Jul 22, 2019
  6. fanquake requested review from theuni on Jul 28, 2019
  7. fanquake renamed this:
    Specify AM_CPPFLAGS for ZMQ
    build: Specify AM_CPPFLAGS for ZMQ
    on Jul 28, 2019
  8. laanwj commented at 10:11 AM on July 30, 2019: member

    utACK 29ee4c417d97dca29c4ef53b6c1a55caa902787a

  9. pull[bot] referenced this in commit bd35ec36f5 on Jul 30, 2019
  10. laanwj merged this on Jul 30, 2019
  11. laanwj closed this on Jul 30, 2019

  12. domob1812 deleted the branch on Jul 30, 2019
  13. Munkybooty referenced this in commit e47f8d0f6a on Nov 17, 2021
  14. Munkybooty referenced this in commit 3023671f90 on Nov 18, 2021
  15. Munkybooty referenced this in commit fa6dd3a579 on Nov 24, 2021
  16. Munkybooty referenced this in commit f5776ddacd on Nov 30, 2021
  17. Munkybooty referenced this in commit 0a3308d2c2 on Dec 15, 2021
  18. MarcoFalke locked this on Dec 16, 2021
Contributors


theuni


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-13 15:14 UTC

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