[tor-bugs] #8447 [Tor]: p_circ_id is a uint32_t, but we print it as a %d

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Mar 10 09:10:26 UTC 2013


#8447: p_circ_id is a uint32_t, but we print it as a %d
-----------------------+----------------------------------------------------
 Reporter:  arma       |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  normal     |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor        |        Version:                    
 Keywords:  tor-relay  |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 Take for example
 {{{
 Mar 10 05:08:15.000 [info] circuit_expire_old_circuits_serverside():
 Closing circ_id -2147477157 (empty 62 secs ago)
 }}}

 This happens because p_circ_id is of type circid_t, which is a uint32_t.

 There are a bunch of cases in the code where we print p_circ_id as a %d. I
 guess the overflow is extra likely because of the "use the first bit to
 decide which piece of the id-space you'll use" trick.

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


More information about the tor-bugs mailing list