[tor-bugs] #6853 [Tor Directory Authority]: Relay-flag voting code has undefined behaviour

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Sep 15 22:36:22 UTC 2012


#6853: Relay-flag voting code has undefined behaviour
-------------------------------------+--------------------------------------
 Reporter:  rransom                  |          Owner:  rransom           
     Type:  defect                   |         Status:  new               
 Priority:  normal                   |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor Directory Authority  |        Version:                    
 Keywords:                           |         Parent:                    
   Points:                           |   Actualpoints:                    
-------------------------------------+--------------------------------------

Comment(by rransom):

 There are 2.5 sane ways to do this:

 (1) Rename the `flags` field and audit every reference to it that the
 compiler finds.  Then, in a `fixup!` commit, rename it back.

 (2) Bite the bullet and implement and use a real bit-vector data
 structure, complete with runtime-variable length and dynamic allocation.
 (Also rename the `flags` field.)

 (2') Implement a bit-field data structure, with length set at compile
 time.  (Also rename the `flags` field.)

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


More information about the tor-bugs mailing list