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

[tor-commits] [tor/master] Merge branch 'maint-0.4.3' into maint-0.4.4



commit 4c82c2d1d4a9800f82bcc47c227a8e6a2a0d168d
Merge: 61ee17eb1e a22bfe04bc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Jan 19 12:49:22 2021 -0500

    Merge branch 'maint-0.4.3' into maint-0.4.4

 changes/40241_v2                |  4 ++++
 src/core/or/channeltls.c        |  4 +---
 src/core/or/circuitlist.c       |  4 +---
 src/feature/client/entrynodes.c |  4 +---
 src/feature/rend/rendclient.c   |  4 +---
 src/lib/log/util_bug.h          | 11 +++++++++++
 6 files changed, 19 insertions(+), 12 deletions(-)

diff --cc src/lib/log/util_bug.h
index 6b27b36f03,d9dbc7ee09..684dc7c6dd
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@@ -247,15 -240,20 +247,26 @@@
    IF_BUG_ONCE__(ASSERT_PREDICT_UNLIKELY_(cond),                 \
                  IF_BUG_ONCE_VARNAME__(__LINE__))
  
 +#endif /* defined(ALL_BUGS_ARE_FATAL) || ... */
 +
+ /**
+  * Use this macro after a nonfatal assertion, and before a case statement
+  * where you would want to fall through.
+  */
+ #ifdef ALL_BUGS_ARE_FATAL
+ #define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL \
+   abort()
+ #else
+ #define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL FALLTHROUGH
+ #endif
+ 
 -/** Define this if you want Tor to crash when any problem comes up,
 - * so you can get a coredump and track things down. */
 -// #define tor_fragile_assert() tor_assert_unreached(0)
 +/** In older code, we used tor_fragile_assert() to mark optional failure
 + * points. At these points, we could make some debug builds fail.
 + * (But release builds would continue.)
 + *
 + * To get the same behaviour in recent tor versions, define
 + * ALL_BUGS_ARE_FATAL, and use any non-fatal assertion or *BUG() macro.
 + */
  #define tor_fragile_assert() tor_assert_nonfatal_unreached_once()
  
  void tor_assertion_failed_(const char *fname, unsigned int line,



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