From eb6929cb191c1b91dda784697faedcfdb245345a Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 16 Mar 2015 16:15:47 -0400 Subject: fix bug in maxsize calculation, which would cause products of size > 2048 to address the lookup table out of bounds --- Eigen/src/Core/products/LookupBlockingSizesTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Core/products') diff --git a/Eigen/src/Core/products/LookupBlockingSizesTable.h b/Eigen/src/Core/products/LookupBlockingSizesTable.h index f955253f8..3c8aba6f8 100644 --- a/Eigen/src/Core/products/LookupBlockingSizesTable.h +++ b/Eigen/src/Core/products/LookupBlockingSizesTable.h @@ -59,7 +59,7 @@ struct LookupBlockingSizesFromTableImpl using std::max; typedef BlockingSizesLookupTable Table; const uint16_t minsize = Table::BaseSize; - const uint16_t maxsize = minsize << (Table::NumSizes + 1); + const uint16_t maxsize = minsize << (Table::NumSizes - 1); const uint16_t k_clamped = max(minsize, min(k, maxsize)); const uint16_t m_clamped = max(minsize, min(m, maxsize)); const uint16_t n_clamped = max(minsize, min(n, maxsize)); -- cgit v1.2.3