Tag: memory safety
6 posts
-
C++26 Is Finalized: Reflection, Contracts, std::execution and Other Key Changes
What C++26 adds: static reflection, Contracts, erroneous behavior for uninitialized reads, standard library hardening, and std::execution, with code examples, the compiler situation as of September 2026, and what existing projects can do now.
-
Rust Ownership | Ownership, Borrowing, and Lifetimes
Deep dive into Rust ownership: move and copy, functions and ownership, references, slices, lifetime annotations, and patterns compared to C++, with runnable examples.
-
C++ and Rust Interop: extern "C", cxx vs bindgen, Ownership and Panics at the FFI Boundary
Calling Rust from C++ and back: the extern "C" boundary, bindgen/cbindgen vs cxx, who frees memory, panics that abort, CString vs std::string, link order.
-
Rust Memory Safety: Ownership, Borrowing, Lifetimes, unsafe
How Rust prevents use-after-free and data races at compile time: move semantics, borrow checker rules, lifetime annotations, and safe unsafe boundaries.
-
C++ Runtime Checking: AddressSanitizer and ThreadSanitizer
Catch use-after-free, overflows, leaks and data races with ASan and TSan: compiler flags, reading reports, CMake presets, GitHub Actions and suppressions.
-
C++ Array vs vector: Performance, Safety, and When to Use
C arrays, std::array, and std::vector compared: where the memory lives, pointer decay, bounds checks, copy semantics, and where the real performance cost is.