[tor-bugs] #1943 [Tor Relay]: Helper functions {get, set}_uint{16, 32, 64}() are not used

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Sep 20 22:45:03 UTC 2010


#1943: Helper functions {get,set}_uint{16,32,64}() are not used
--------------------------------+-------------------------------------------
 Reporter:  asn                 |        Type:  defect   
   Status:  needs_review        |    Priority:  normal   
Milestone:  Tor: 0.2.2.x-final  |   Component:  Tor Relay
  Version:                      |    Keywords:  easy     
   Parent:                      |  
--------------------------------+-------------------------------------------
Changes (by arma):

  * status:  new => needs_review


Comment:

 Ok, calling this one easy may have been a false hope. :)

 I just pushed a bug1943 branch to my arma.

 The main remaining questions are:

 a) that instance in geoip.c: is it safe? I think so.

 b) all of those calls like *(double *)foo in config.c, in option_clear(),
 in config_assign_value(), and in get_assigned_option(): they're safe
 because they elements in the struct are guaranteed to be aligned
 correctly, yes?

 c) I decided to fix the keys and keys+20 instance in circuitbuild.c, even
 though there shouldn't be any alignment issues, because who knows if
 someday somebody will pass in keys+2 to the function. And performance
 isn't a worry there.

 d) For cell_pack and cell_unpack, performance could be a worry. Should we
 leave them fixed, or leave them unclear? I think based on the current
 struct organization, they should be safe currently.

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


More information about the tor-bugs mailing list