Fixed ubsan report in fuzz test

This commit is contained in:
Alexey Milovidov 2019-07-09 01:30:30 +03:00
parent a8d8eb6b28
commit f748efbb5b
3 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionBinaryArithmetic.h>
#include <Core/Defines.h>
namespace DB
{
@ -10,7 +12,7 @@ struct BitTestImpl
using ResultType = UInt8;
template <typename Result = ResultType>
static inline Result apply(A a, B b)
NO_SANITIZE_UNDEFINED static inline Result apply(A a, B b)
{
return (typename NumberTraits::ToInteger<A>::Type(a) >> typename NumberTraits::ToInteger<B>::Type(b)) & 1;
}

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1 @@
SELECT sum(ignore(bitTest(number, 65))) FROM numbers(10);