[tor-bugs] #27805 [Core Tor/Tor]: Update CodingStandardsRust.md with allocate_and_copy_string()

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Sep 21 00:24:21 UTC 2018


#27805: Update CodingStandardsRust.md with allocate_and_copy_string()
-------------------------+-------------------------------------------------
     Reporter:  teor     |      Owner:  (none)
         Type:  defect   |     Status:  new
     Priority:  Medium   |  Milestone:  Tor: 0.3.5.x-final
    Component:  Core     |    Version:  Tor: 0.3.3.1-alpha
  Tor/Tor                |   Keywords:  rust, protover, memory-safety,
     Severity:  Normal   |  035-must, fast-fix, 033-backport, 034-backport
Actual Points:           |  Parent ID:  #27740
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 We have allocate_and_copy_string() in Rust, which uses tor_malloc():
 ​https://github.com/torproject/tor/blob/master/src/rust/tor_allocate/tor_allocate.rs#L30

 We need to update our rust coding standards to mention
 allocate_and_copy_string():
 ​https://gitweb.torproject.org/tor.git/tree/doc/HACKING/CodingStandardsRust.md#n374

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


More information about the tor-bugs mailing list