2 ms·
Once again, you focus solely on performance. This is why I don't believe you care about correctness. But to answer your question, because the malicious compile
by gavinhoward 3y ago
Once again, you focus solely on performance. This is why I don't believe you care about correctness.
But to answer your question, because the malicious compiler doubled the work I had to go to get to this point. Or worse. Maybe it increased the work by an order of magnitude.
In addition, the checks are what prevent UB, especially the kind where you claim that any pointer anywhere can mess up everything. It's not UB if the behavior is defined as a crash before anything bad happens.
And to answer your complaint that I'm leaving performance on the table, so what? Sure, I'm "messing" with speculation (though not by much because I tell the compiler that the error branch is unlikely to be taken), but Spectre and Meltdown showed that maybe speculation was a bad thing.
By the way, in my bc, I actually turn a lot of checks off, the checks for which I am 10 9's sure there aren't problems.
Not an exaggeration, by the way; I've run my bc under a fuzzer for probably 50 billion executions or more. And every single one of the paths were fixed until they came out clean in the sanitizers and Valgrind.
Even across the entire world, I doubt my bc has run 50 billion unique executions; most of the time, people run it on the same scripts with similar data, over and over.
In my other project, I don't turn off checks because it hasn't seen that level of testing.
That's why I said you could attack bc; checks will actually be off. Make sure you do it in release mode, though if you get an assert to trigger in debug mode first, that same input should also cause UB in release mode.
Have fun. I'm done. Contact my through my bio if you succeed.
- UncleMeat 3y ago> Once again, you focus solely on performance. This is why I don't believe you care about correctness. And once again, you are making false statements about me. In fact, I am one of the people the performance folks are mad at because I'm fighting to buy safety. It is just impossible to do this when the conversation is so poisoned by arguments like yours. This is exactly the sort of communication that makes it so difficult to make meaningful progress on this problem. People just calling other people stupid idiots who don't care about correctness. People need to be precise in what they are asking for from the compilers and the committees and honest about what it costs. That is all I am asking.