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

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 12 10:48:27 UTC 2016


#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


More information about the tor-bugs mailing list