[tor-bugs] #24119 [Core Tor/Tor]: channel_rsa_id_group_set_badness spends a lot of time in malloc/free

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Nov 13 18:42:27 UTC 2017


#24119: channel_rsa_id_group_set_badness spends a lot of time in malloc/free
-------------------------------------------------+-------------------------
 Reporter:  Hello71                              |          Owner:  Hello71
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Minor                                |     Resolution:
 Keywords:  tor-channel, tor-sched,              |  Actual Points:
  032-backport, review-group-25                  |
Parent ID:  #23777                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by nickm):

 * status:  needs_review => needs_revision


Comment:

 On the first patch: I think `connection_or_expire_` should probably have a
 name more like `connection_or_mark_bad_if_too_old` or
 `connection_or_set_singleton_badness` or something ?  The current name
 makes it sound like it always expires the connection.

 On the second patch:  First, please don't use memcmp() directly.  Use one
 of the aliases or function in di_ops.h instead.

 I think there's a bug on the loop in your second patch:
 connection_or_group_set_badness_ will get called on every Ed25519 ID
 except for the last one.

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


More information about the tor-bugs mailing list