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

Re: [tor-bugs] #18651 [Tor]: Assertion rephist_total_alloc == 0 failed in rep_hist_free_all at src/or/rephist.c:3216



#18651: Assertion rephist_total_alloc == 0 failed in rep_hist_free_all at
src/or/rephist.c:3216
---------------------+------------------------------------
 Reporter:  arma     |          Owner:
     Type:  defect   |         Status:  new
 Priority:  Medium   |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor      |        Version:
 Severity:  Blocker  |     Resolution:
 Keywords:           |  Actual Points:
Parent ID:           |         Points:
 Reviewer:           |        Sponsor:
---------------------+------------------------------------

Comment (by nickm):

 void rep_hist_remove_predicted_ports() looks like it should decrement the
 allocation.

 Does this patch fix it for you?
 {{{
 diff --git a/src/or/rephist.c b/src/or/rephist.c
 index 8654cd3085c6..fe0ca91c25e1 100644
 --- a/src/or/rephist.c
 +++ b/src/or/rephist.c
 @@ -1793,6 +1793,7 @@ rep_hist_remove_predicted_ports(const smartlist_t
 *rmv_ports)
    SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) {
      if (bitarray_is_set(remove_ports, pp->port)) {
        tor_free(pp);
 +      rephist_total_alloc -= sizeof(*pp);
        SMARTLIST_DEL_CURRENT(predicted_ports_list, pp);
      }
    } SMARTLIST_FOREACH_END(pp);
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18651#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs