News for hackers. Stuff that matters.
Re:The Value of Undefined Behavior by 3pt14159 on Saturday July 21, 2018 @06:01PM (#17584082)
The problem is tractability. If you send me your data, your source, and your OS and if I compile it with a slightly different compiler and I can't reproduce it gets incredibly frustrating to hunt down why something isn't working.
Re:The Value of Undefined Behavior by mehrdadn on Saturday July 21, 2018 @10:29PM (#17584977)
Interesting, this is a less common complaint than what I usually hear. It kind of makes sense if you run into this a lot (I don't in C++, but maybe it happens more in C?), but at the same time I'm wondering why can't you just e.g. use -fwrapv if you want to rely on integer wrapping in your release executable? It also doesn't sound like it's related to using a different compiler, since using the same compiler with a flag like -fwrapv or with optimizations disabled should also prevent UB from being exploited.
Re:The Value of Undefined Behavior by 3pt14159 on Sunday July 22, 2018 @10:05AM (#17586799)
Sorry, I miscommunicated. I was not speaking about integer wrapping, I was speaking about undefined behaviour in a general sense.
Re:The Value of Undefined Behavior by nwmcsween on Saturday July 21, 2018 @10:40PM (#17585008)
Well if the compiler wraps signed numbers implicitly you have other issues.