Live briefing
Everything about Undefined behavior
Unpredictable result when running a program
A computer program exhibits undefined behavior (UB) when it contains, or is executing code for which its programming language specification does not mandate any specific requirements. This is different from unspecified behavior, for which the language specification does not prescribe a result, and implementation-defined behavior that defers to the documentation of another component of the platform. Wikipedia →
🧭 Start here: a 6-step reading path
- Read the overview: Undefined behaviorA 5-minute orientation
- Skim a recent paper: CsmithEdge: more effective compiler testing by handling undefined behaviour less conservativelyInfluential work since 2022
- Pick up a classic book: C How to ProgramThe most-reprinted book on the subject
- Read the landmark paper: Miri: Practical Undefined Behavior Detection for RustCited 15 times
- Go sideways: Segmentation faultA closely related topic
- Go sideways: Type punningA closely related topic
📖 Definitions
No dictionary entry for this exact phrase.
🏆 Landmark papers (most cited)
Miri: Practical Undefined Behavior Detection for Rust
Taming undefined behavior in LLVM
A Differential Approach to Undefined Behavior Detection
A differential approach to undefined behavior detection
Detecting Undefined Behaviors in CUDA C
Prevention of vulnerabilities arising from optimization of code with Undefined Behavior
Preventing Vulnerabilities Caused by Optimization of Code with Undefined Behavior
Exploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the Performance Impact
🆕 Influential since 2022
CsmithEdge: more effective compiler testing by handling undefined behaviour less conservatively
Program Reconditioning: Avoiding Undefined Behaviour When Finding and Reducing Compiler Bugs
Symbolic MRD: Dynamic Memory, Undefined Behaviour, and Extrinsic Choice
“What does the brain do?” , or Solving a priori undefined problems based on an autonomous agent behavior in real environment
Access to struct members and undefined behavior of C code
📚 Books worth reading
C How to ProgramPaul J. Deitel, Harvey M. Deitel · 2007- 📕The Ultimate Question of Programming, Refactoring, and EverythingAndrey Karpov · 2016
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
🔗 Related topics
- Segmentation fault In computing, a segmentation fault (often shortened to segfault) or access violation is a failure condition raised by hardware with memory protection,…
- Type punning In computer science, type punning is any programming technique that subverts or circumvents the type system of a programming language in order to achieve…
- Union type In computer science, a union is a value that may have any of multiple representations or formats within the same area of memory, or a variable that may…
- C syntax C syntax is the form that text must have in order to be C programming language code. The language syntax rules are designed to allow for code that is terse…
- Pointer (computer programming) I do consider assignment statements and pointer variables to be among computer science's "most valuable treasures." — Donald Knuth, Structured Programming…
- Null pointer In computing, a null pointer (sometimes shortened to nullptr or null) or null reference is a value indicating that the pointer or reference does not refer…
- Type safety In computer science, type safety is the extent to which a programming language discourages or prevents type errors.[vague] Type-safe languages are sometimes…
- C99 C99 (C9X during its development, formally ISO/IEC 9899:1999) is a past version of the C programming language open standard. It extends the previous version…