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

[tor-bugs] #18308 [Tor]: Tor threading broken



#18308: Tor threading broken
-----------------------------+-----------------
     Reporter:  cypherpunks  |      Owner:
         Type:  defect       |     Status:  new
     Priority:  Medium       |  Milestone:
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |    Sponsor:
-----------------------------+-----------------
 Tor relies on double checked locking for various threading
 initializations. Double checked locking is not guaranteed to work.

 For Posix: 4.11, Memory Synchronization:
 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html

 ''Applications shall ensure that access to any memory location by more
 than one thread of control (threads or processes) is restricted such that
 no thread of control can read or modify a memory location while another
 thread of control may be modifying it.''

 Race conditions:
 compat_pthreads.c:threads_initialized

 log.c:log_mutex_initialized

 Mutex static initialization is supported by pthreads via
 PTHREAD_MUTEX_INITIALIZER.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18308>
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