News for hackers. Stuff that matters.
Re:Impact of Undefined Behavior on Performance by anonymoushn on Friday July 09, 2021 @04:53AM (#27781696)
One of my least favorite bugs came from a loop that iterated from *p to *(p+n) (exclusive). For n=0 and values of p other than null, the loop body never executes. For n=0 and p=null, the loop body is allowed to execute, because null+0 is allowed to be any value.
Re:Impact of Undefined Behavior on Performance by fooker on Friday July 09, 2021 @05:25AM (#27781894)
Nice example! Seems solvable by printf debugging though..
Re:Impact of Undefined Behavior on Performance by taneq on Friday July 09, 2021 @05:55AM (#27782084)
The fact that it’s fixable doesn’t mean it’s fun…