query, report https://gist.github.com/alesapin/c91d9ffd65471c4d8b595219a26a601a.
Full report
https://clickhouse-test-reports.s3.yandex.net/19412/cc2788af881c96701076b366259bc99525d926b1/fuzzer_asan/report.html#fail1
{
        if (days == 1)
            return toDate(d);
        return lut[d / days * days].date;
    }
    inline time_t toStartOfHourInterval(time_t t, UInt64 hours) const
    {
        if (hours == 1)
            return toStartOfHour(t);
        UInt64 seconds = hours * 3600;
        t = t / seconds * seconds;
        if (offset_is_whole_number_of_hours_everytime)
            return t;
        return toStartOfHour(t);
    }
    inline time_t toStartOfMinuteInterval(time_t t, UInt64 minutes) const
    {
        if (minutes == 1)
            return toStartOfMinute(t);
        UInt64 seconds = 60 * minutes;
        return t / seconds * seconds;
    }
    inline time_t toStartOfSecondInterval(time_t t, UInt64 seconds) const
    {
        if (seconds == 1)
            return t;
        return t / seconds * seconds;
    }
    
    inline DayNum makeDayNum(UInt16 year, UInt8 month, UInt8 day_of_month) const