From: Pieter Wuille <pieter.wuille@gmail.com>
To: Wladimir <laanwj@gmail.com>
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<<<NOT
Date: Fri, 6 Jun 2014 10:40:20 +0200 [thread overview]
Message-ID: <CAPg+sBjz8_5SwiL2xyby+TqMTpB8psDhG7O1e0KbWFfqppeYng@mail.gmail.com> (raw)
In-Reply-To: <CA+s+GJDZ-F0obYRTkbt=MHMo60jH0jYo-3On_56rHtyguEU4pg@mail.gmail.com>
On Fri, Jun 6, 2014 at 10:29 AM, Wladimir <laanwj@gmail.com> wrote:
> On Wed, Jun 4, 2014 at 12:42 PM, Jannis Froese
> <s9jafroe@stud.uni-saarland.de> wrote:
>
>> I think most concerns about the current use of asserts would be resolved
>> if the currently used asserts would be changed to a nicer definition which
>> is independent of NDEBUG, and a second class of debugging asserts would be
>> introduced, which is exclusively for expensive, redundant checks and is
>> disabled by NDEBUG.
There are a few examples of things that would classify as
expensive/redundant checks:
* addrman consistency checks (only enabled with -DDEBUG_ADDRMAN).
* mempool consistency checks (only enabled with -checkmempool).
* deadlock detection (only enabled with -DDEBUG_LOCKORDER).
I'm not sure all of these make sense to put under a single runtime
flag. For example, addrman consistency is unlikely to be affected
unless you're working on addrman code, and is pretty expensive.
Still, I do like the idea of optional consistency checks, that help
guarantee the software always has a consistency state.
--
Pieter
next prev parent reply other threads:[~2014-06-06 8:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 19:07 [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<<<NOT Ron
2014-06-04 9:51 ` Mike Hearn
2014-06-04 10:12 ` Wladimir
2014-06-04 10:15 ` Gregory Maxwell
2014-06-04 10:20 ` Mike Hearn
2014-06-04 10:31 ` Gregory Maxwell
2014-06-04 12:15 ` Jeff Garzik
2014-06-04 10:42 ` Jannis Froese
2014-06-04 10:51 ` Mike Hearn
2014-06-04 12:13 ` Wladimir
2014-06-06 8:29 ` Wladimir
2014-06-06 8:40 ` Pieter Wuille [this message]
2014-06-07 0:57 ` Jeff Garzik
[not found] <mailman.192896.1401886427.2163.bitcoin-development@lists.sourceforge.net>
2014-06-04 19:13 ` [Bitcoin-development] " Ron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPg+sBjz8_5SwiL2xyby+TqMTpB8psDhG7O1e0KbWFfqppeYng@mail.gmail.com \
--to=pieter.wuille@gmail.com \
--cc=bitcoin-development@lists.sourceforge.net \
--cc=laanwj@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox