2 ms·
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
by 3pt14159 8y ago
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.
- mehrdadn 8y agoInteresting, 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.
- 3pt14159 8y agoSorry, I miscommunicated. I was not speaking about integer wrapping, I was speaking about undefined behaviour in a general sense.
- nwmcsween 8y agoWell if the compiler wraps signed numbers implicitly you have other issues.