At Kernel Recipes, Martin Uecker said the ongoing C2y draft had removed 45 of C’s roughly 100 cases of undefined behavior. C23 limits optimizations that change earlier observable behavior because of a later error, but differences between implementations and specifications remain. In a related kernel example, counted_by expresses the relationship between an array and its length field to support bounds checking. These improvements do not prevent every use-after-free, and full memory safety requires stronger checks or formal verification.
Back to Tech
C2y draft moves to eliminate 45 cases of undefined behavior
Standards improvements do not remove the need for bounds checking and validation against use-after-free.