[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix assertf() issues when ALL_BUGS_ARE_FATAL is defined.



commit 3105081c2f075409f182d497eb101e3a690bb2f7
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Apr 15 14:37:46 2019 -0400

    Fix assertf() issues when ALL_BUGS_ARE_FATAL is defined.
    
    Fix from Gisle Vanem; fixes bug 30179.  Bug not in any released
    version of Tor.
---
 src/lib/log/util_bug.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 2e220b728..fb223b35f 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -143,12 +143,13 @@
 #ifdef ALL_BUGS_ARE_FATAL
 #define tor_assert_nonfatal_unreached() tor_assert(0)
 #define tor_assert_nonfatal(cond) tor_assert((cond))
-#define tor_assertf_nonfatal(cond, fmt, ...) tor_assertf(cond, fmt, ...)
+#define tor_assertf_nonfatal(cond, fmt, ...)    \
+  tor_assertf(cond, fmt, ##__VA_ARGS__)
 #define tor_assert_nonfatal_unreached_once() tor_assert(0)
 #define tor_assert_nonfatal_once(cond) tor_assert((cond))
 #define BUG(cond)                                                       \
   (ASSERT_PREDICT_UNLIKELY_(cond) ?                                     \
-   (tor_assertion_failed_(SHORT_FILE__,__LINE__,__func__,"!("#cond")"), \
+   (tor_assertion_failed_(SHORT_FILE__,__LINE__,__func__,"!("#cond")",NULL), \
     tor_abort_(), 1)                                                    \
    : 0)
 #elif defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits