[tor-bugs] #25156 [Core Tor/Tor]: Stop duplicating static strings between Rust and C

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 24 20:55:48 UTC 2018


#25156: Stop duplicating static strings between Rust and C
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.2.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  rust, memory-leaks, technical-debt,  |  Actual Points:
  034-triage-20180328, 034-removed-20180328      |
Parent ID:                                       |         Points:  1
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by chelseakomlo):

 Replying to [comment:6 teor]:
 > I think we should have one copy of strings (and other constants) across
 Rust and C, as much as possible.
 >
 > Let's make it a coding standard, and see how we go adopting it in
 protover?

 Yes I think that is a good idea. On one hand, removing duplication as much
 as possible is valuable. On the other hand, we'll need FFI calls for every
 static string (and we should look at the cost with string copying when
 moving across language boundaries). Either way it is messy but having a
 standard way of doing things will be helpful to managing
 complexity/possible bugs.

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


More information about the tor-bugs mailing list