[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |8.0 Resolution|--- |FIXED --- Comment #6 from Jonathan Wakely --- It didn't get backported, but the fix is in all active branches.
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 --- Comment #5 from Jonathan Wakely --- Fixed on trunk, but let's keep the bug report open, as this is worth backporting.
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Tue May 23 10:16:08 2017 New Revision: 248362 URL: https://gcc.gnu.org/viewcvs?rev=248362&root=gcc&view=rev Log: PR libstdc++/67214 Avoid signed overflow in num_get::_M_extract_int 2017-05-23 Xi Ruoyao PR libstdc++/67214 * include/bits/locale_facets.tcc (num_get::_M_extract_int): Add explicit conversion to avoid signed overflow. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/locale_facets.tcc
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 Jonathan Wakely changed: What|Removed |Added Keywords||patch --- Comment #3 from Jonathan Wakely --- Thanks, please post the patch to the mailing lists during Stage 1.
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 --- Comment #2 from Xi Ruoyao --- Created attachment 40946 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40946&action=edit patch for this PR Since GCC 7 is in stage 4, this patch will be committed in GCC 8 stage 1.
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 Xi Ruoyao changed: What|Removed |Added CC||ryxi at stu dot xidian.edu.cn --- Comment #1 from Xi Ruoyao --- For GCC 5/6/7 I can't reproduce this since the target code is in libstdc++.so and there the ubsan can't sanitize them. But it seems a real undefined behaviour. BTW, -Woverflow doesn't warn for this in the building of libstdc++ (or this bug should have been detected and fixed). I think there are still improvements of -Woverflow to do.
[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-01-13 Ever confirmed|0 |1