Re: Fix overflow hazard in interval rounding

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Fix overflow hazard in interval rounding
Дата
Msg-id 20240213191401.jjhsic7et4tiahjs@awork3.anarazel.de
обсуждение исходный текст
Ответ на Fix overflow hazard in interval rounding  (Joseph Koshakow <koshy44@gmail.com>)
Список pgsql-hackers
Hi,

On 2024-02-13 13:31:22 -0500, Joseph Koshakow wrote:
> Attached is a patch that fixes some overflow/underflow hazards that I
> discovered in the interval rounding code.

Random, mildly related thought: I wonder if it's time to, again, look at
enabling -ftrapv in assert enabled builds.  I had looked at that a few years
back, and fixed a number of instances, but not all I think. But I think we are
a lot closer to avoiding signed overflows everywhere, and it'd be nice to find
overflow hazards more easily. Many places are broken even with -fwrapv
semantics (which we don't have on all compilers!). Trapping on such overflows
makes it far easier to find problems with tools like sqlsmith.

Greetings,

Andres Freund



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: CI and test improvements
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: index prefetching