diff options
author | Bazaah | 2023-08-26 14:08:11 +0000 |
---|---|---|
committer | Bazaah | 2023-09-09 17:10:43 +0000 |
commit | 2f5f1135c403b7cec8b04a97f25740158691c25d (patch) | |
tree | 0e44a64e1ccecd1dd98f26a6f9b7cd64bb602c64 | |
parent | 1f5029bbb707d979c620f0c4a2a2cd12794ddc6e (diff) | |
download | aur-2f5f1135c403b7cec8b04a97f25740158691c25d.tar.gz |
repo: add ceph-18.2.0-fix-ecode-shec-test.patch
Fixes some undefined behavior in
src/test/erasure-code/TestErasureCodeShec_arguments.cc found while
when attempting to cast std::initializer_list to std::array.
Instead, use std::vector which has a constructor for
std::initializer_list<T>.
References: https://en.cppreference.com/w/cpp/container/array/to_array
-rw-r--r-- | ceph-18.2.0-fix-ecode-shec-test.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ceph-18.2.0-fix-ecode-shec-test.patch b/ceph-18.2.0-fix-ecode-shec-test.patch new file mode 100644 index 000000000000..24ea9b1af0d6 --- /dev/null +++ b/ceph-18.2.0-fix-ecode-shec-test.patch @@ -0,0 +1,19 @@ +diff --git a/src/test/erasure-code/TestErasureCodeShec_arguments.cc b/src/test/erasure-code/TestErasureCodeShec_arguments.cc +index 075c6383eed..74403eaf6ed 100644 +--- a/src/test/erasure-code/TestErasureCodeShec_arguments.cc ++++ b/src/test/erasure-code/TestErasureCodeShec_arguments.cc +@@ -86,12 +86,12 @@ void create_table_shec432() { + continue; + } + if (std::popcount(avails) == 4) { +- auto a = to_array<std::initializer_list<int>>({ ++ std::vector<std::initializer_list<int>> a = { + {0,1,2,3}, {0,1,2,4}, {0,1,2,6}, {0,1,3,4}, {0,1,3,6}, {0,1,4,6}, + {0,2,3,4}, {0,2,3,5}, {0,2,4,5}, {0,2,4,6}, {0,2,5,6}, {0,3,4,5}, + {0,3,4,6}, {0,3,5,6}, {0,4,5,6}, {1,2,3,4}, {1,2,3,5}, {1,2,4,5}, + {1,2,4,6}, {1,2,5,6}, {1,3,4,5}, {1,3,4,6}, {1,3,5,6}, {1,4,5,6}, +- {2,3,4,5}, {2,4,5,6}, {3,4,5,6}}); ++ {2,3,4,5}, {2,4,5,6}, {3,4,5,6}}; + if (ranges::any_of(a, std::bind_front(cmp_equal<uint, int>, avails), + getint)) { + vec.push_back(avails); |