[tor-bugs] #19566 [Core Tor/Tor]: SR: Use BUG() instead of tor_assert() when we can

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Sep 15 13:08:41 UTC 2017

#19566: SR: Use BUG() instead of tor_assert() when we can
 Reporter:  dgoulet                              |          Owner:  (none)
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Minor                                |     Resolution:
 Keywords:  tor-sr, dirauth, easy, disaster-     |  Actual Points:
  waiting-to-happen                              |
Parent ID:                                       |         Points:  0.2
 Reviewer:  dgoulet                              |        Sponsor:
Changes (by nickm):

 * status:  needs_review => needs_revision
 * milestone:  Tor: 0.3.2.x-final => Tor: 0.3.3.x-final


 Does this patch pass the unit tests?  It looks like the BUG() conditions
 are mostly inverted.  (That is, when the old code would say "assert(x)",
 this code says "if (BUG(x))" when "if (BUG(!x))" would make more sense.)

 Also, is this patch just a matter of "replace all the assertions", or does
 it try to replace only the assertions that are fragile for one reason or

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

More information about the tor-bugs mailing list