https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124370
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:b0392114a03abde1e35c1fd52981bd4994c1784e commit r14-12965-gb0392114a03abde1e35c1fd52981bd4994c1784e Author: Jonathan Wakely <[email protected]> Date: Thu Oct 1 22:50:13 2026 +0100 libstdc++: Fix stack corruption in std::bitset stream extraction [PR124370] The __builtin_alloca argument didn't account for the size or alignment of wide characters. Replace __builtin_alloca with an array _CharT[small ? N : 1] which is used for small, or a heap allocation otherwise. libstdc++-v3/ChangeLog: PR libstdc++/124370 * include/std/bitset (operator>>): Use array inside _Buffer instead of __builtin_alloca. * testsuite/20_util/bitset/io/input.cc: Suppress pedwarn about C++14 binary literal. * testsuite/20_util/bitset/io/wchar_t.cc: New test. Reviewed-by: Tomasz KamiÅski <[email protected]> (cherry picked from commit 5d419c69ce2e6b86d7da75f18736904885674219)
