[tor-bugs] #30179 [Core Tor]: Building with 'ALL_BUGS_ARE_FATAL'

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Apr 14 14:50:29 UTC 2019


#30179: Building with 'ALL_BUGS_ARE_FATAL'
----------------------+----------------------------------
 Reporter:  gvanem    |          Owner:  (none)
     Type:  defect    |         Status:  new
 Priority:  Medium    |      Milestone:
Component:  Core Tor  |        Version:  Tor: unspecified
 Severity:  Normal    |     Resolution:
 Keywords:            |  Actual Points:
Parent ID:            |         Points:
 Reviewer:            |        Sponsor:
----------------------+----------------------------------

Comment (by gvanem):

 There is another issue with how **tor_assertf_nonfatal()** is defined when
 **ALL_BUGS_ARE_FATAL** is defined.

 So my above patch is now:
 {{{
 --- a/src/lib/log/util_bug.h 2019-04-14 03:56:41
 +++ b/src/log/util_bug.h     2019-04-14 14:45:15
 @@ -143,12 +143,12 @@
  #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), \
      abort(), 1)                                                         \
     : 0)
  #elif defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS)
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30179#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list