[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #27740 [Core Tor/Tor]: rust protover_all_supported() returns rust-allocated string in *missing_out
#27740: rust protover_all_supported() returns rust-allocated string in *missing_out
-------------------------------------------------+-------------------------
Reporter: cyberpunks | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor:
| 0.3.5.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.3.3.1-alpha
Severity: Normal | Resolution:
Keywords: rust, protover, memory-safety, | Actual Points:
035-must, fast-fix, 033-backport, |
034-backport |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by cyberpunks):
Replying to [comment:3 teor]:
> As far as I understand it, it may be ok to allocate in Rust and
deallocate in C, as long as they use the same allocator.
Right, and currently, they don't.
> deallocated in Rust (when the function returns),
It actually isn't.
> * when missing_out is NULL, Rust still assigns to it
Nice catch!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27740#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs