Add new tor_assert_nonfatal*() macros.

Unlike tor_assert(), these macros don't abort the process.  They're
good for checking conditions we want to warn about, but which don't
warrant a full crash.

This commit also changes the default implementation for
tor_fragile_assert() to tor_assert_nonfatal_unreached_once().

Closes ticket 18613.
This commit is contained in:
Nick Mathewson
2016-04-05 09:40:51 -04:00
parent 7865402106
commit a885271c08
6 changed files with 82 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
o Minor features (safety, debugging):
* Add a set of macros to check nonfatal assertions, for internal
use. Migrating more of our checks to these should help us avoid
needless crash bugs. Closes ticket 18613.