3 ms·
These things don't make it safe in the security sense. They just help against memory leaks.
by sclangdon 8y ago
These things don't make it safe in the security sense. They just help against memory leaks.
- beojan 8y agoI don't think you can ever write code that's completely safe then, if nothing else some processor flaw will come along and ruin everything.
- dbaupp 8y agoWhile it's true that processor flaws destroy the assumptions that higher level components (such as any/all programming languages) build on, you don't need to go nearly that far to see unsafety in C++, even using only the most modern techniques: use-after-move of many types is undefined behaviour (for instance, dereferencing a std::unique_ptr that has been moved from), and iterator invalidation & dangling references aren't addressed by those smart pointers at all.