diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-04-05 09:40:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-04-14 16:24:28 -0400 |
commit | a885271c08d2337b35c203c0b27509d0aa32dbf6 (patch) | |
tree | 0cb88f3d43fcc7a90be972d958d3146c1294c06b /src/or/rephist.c | |
parent | 7865402106e9af273b9c887484b8371a899683ad (diff) | |
download | tor-a885271c08d2337b35c203c0b27509d0aa32dbf6.tar.gz tor-a885271c08d2337b35c203c0b27509d0aa32dbf6.zip |
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.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index fe0ca91c25..b94ad29650 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -3214,7 +3214,7 @@ rep_hist_free_all(void) rep_hist_desc_stats_term(); total_descriptor_downloads = 0; - tor_assert(rephist_total_alloc == 0); - tor_assert(rephist_total_num == 0); + tor_assert_nonfatal(rephist_total_alloc == 0); + tor_assert_nonfatal_once(rephist_total_num == 0); } |