5 ms·
Sometimes the bugs don't happen when optimizations are off. (-:
by tomjakubowski 8y ago
Sometimes the bugs don't happen when optimizations are off. (-:
- jolmg 8y agoThat'd be a compiler bug, then. I don't think those would be common. EDIT: I suppose the other possibility is that the program is doing some weird things, like reading its own machine code from memory.
- lmkg 8y agoOr undefined behavior in the program, which happens to manifest differently under different compile options.
- geofft 8y agoNeither of the above are required: your code might be racing with some other API. If your code finishes fast enough, the other code isn't ready for you. With optimizations off, you consistently lose the race and the bug doesn't show up.