Re:You can't Rust that
by pcwalton on Saturday March 31, 2018 @03:59PM
(#16724888)
Reference count problems routinely result in vulnerabilities. Google for [cve reference count].
[ Parent
| on HN ]
But these vulnerabilities can only happen if reference counting is not automatic, right?
No, because of the way references in C++ work—you can take a reference to the inside of a reference counted object without manipulating the reference count.
They could also happen if you used non-thread-safe reference counting on a thread-safe object. Now this seems to be rare in practice, because non-thread-safe reference counting is unusual. If it became more prevalent, however, I could see it happening.