Hidden in Plain Sight: Corner Case Defects
summary
Shows four real defects with concrete causes and fixes: a power‑of‑two ceil/floor pair that loops forever for inputs > 2^62 and returns wrong values for 0 until changed to reject zero and implement floor independently; a strtoul misuse where signed minus and 64‑bit unsigned hosts accept huge negative literals into 32‑bit fields; signed char bit‑shifts that produce wrong hex escapes; execv/argv assumptions and a sync IPC reader that deadlocks when stderr fills the pipe. Recommends MISRA, extreme testing and seL4 for formal correctness.
AI-written summary · about
chapters (10)
- 0:00Corner case defects
- 1:47Why corner cases are hard
- 2:49Power-of-two function bugs
- 9:26Number parsing in Linux
- 15:26Hex encoding and chars
- 20:49Startup crashes with exec
- 24:39Deadlock in interprocess communication
- 30:46Avoiding corner case defects
- 32:55Formal design and correctness
- 33:16Q&A
related talks
34mHidden in Plain Sight: Corner Case Defects
52mFantastic C++ Bugs and How to Test Them
05mDetecting Programs That Rely on Undefined Behavior
01h 01mBack to Basics: Debugging in Cpp
52mNobody Can Program Correctly - Lessons From 20 Years of Debugging C++ Code
20mMisconceptions About Loops in C
18mPreview: Verification (Correctness & Debugging)
01h 12mWriting robust code
