query, report https://gist.github.com/alesapin/c91d9ffd65471c4d8b595219a26a601a.
Full report
https://clickhouse-test-reports.s3.yandex.net/19412/cc2788af881c96701076b366259bc99525d926b1/fuzzer_asan/report.html#fail1
{
        return fromDayNum(toFirstDayNumOfQuarter(t));
    }
    
    inline time_t toFirstDayOfYear(time_t t) const
    {
        return lut[years_lut[lut[findIndex(t)].year - DATE_LUT_MIN_YEAR]].date;
    }
    inline DayNum toFirstDayNumOfYear(DayNum d) const
    {
        return years_lut[lut[d].year - DATE_LUT_MIN_YEAR];
    }
    inline DayNum toFirstDayNumOfYear(time_t t) const
    {
        return toFirstDayNumOfYear(toDayNum(t));
    }
    inline time_t toFirstDayOfNextMonth(time_t t) const
    {
        DayNum index = findIndex(t);
        index += 32 - lut[index].day_of_month;
        return lut[index - (lut[index].day_of_month - 1)].date;
    }
    inline time_t toFirstDayOfPrevMonth(time_t t) const
    {
        DayNum index = findIndex(t);
        index -= lut[index].day_of_month;
        return lut[index - (lut[index].day_of_month - 1)].date;
    }
    inline UInt8 daysInMonth(DayNum d) const