[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #2190 [Tor Client]: Possible reentrant calls to libevent from libevent logging callback



#2190: Possible reentrant calls to libevent from libevent logging callback
------------------------+---------------------------------------------------
 Reporter:  nickm       |       Owner:  rransom           
     Type:  defect      |      Status:  needs_review      
 Priority:  normal      |   Milestone:  Tor: 0.2.2.x-final
Component:  Tor Client  |     Version:                    
 Keywords:              |      Parent:                    
------------------------+---------------------------------------------------

Comment(by cypherpunks):

 Branch "bug2190_the_hard_way" possible incomplete:
 {{{
   messages = pending_cb_messages;
   pending_cb_messages = smartlist_create();
   do {
 }}}
 ...
 {{{
     smartlist_clear(messages);

     messages_tmp = pending_cb_messages;
     pending_cb_messages = messages;
     messages = messages_tmp;
   } while (smartlist_len(messages));
 }}}

 Because if no one can change pending_cb_messages during do{}while() the
 the last part is equal at least to:
 {{{
     smartlist_clear(messages);

   } while (0);
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2190#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs