Re: BUG #18200: Undefined behaviour in interval_div

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: BUG #18200: Undefined behaviour in interval_div
Дата
Msg-id CAEZATCXodYQOFTaCmgs7aw25EgQi8ozsEyzJh9PqGpHfYkdgyg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18200: Undefined behaviour in interval_div  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: BUG #18200: Undefined behaviour in interval_div  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-bugs
On Wed, 15 Nov 2023 at 17:23, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> How about the attached fix?
>

I don't think that's sufficient -- interval_div() should have all the
same overflow protections that interval_mul() has, since they're
basically doing the same thing.

However, I don't think that's sufficient either -- looking at
interval_mul(), there is nothing to prevent integer overflow when
cascading down, so additional checks are needed there too (in both
functions).

Regards,
Dean



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Halil Han Badem
Дата:
Сообщение: Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows