public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Mike Hearn <mike@plan99•net>
To: Gregory Maxwell <gmaxwell@gmail•com>
Cc: "bitcoin-development@lists•sourceforge.net"
	<bitcoin-development@lists•sourceforge.net>,
	Ron <rdwnj@yahoo•com>
Subject: Re: [Bitcoin-development] # error "Bitcoin cannot be compiled without assertions." <<<<NOT
Date: Wed, 4 Jun 2014 18:20:43 +0800	[thread overview]
Message-ID: <CANEZrP075mWzMEaU72eoYqktrc2VcbyD_Fhb7N0CzvWoAgMYcw@mail.gmail.com> (raw)
In-Reply-To: <CAAS2fgTM30oFLGpkCwqM5Wf-Crmz5s05X-uWXAiGy9u43nbKvQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

>
> As a matter of procedure we do not use assertions with side effects— the
> codebase did at one point, but have cleaned them up.  In an abundance of
> caution we also made it refuse to compile without assertions enabled: A
> decision who's wisdom was clearly demonstrated when not long after, some
> additional side-effect having assert was contributed. In the real world
> errors happen here and there, and making robust software involves defense
> in depth.
>

I think this class of errors could be removed entirely by just saying it's
OK for assertions to have side effects and requiring them to be enabled, as
is currently done.

The glog library:

http://google-glog.googlecode.com/svn/trunk/doc/glog.html

provides CHECK macros that print stack traces when they fail. Using them
would also be good.

[-- Attachment #2: Type: text/html, Size: 1409 bytes --]

  reply	other threads:[~2014-06-04 10:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 19:07 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 [this message]
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
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=CANEZrP075mWzMEaU72eoYqktrc2VcbyD_Fhb7N0CzvWoAgMYcw@mail.gmail.com \
    --to=mike@plan99$(echo .)net \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=gmaxwell@gmail$(echo .)com \
    --cc=rdwnj@yahoo$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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