diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-29 07:22:57 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-29 07:22:57 +0000 |
commit | eccfe23a2172717eb9fd1da7f6cb9e629dfd034d (patch) | |
tree | 6eb49a3b2a9f406c3bdd28a058656a477da0b0bb /src/common/util.h | |
parent | 531c060b3690e5e303f60f8434f4049ebaa8a479 (diff) | |
download | tor-eccfe23a2172717eb9fd1da7f6cb9e629dfd034d.tar.gz tor-eccfe23a2172717eb9fd1da7f6cb9e629dfd034d.zip |
Disallow NDEBUG. It is very stupid.
svn:r3012
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h index e2a7546de1..977425db57 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -24,7 +24,15 @@ * calling assert() normally. */ #ifdef NDEBUG -#define tor_assert(expr) do {} while (0) +/* Nobody should ever want to build with NDEBUG set. 99% of your asserts will + * be outside the critical path anyway, so it's silly to disable bugchecking + * throughout the entire program just because a few asserts are slowing you + * down. Profile, optimize the critical path, and keep debugging on. + * + * And I'm not just saying that because some of our asserts check + * security-critical properties. + */ +#error "Sorry; we don't support building with NDEBUG." #else #define tor_assert(expr) do { \ if (!(expr)) { \ |