[tor-bugs] #6538 [Tor Client]: Use bit-twiddling tricks to make choose-by-bandwith algorithm even more time-invariant

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Aug 4 17:39:23 UTC 2012


#6538: Use bit-twiddling tricks to make choose-by-bandwith algorithm even more
time-invariant
-------------------------+--------------------------------------------------
 Reporter:  nickm        |          Owner:                    
     Type:  enhancement  |         Status:  new               
 Priority:  normal       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client   |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by nickm_mobile):

 I'm not sure I'm comfortable with that.  Honestly, you may have to talk me
 out of doing this in 0.2.2.

 That said, there is a much simpler fix, if we can trust the compiler not
 to get too smart.  Instead of setting i_has_been_chosen to 1 (as we do in
 the current code), set rand_bw t the o INT64_MAX (or whatever its type's
 max is).  Remove i_has_been_chosen. Should work I think.

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


More information about the tor-bugs mailing list