]> git.ipfire.org Git - people/ms/gcc.git/commit
libstdc++: Fix out-of-bound array accesses in testsuite
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 Jul 2016 19:38:51 +0000 (20:38 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 16 Nov 2021 14:09:00 +0000 (14:09 +0000)
commit8d8e8f3ad567c7bd1de708fcc841f691d9686c4d
treec04fb30c21bbc8dabf46a40070225b57f4e70b61
parent971976947154c7442a2f8262a9bbd1bc540e6544
libstdc++: Fix out-of-bound array accesses in testsuite

I fixed some undefined behaviour in string tests in r238609, but I only
fixed the narrow char versions. This applies the same fixes to the
wchar_t ones. These problems were found when testing a patch to make
std::basic_string usable in constexpr.

libstdc++-v3/ChangeLog:

* testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
Fix reads past the end of strings.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
Likewise.
* testsuite/experimental/string_view/operations/compare/wchar_t/1.cc:
Likewise.
libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc
libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc
libstdc++-v3/testsuite/experimental/string_view/operations/compare/wchar_t/1.cc