Everything About ___
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

  1. Read the overview: Undefined behaviorA 5-minute orientation
  2. Skim a recent paper: CsmithEdge: more effective compiler testing by handling undefined behaviour less conservativelyInfluential work since 2022
  3. Pick up a classic book: C How to ProgramThe most-reprinted book on the subject
  4. Read the landmark paper: Miri: Practical Undefined Behavior Detection for RustCited 15 times
  5. Go sideways: Segmentation faultA closely related topic
  6. Go sideways: Type punningA closely related topic

📖 Definitions

No dictionary entry for this exact phrase.

🗂️ The subject at a glance

  1. Overview
  2. Benefits
  3. Risks
  4. Examples

🏆 Landmark papers (most cited)

🆕 Influential since 2022

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics