diff --git a/dbms/src/Functions/tests/gtest_strings_simd_consistency.cpp b/dbms/src/Functions/tests/gtest_strings_simd_consistency.cpp index 7f04f3ee68d..92fc79eaad2 100644 --- a/dbms/src/Functions/tests/gtest_strings_simd_consistency.cpp +++ b/dbms/src/Functions/tests/gtest_strings_simd_consistency.cpp @@ -296,9 +296,9 @@ TEST(StringsLowerUpperAscii, Random) std::random_device device; auto seed = device(); std::cout << "seeded with: " << seed << std::endl; - std::vector data(limit); - std::vector res_new(limit); - std::vector res_old(limit); + std::vector data(limit + 1); + std::vector res_new(limit + 1, 0); + std::vector res_old(limit + 1, 0); std::default_random_engine eng(seed); std::uniform_int_distribution dist( 'A', @@ -307,6 +307,7 @@ TEST(StringsLowerUpperAscii, Random) { i = dist(eng); } + data.back() = 0; { { auto begin = high_resolution_clock::now(); @@ -332,9 +333,9 @@ TEST(StringsLowerUpperUtf8, Random) std::random_device device; auto seed = device(); std::cout << "seeded with: " << seed << std::endl; - std::vector data(limit); - std::vector res_new(limit, 0); - std::vector res_old(limit, 0); + std::vector data(limit + 1); + std::vector res_new(limit + 1, 0); + std::vector res_old(limit + 1, 0); std::default_random_engine eng(seed); std::uniform_int_distribution dist( std::numeric_limits::min(), @@ -343,6 +344,7 @@ TEST(StringsLowerUpperUtf8, Random) { i = dist(eng); } + data.back() = 0; { { auto begin = high_resolution_clock::now();