[tor-bugs] #8744 [Torsocks]: The show_msg() does not save correctly the errno value

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Apr 19 19:48:20 UTC 2013


#8744: The show_msg() does not save correctly the errno value
----------------------+-----------------------------------------------------
 Reporter:  dgoulet   |          Owner:  ioerror
     Type:  defect    |         Status:  new    
 Priority:  normal    |      Milestone:         
Component:  Torsocks  |        Version:         
 Keywords:            |         Parent:         
   Points:            |   Actualpoints:         
----------------------+-----------------------------------------------------
 The "show_msg" function tries to save the errno of the caller but there
 are multiple call sites '''*before*''' that can override the errno value.

 This was actually the cause of some other bugs in the past, one being
 https://trac.torproject.org/projects/tor/ticket/8043.

 I think the best way to deal with this issue is for the caller to make
 sure errno is saved. In some situations, we might NOT want this function
 to restore a previous errno so it should not set it.

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


More information about the tor-bugs mailing list