[tor-bugs] #25127 [Core Tor/Tor]: Rust implementation of protover_get_supported_protocols() leaks memory

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Feb 5 21:49:27 UTC 2018


#25127: Rust implementation of protover_get_supported_protocols() leaks memory
----------------------------------+------------------------------------
 Reporter:  nickm                 |          Owner:  (none)
     Type:  defect                |         Status:  new
 Priority:  Medium                |      Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor          |        Version:
 Severity:  Normal                |     Resolution:
 Keywords:  rust, protover, leak  |  Actual Points:
Parent ID:                        |         Points:
 Reviewer:                        |        Sponsor:
----------------------------------+------------------------------------

Comment (by catalyst):

 I'm still quite new to Rust so I'm not sure of the best way to handle
 this.  I do observe that protover.rs makes a list of strings as primary,
 while protover.c makes the concatenated (space-separated) single string
 primary.  I'm not sure of the history or rationale behind this
 discrepancy.

 There's also `protover_free_all()` that we could use to handle freeing of
 any long-lived or singleton objects created at run time.

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


More information about the tor-bugs mailing list