2 ms·
Modern C++ happily introduces nightmare bugs. Banning "new" from your codebase does not prevent problems. You can still happily have UAF through references. Th
by UncleMeat 4y ago
Modern C++ happily introduces nightmare bugs. Banning "new" from your codebase does not prevent problems.
You can still happily have UAF through references. The adoption of string_view has made this super clear. Arithmetic is still very error prone, with confusing promotion rules and little protection for overflows. Pointer arithmetic is still common - yes even if are using typical containers. What do you think is happening underneath the hood when you increment an iterator? Oh, and iterator invalidation remains a fun way of ending up with unsafe code even if everything looks totally fine.