[tor-bugs] #11792 [Tor]: Consider directory connections zlib buffers when handling OOM

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 21 04:55:27 UTC 2014


#11792: Consider directory connections zlib buffers when handling OOM
-------------------------+-------------------------------------------------
     Reporter:  nickm    |      Owner:
         Type:  defect   |     Status:  needs_review
     Priority:  normal   |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  tor-relay, dir, zlib, oom,
Actual Points:           |  026-triaged-1
       Points:           |  Parent ID:
-------------------------+-------------------------------------------------

Comment (by sysrqb):

 Prelim review.

 conn_get_buffer_age:
 - You can probably drop the age2 from the conn->outbuf conditional block,
 now that this logic is in its own function
 {{{
   if (conn->outbuf) {
 -    age2 = buf_get_oldest_chunk_timestamp(conn->outbuf, now);
 +    age = buf_get_oldest_chunk_timestamp(conn->outbuf, now);
 -    if (age2 > age)
 -      age = age2;
   }
 }}}


 tor_zlib_state_size_precalc:
 - Without knowing the preexisting code and structs it's is difficult to
 understand. Reading #11791 helps. Some of the numbers are obvious, but
 adding a descriptive comment to the return statement explaining the
 components would also help a lot.

 Other than that, this looks sane.

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


More information about the tor-bugs mailing list