re PR libstdc++/77717 (testsuite/21_strings/basic_string_view/operations/compare/char/1.cc makes undefined memcmp call)
PR libstdc++/77717 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: Fix an out-of-bounds access. From-SVN: r240486
This commit is contained in:
parent
81fea426da
commit
a38814c003
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-09-26 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR libstdc++/77717
|
||||
* testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
|
||||
Fix an out-of-bounds access.
|
||||
|
||||
2016-09-26 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/7652
|
||||
|
|
|
@ -82,8 +82,8 @@ test01()
|
|||
test_value(strncmp(str_1.data(), str_0.data(), 6), z);
|
||||
test_value(strncmp(str_1.data(), str_0.data(), 14), lt);
|
||||
test_value(memcmp(str_1.data(), str_0.data(), 6), z);
|
||||
test_value(memcmp(str_1.data(), str_0.data(), 14), lt);
|
||||
test_value(memcmp("costa marbella", "costa rica", 14), lt);
|
||||
test_value(memcmp(str_1.data(), str_0.data(), 10), lt);
|
||||
test_value(memcmp("costa marbella", "costa rica", 10), lt);
|
||||
|
||||
// int compare(const basic_string_view& str) const;
|
||||
test_value(str_0.compare(str_1), gt); //because r>m
|
||||
|
|
Loading…
Add table
Reference in a new issue