News for hackers. Stuff that matters.
Re:The Little Bool of Doom (2025) by pseudohadamard on Monday February 09, 2026 @04:54AM (#46943507)
The author knew there was a problem, knew where the problem was, and knew what the problem was, but even with that and an extensive perusal of the standard he still only thinks he knows what part of the standard was violated, presumably because nothing else fit ("didn't explicitly say anything about invalid _Bool values. After some more searching, I believe I've found my answer"). There's no way anyone without omniscience could have predicted this obscure issue being present somewhere in Doom's 60,000 lines of code.
Re:The Little Bool of Doom (2025) by saagarjha on Monday February 09, 2026 @06:03AM (#46943921)
With the behavior specified UB sanitizer would have been my first tool to try.
Re:The Little Bool of Doom (2025) by adrian_b on Monday February 09, 2026 @08:45AM (#46945123)
Presumably also the author has now learned this, after discovering at the end that compiling with the sanitizer enabled immediately showed which is the bug, which would have saved a lot of time if he had always used it.
Re:The Little Bool of Doom (2025) by turol on Wednesday February 11, 2026 @11:33AM (#46977106)
Unfortunately Doom has a lot of undefined behavior (because it's a 30 year old codebase) so if you enable UBSAN you're inundated with warnings. Finding this specific needle in that haystack would take quite a lot of effort.