Microsoft: 70 percent of all security bugs are memory safety issues
https://zdnet.com/article/microsoft-70-percent-of-all-security-bugs-are-memory-safety-issues/…
Or accept using reference counting and dynamic mutability checks. Thread local reference counting is quite cheap, especially with default move semantics rather than implicitly adding new owners. People greatly exaggerate how often Rc/Weak and RefCell aren't a viable option.
1
2
This Tweet was deleted by the Tweet author. Learn more
I don't understand what your reply has to do with my tweet. It applies to other architectures. The implication that I have an x86 centric perspective is quite wrong considering that I work full time with AArch64 targets. I only deal with x86_64 as a secondary thing or not at all.
The overhead isn't significantly larger on embedded. Rc<T> is quite cheap everywhere. It's thread-local and uses non-atomic counters. It adds 2 words to the allocation (one for weak pointers). There's no implicit reference counting like C++. Owning references are moved around.