News for hackers. Stuff that matters.
Re:RFC: C++ Buffer Hardening by gpderetta on Thursday October 06, 2022 @06:10AM (#33106479)
Well, it is not that easy. Specifying a subset of allowed outcomes might still prevent future evolution.

For example bound checking, while fairly cheap for serial code, makes it very hard to vectorize code effectively. Then again so does IEEE FP math and that's why we have -ffast-math...

In the end, it is not impossible, it is just tradeoffs.

I'm generally on the opinion that there should be as little UB as possible, but probably this is better done by compilers that can push the limit of static and dynamic checking technology instead of the standard mandating it.

Re:RFC: C++ Buffer Hardening by saagarjha on Thursday October 06, 2022 @06:13AM (#33106493)
Right, that’s my point at the top of the thread :) I’m just saying if you don’t end up with something that looks like what I just mentioned you’re really not specifying anything, so you might as well go for undefined behavior. This is fine.
Re:RFC: C++ Buffer Hardening by gpderetta on Thursday October 06, 2022 @07:42AM (#33106983)
Yes, I think we are in complete agreement :)