Hidden in Plain Sight: Corner Case Defects
summary
Four production bugs: a pair of power-of-two helpers loop forever for inputs > 2^62 and return 1 for input 0 breaking the floor/ceiling contract; a number parser using strtoul accepts huge negative-signed strings and misclassifies them as valid 32-bit values; URL hex encoding uses signed char so a signed char bitshift yields negative index and wrong percent escapes; IPC code deadlocks by reading stdout then stderr sequentially; fixes include independent floor, bounds checks, and concurrent I/O.
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








