mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Suppress UBsan for addMinutes/addHours/addWeeks with inf
https://clickhouse-test-reports.s3.yandex.net/19466/bb6f775b89da564cff9892a2443332a758e884c0/fuzzer_ubsan/report.html#fail1
This commit is contained in:
parent
bb6f775b89
commit
86ead0f0a9
@ -288,14 +288,14 @@ struct Adder
|
||||
|
||||
private:
|
||||
template <typename FromVectorType, typename ToVectorType, typename DeltaColumnType>
|
||||
void NO_INLINE vectorVector(const FromVectorType & vec_from, ToVectorType & vec_to, const DeltaColumnType & delta, const DateLUTImpl & time_zone, size_t size) const
|
||||
NO_INLINE NO_SANITIZE_UNDEFINED void vectorVector(const FromVectorType & vec_from, ToVectorType & vec_to, const DeltaColumnType & delta, const DateLUTImpl & time_zone, size_t size) const
|
||||
{
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
vec_to[i] = transform.execute(vec_from[i], delta.getData()[i], time_zone);
|
||||
}
|
||||
|
||||
template <typename FromType, typename ToVectorType, typename DeltaColumnType>
|
||||
void NO_INLINE constantVector(const FromType & from, ToVectorType & vec_to, const DeltaColumnType & delta, const DateLUTImpl & time_zone, size_t size) const
|
||||
NO_INLINE NO_SANITIZE_UNDEFINED void constantVector(const FromType & from, ToVectorType & vec_to, const DeltaColumnType & delta, const DateLUTImpl & time_zone, size_t size) const
|
||||
{
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
vec_to[i] = transform.execute(from, delta.getData()[i], time_zone);
|
||||
|
@ -6,3 +6,10 @@ SELECT addHours(toDateTime('2021-01-01 00:00:00', 'GMT'), 9223372036854775808);
|
||||
2021-01-01 00:00:00
|
||||
SELECT addWeeks(toDateTime('2021-01-01 00:00:00', 'GMT'), 9223372036854775808);
|
||||
2021-01-01 00:00:00
|
||||
-- tests with inf
|
||||
SELECT addMinutes(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
2021-01-01 00:00:00
|
||||
SELECT addHours(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
2021-01-01 00:00:00
|
||||
SELECT addWeeks(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
2021-01-01 00:00:00
|
||||
|
@ -3,3 +3,7 @@
|
||||
SELECT addMinutes(toDateTime('2021-01-01 00:00:00', 'GMT'), 9223372036854775808);
|
||||
SELECT addHours(toDateTime('2021-01-01 00:00:00', 'GMT'), 9223372036854775808);
|
||||
SELECT addWeeks(toDateTime('2021-01-01 00:00:00', 'GMT'), 9223372036854775808);
|
||||
-- tests with inf
|
||||
SELECT addMinutes(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
SELECT addHours(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
SELECT addWeeks(toDateTime('2021-01-01 00:00:00', 'GMT'), inf);
|
||||
|
Loading…
Reference in New Issue
Block a user