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).
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-
domob1812 commented at 12:39 PM on July 22, 2019: contributor
-
29ee4c417d
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).
-
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_mainwas not locked even though it should have been, butAssertLockHelddid not catch this. After 682a1d0f2004d808b87b3106d0dfae547005e638, a different (but also wrong) behaviour showed instead: NowAssertLockHeldtriggered, even thoughcs_mainwas locked correctly. Both of those bugs were caused because-DDEBUG_LOCKORDERwas 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 ifReadBlockFromDiskwere changed toAssertLockHeld(cs_main), then the same bug would actively occur in the vanilla codebase as well. - fanquake added the label Build system on Jul 22, 2019
- fanquake added the label RPC/REST/ZMQ on Jul 22, 2019
- fanquake requested review from theuni on Jul 28, 2019
- fanquake renamed this:
Specify AM_CPPFLAGS for ZMQ
build: Specify AM_CPPFLAGS for ZMQ
on Jul 28, 2019 -
laanwj commented at 10:11 AM on July 30, 2019: member
utACK 29ee4c417d97dca29c4ef53b6c1a55caa902787a
- pull[bot] referenced this in commit bd35ec36f5 on Jul 30, 2019
- laanwj merged this on Jul 30, 2019
- laanwj closed this on Jul 30, 2019
- domob1812 deleted the branch on Jul 30, 2019
- Munkybooty referenced this in commit e47f8d0f6a on Nov 17, 2021
- Munkybooty referenced this in commit 3023671f90 on Nov 18, 2021
- Munkybooty referenced this in commit fa6dd3a579 on Nov 24, 2021
- Munkybooty referenced this in commit f5776ddacd on Nov 30, 2021
- Munkybooty referenced this in commit 0a3308d2c2 on Dec 15, 2021
- MarcoFalke locked this on Dec 16, 2021