Merge pull request #62417 from Avogar/dot-product-overflow

Don't check overflow in  arrayDotProduct in undefined sanitizer
This commit is contained in:
Kruglov Pavel 2024-04-09 10:17:58 +00:00 committed by GitHub
commit 49ba81a5f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -66,13 +66,13 @@ struct DotProduct
};
template <typename Type>
static void accumulate(State<Type> & state, Type x, Type y)
static NO_SANITIZE_UNDEFINED void accumulate(State<Type> & state, Type x, Type y)
{
state.sum += x * y;
}
template <typename Type>
static void combine(State<Type> & state, const State<Type> & other_state)
static NO_SANITIZE_UNDEFINED void combine(State<Type> & state, const State<Type> & other_state)
{
state.sum += other_state.sum;
}

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1,2 @@
select ignore(dotProduct(materialize([9223372036854775807, 1]), materialize([-3, 1])));