[tor-bugs] #25156 [Core Tor/Tor]: Stop duplicating static strings between Rust and C
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Feb 5 23:55:29 UTC 2018
#25156: Stop duplicating static strings between Rust and C
--------------------------+------------------------------------------------
Reporter: teor | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.4.x-final
Component: Core | Version: Tor: 0.3.2.1-alpha
Tor/Tor |
Severity: Normal | Keywords: rust, memory-leaks, technical-debt
Actual Points: | Parent ID:
Points: 1 | Reviewer:
Sponsor: |
--------------------------+------------------------------------------------
In the protover crate, we list all supported protocol versions.
And then we do it again in C.
This makes it likely that they will get out of sync.
Also, passing static strings from Rust to C is error-prone (#25127).
Let's put all the static strings in C, and access them from Rust.
Yes, that might mean we pass them from C to Rust and back to C again. Oh
well.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25156>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list