Tag: Undefined behavior
3 posts
-
C++ Iterator Invalidation: “vector iterators incompatible”
Iterator invalidation rules for vector, deque, list, map and unordered_map, ten bugs behind 'vector iterators incompatible', and fixes using erase's return.
-
C++ Undefined Behavior : Why Release-Only Crashes Happen
How C++ undefined behavior like out-of-bounds access, signed overflow, uninitialized reads and data races makes release builds crash, and how UBSan finds it.
-
C++ Default Initialization: When Variables Stay Indeterminate and How That Bites
Default initialization happens with no initializer, and local scalars are left indeterminate. Covers the danger zone, real-world bugs, class members, arrays, dynamic allocation, and detection tools.