On 11/12/21 20:40, G. Branden Robinson wrote:
At 2021-11-12T19:45:16+0100, Alejandro Colomar (man-pages) wrote:
Also, we prevent some crazy programmers from relying on that padding
byte being actually padding and not something else, even if it "must"
be zero. I've seen too much crazy stuff; programmers relying on
undefined behavior just because "we don't plan to move from C++17 to
C++20, so this is safe".
A more complete report of the horrifying story can be found here:
<https://github.com/tcbrindle/span/issues/42#event-5473150481>
The code to which it refers is closed-source, so I can't link to it.
But you can feel how wrong it was.
It made use of a library that provided C20's std::span for older
standards, and has some specified behavior for what C20 regarded as UB.
Guess what.
+1. One can almost see them producing a cowboy hat from an
extradimensional space in their cubicle. Strap in--the UB bronco is
gonna start bucking.
--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/