News for hackers. Stuff that matters.
Re:RFC: C++ Buffer Hardening by mgaunard on Thursday October 06, 2022 @04:41AM (#33105994)
Undefined behaviour is great. I for one will continue to vote in its favour.

C++ does not add runtime overhead to validate that programs are well-formed.

Re:RFC: C++ Buffer Hardening by olliej on Thursday October 06, 2022 @05:13AM (#33106191)
Can you provide examples of UB that could be unspecified behaviour, where UB does anything other than cause harm?
Re:RFC: C++ Buffer Hardening by mgaunard on Thursday October 06, 2022 @09:33AM (#33107960)
Dereferencing a pointer to memory that doesn't point to a live valid object is undefined behaviour. You couldn't possibly specify what this does without instrumenting every single access to memory, like asan or valgrind does.
Re:RFC: C++ Buffer Hardening by olliej on Thursday October 06, 2022 @01:30PM (#33111250)
As I said, behaviour that could be unspecified rather than undefined.

This is an example of something that cannot be anything other than UB.

Re:RFC: C++ Buffer Hardening by kllrnohj on Thursday October 06, 2022 @11:33AM (#33109566)
Re:RFC: C++ Buffer Hardening by staticassertion on Thursday October 06, 2022 @05:02AM (#33106131)
> C++ does not add runtime overhead to validate that programs are well-formed.

You have succinctly described the problem.

Re:RFC: C++ Buffer Hardening by mgaunard on Saturday October 08, 2022 @04:50AM (#33130830)
That's not a problem, that's a core policy of that language's design.

If you want a language that is slow, there are plenty of options.