GCC 16 makes C++26 hide Valgrind uninitialized reads
The author examines how C++26's implementation of P2795R5—which turns uninitialized automatic variable reads from undefined behavior into erroneous behavior—unintentionally hides bugs from tools like Valgrind by zero-filling stack locals. Through testing on GCC 16.2, the author demonstrates that Valgrind error reports for common uninitialized reads disappear, while performance testing reveals that zero-filling large stack buffers introduces measurable CPU overhead. Open article →