https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124370
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:5d419c69ce2e6b86d7da75f18736904885674219 commit r17-4837-g5d419c69ce2e6b86d7da75f18736904885674219 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]>
