CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."
What it is
Chandler Carruth's CppCon 2016 talk tries to defuse the heated debate over undefined behavior in C and C++. He explains from the compiler writer's perspective why UB exists and how it enables optimization.
Why Hacker News recommends it
HN points to it whenever undefined behavior comes up, as the best explanation of the reasoning behind UB, though some dispute its framing.
- 4 people recommended it
- 4 different months
- 0 strong recommendations
- first 2016, last 2026
What HN commenters said
“CppCon has also had a lot of great talks on UB and why it is what it is”
CppCon talk on why undefined behavior exists.
kllrnohj, 2018-03 · Recommendation · in “A Usable C++ Dialect That Is Safe Against Memory Corruption”
“Chandler Carruth's talk on the subject was really useful for my own understanding of the reasoning behind UB”
Explains the reasoning behind undefined behavior.
lyricaljoke, 2018-05 · Recommendation · in “Depressing and faintly terrifying days for the C standard [pdf]”
“I encourage to watch the full talk but here is one relevant example”
Explains why signed overflow aids bug-catching; Google experiment included.
Joky, 2018-11 · Recommendation · in “Trip report: Fall ISO C++ standards meeting”
“here's a very clear-cut example[1] where emitting a warning would be bad.”
Clear-cut example where warning on UB would be bad.
moefh, 2023-08 · Recommendation · in “A Guide to Undefined Behavior in C and C++”
Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.
Topics: undefined behavior, c++, compilers, optimization, signed overflow, llvm
Also recommended by the same people
explainerEuler's formula with introductory group theory3Blue1Brown · 3 HN recommenders · 2017–2024
talkRobocalypse Now: Using Deep Learning to Combat Cheating in Counter-Strike: Global OffensiveGDC Festival of Gaming · 5 HN recommenders · 2021–2025
talkCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”CppCon · 9 HN recommenders · 2018–2026
talkCppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon · 7 HN recommenders · 2017–2025
talkLexical Scanning in Go - Rob PikeGoogleFOSSSydney · 13 HN recommenders · 2012–2025
talkRustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine WestRust Programming Language · 9 HN recommenders · 2018–2023
talkCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon · 13 HN recommenders · 2016–2024
talkIdeas about a new programming language for games.Jonathan Blow · 7 HN recommenders · 2014–2025