[tor-bugs] #11276 [Tor]: openssl_mutexes_ leaked from setup_openssl_threading()

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Mar 23 04:01:09 UTC 2014


#11276: openssl_mutexes_ leaked from setup_openssl_threading()
--------------------+------------------------------------
 Reporter:  arma    |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:  Tor: 0.2.5.x-final
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 On moria1, I found this leak:
 {{{
 ==7518== 1,872 (312 direct, 1,560 indirect) bytes in 1 blocks are
 definitely lost in loss record 29 of 32
 ==7518==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
 ==7518==    by 0x501A87: tor_malloc_ (util.c:162)
 ==7518==    by 0x50BC5A: crypto_early_init (crypto.c:3167)
 ==7518==    by 0x42B3FF: tor_init (main.c:2330)
 ==7518==    by 0x42C55A: tor_main (main.c:2859)
 ==7518==    by 0x5EFEC8C: (below main) (libc-start.c:228)
 }}}

 That line is:
 {{{
   openssl_mutexes_ = tor_malloc(n*sizeof(tor_mutex_t *));
 }}}
 which appears to only be called from crypto_early_init(), which checks
 this to make sure it's never called more than once:
 {{{
   if (!crypto_early_initialized_) {
 }}}
 But (ah ha), what sets crypto_early_initialized_ to 1 afterwards?

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


More information about the tor-bugs mailing list