Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't follow. Isn't UB a subset of bugs or alternatively a follow on consequence that causes observable behavior to further deviate?


> Isn't UB a subset of bugs

No, not at all. UB can still produce correct and expected results for the entire input domain.


If I have a bug that only triggers between 9 and 10 am EST on Mondays that is still a bug, no? Now extend that to "rand(1.0) < 0.01". Now extend that to a check using __TIME__ that goes off at compile time instead of runtime (some binaries are buggy, some aren't). Now extend that to UB.


"can" is extremely different than "will"!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: