From fee5d60b502d3fbaa6ceb56557d3e3fdce0240ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Fri, 22 Dec 2023 03:18:46 +0000 Subject: [PATCH] Fix MSAN failures. --- test/product_threaded.cpp | 6 +++--- unsupported/test/cxx11_tensor_concatenation.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/product_threaded.cpp b/test/product_threaded.cpp index 410f76752..1eb38fbde 100644 --- a/test/product_threaded.cpp +++ b/test/product_threaded.cpp @@ -13,9 +13,9 @@ void test_parallelize_gemm() { constexpr int n = 1024; constexpr int num_threads = 4; - MatrixXf a(n, n); - MatrixXf b(n, n); - MatrixXf c(n, n); + MatrixXf a = MatrixXf::Random(n, n); + MatrixXf b = MatrixXf::Random(n, n); + MatrixXf c = MatrixXf::Random(n, n); c.noalias() = a * b; ThreadPool pool(num_threads); diff --git a/unsupported/test/cxx11_tensor_concatenation.cpp b/unsupported/test/cxx11_tensor_concatenation.cpp index ce78892cb..68455b34d 100644 --- a/unsupported/test/cxx11_tensor_concatenation.cpp +++ b/unsupported/test/cxx11_tensor_concatenation.cpp @@ -36,6 +36,8 @@ template static void test_static_dimension_failure() { Tensor left(2, 3); Tensor right(2, 3, 1); + left.setRandom(); + right.setRandom(); #ifdef CXX11_TENSOR_CONCATENATION_STATIC_DIMENSION_FAILURE // Technically compatible, but we static assert that the inputs have same