Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior
Дата
Msg-id CAH2-Wzn8oEs+1NgubAOZzbM4rNOYak87D6cOo6SN8EH1zYiWPQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior  (Andres Freund <andres@anarazel.de>)
Ответы Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior  (Andres Freund <andres@anarazel.de>)
Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
On Mon, Aug 31, 2020 at 11:42 AM Andres Freund <andres@anarazel.de> wrote:
> Unsigned integer overflow is well defined in the standard. So I don't understand what this is purporting to warn
about.

Presumably it's simply warning that the value -4294901760 (i.e. the
result of 3 - 4294901763) cannot be faithfully represented as an
unsigned int. This is true, of course. It's just not relevant.

I'm pretty sure that UBSan does not actually state that this is
undefined behavior. At least Ranier's sample output didn't seem to
indicate it.

-- 
Peter Geoghegan



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

Предыдущее
От: Victor Spirin
Дата:
Сообщение: Re: Sometimes the output to the stdout in Windows disappears
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Boundary value check in lazy_tid_reaped()