Tag
A comprehensive resource providing guidelines and recommendations for writing dependable, safe C code, covering undefined behavior, memory model, and version-specific advice.
Reify is an open-source random C program generator based on semantic reification that produces undefined-behavior-free code for compiler testing. It has already uncovered 59 bugs in GCC and LLVM, plus additional bugs in OpenJ9 and Linux's eBPF runtime.
An archival version of John Regehr's C integers quiz, wrapped in JavaScript for browser compatibility, highlighting tricky undefined behavior and integer issues in C code.
An experienced C++ developer argues that all non-trivial C and C++ code contains undefined behavior, making memory safety impossible and calling into question the continued use of these languages in modern software development.
Bun's Rust rewrite fails basic Miri checks, allowing undefined behavior in safe Rust, raising serious safety concerns.
C++26 is introducing standardized library hardening to catch common undefined behavior (like out-of-bounds access) at runtime, based on Google's production experience showing a mere 0.30% performance overhead and a 30% reduction in segmentation faults.
Analyzes the undefined behavior of the C/C++ expression 'a = a++ + ++a;' for int a=5, demonstrating three possible results (11, 12, 13) due to compiler-dependent evaluation order and post-increment handling, with theoretical and experimental breakdown.