summaryrefslogtreecommitdiff
path: root/73/a486b19bb70160baee734797705ddabafa0932
blob: 292e8b7673b422d7223a9a3f6ef8e83c546b5c75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
	helo=mx.sourceforge.net)
	by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <jgarzik@bitpay.com>) id 1WsA6T-0002jx-8n
	for bitcoin-development@lists.sourceforge.net;
	Wed, 04 Jun 2014 12:15:37 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of bitpay.com
	designates 209.85.212.177 as permitted sender)
	client-ip=209.85.212.177; envelope-from=jgarzik@bitpay.com;
	helo=mail-wi0-f177.google.com; 
Received: from mail-wi0-f177.google.com ([209.85.212.177])
	by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1WsA6R-0001n3-Hw
	for bitcoin-development@lists.sourceforge.net;
	Wed, 04 Jun 2014 12:15:37 +0000
Received: by mail-wi0-f177.google.com with SMTP id f8so1323424wiw.10
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 04 Jun 2014 05:15:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type:content-transfer-encoding;
	bh=vRKwj7wfAsIbvsJc+7uyksdTbDNOVoS1VRCQeciHbnY=;
	b=MCeFeKSg0SYMaylKMKupk2/cSGjexn5OsFxe+dgBHi3HmpwXDKNBhAD+3gW9XrM0eK
	tp/zQMDRzD6Mw29wqL4XSHWzDMIyqWvecVj19UG7xLQLAFduEim/g47+V2F9pAk39bx6
	pfPac+JcK/b0MpW6tlV7p7T/Boj/e0TFx39WvnoXmPaRv3SiWmZ30TJOwGiHR7ZftEXj
	AQTf/d4x2ODmhKRa/FzWNe81au1xFa11T8EbdQo9eWojda0TlRmUxVW65XrybAXhkQXT
	CAfW7blRMXCazD6GKmUPlkgl1KKTUgxGBE4sufe3gPxfk0xbxL7y839gLQDm1MPugJ8k
	5obw==
X-Gm-Message-State: ALoCoQmjLf1mV1+92rxu6k+ibgXtAI0WRjz8XvScFt4qztAu9YWKa7/jwHTIdXkVrqESP1LbOvws
X-Received: by 10.180.73.66 with SMTP id j2mr4318793wiv.36.1401884128745; Wed,
	04 Jun 2014 05:15:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.195.12.3 with HTTP; Wed, 4 Jun 2014 05:15:08 -0700 (PDT)
In-Reply-To: <CANEZrP075mWzMEaU72eoYqktrc2VcbyD_Fhb7N0CzvWoAgMYcw@mail.gmail.com>
References: <1401822421.27942.YahooMailNeo@web124505.mail.ne1.yahoo.com>
	<CANEZrP18nf0oK6fbnE59opXxfMdwiOOu4v99iGyXyGo_7NLuYA@mail.gmail.com>
	<CAAS2fgTM30oFLGpkCwqM5Wf-Crmz5s05X-uWXAiGy9u43nbKvQ@mail.gmail.com>
	<CANEZrP075mWzMEaU72eoYqktrc2VcbyD_Fhb7N0CzvWoAgMYcw@mail.gmail.com>
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 4 Jun 2014 08:15:08 -0400
Message-ID: <CAJHLa0PTTHfvd-1BR5s2k-4UW6V6qLEyAbF2YSRxOOSjtH9+_Q@mail.gmail.com>
To: Mike Hearn <mike@plan99.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -1.6 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	-0.0 SPF_PASS               SPF: sender matches SPF record
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1WsA6R-0001n3-Hw
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
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Wed, 04 Jun 2014 12:15:37 -0000

Yes, check macros like that can be useful.

I like the kernel's policy, which parallels our direction:
1) Enable and use lightweight assertions for most users.
2) No assertions with side effects

If you want to compile them out, that's fine, but they should always
be present in production software.



On Wed, Jun 4, 2014 at 6:20 AM, Mike Hearn <mike@plan99.net> wrote:
>> As a matter of procedure we do not use assertions with side effects=E2=
=80=94 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 defens=
e 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.
>
> -------------------------------------------------------------------------=
-----
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and thei=
r
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>



--=20
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.      https://bitpay.com/