Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Undefined Behavior From the Compiler's Perspective - A Deep Dive Into What Makes UBs So Dangerous

CppNow via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore undefined behavior (UB) in C++ from the compiler's unique perspective in this comprehensive conference talk that demystifies one of the most misunderstood aspects of the language. Examine what undefined behaviors actually are, how compilers process and optimize around them, and understand why they pose significant dangers to code reliability and security. Learn about the two common but flawed attitudes toward UB - treating it as either an insurmountable threat or dismissing it as irrelevant - and discover a more nuanced understanding based on compiler implementation details. Investigate C++'s problematic approach to handling undefined behavior and explore potential solutions that both the language specification and compiler implementations could adopt to make development safer and more predictable. Gain insights into why UB exists in the first place, why it continues to be used despite its risks, and what practical steps can be taken to mitigate its dangers while still leveraging its performance benefits. Understand the technical mechanisms behind compiler optimizations that assume undefined behavior never occurs, and learn how these assumptions can lead to unexpected program behavior even in seemingly safe code.

Syllabus

Undefined Behavior From the Compiler’s Perspective - Shachar Shemesh - C++Now 2025

Taught by

CppNow

Reviews

Start your review of Undefined Behavior From the Compiler's Perspective - A Deep Dive Into What Makes UBs So Dangerous

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.