Re: Fix last unitialized memory warning

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Fix last unitialized memory warning
Дата
Msg-id 20230706191526.h4hpb26gnmzezpmp@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Fix last unitialized memory warning  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
Hi,

On 2023-07-06 10:21:44 +0200, Peter Eisentraut wrote:
> On 05.07.23 23:06, Tristan Partin wrote:
> > Thanks for following up. My system is Fedora 38. I can confirm this is
> > still happening on master.
> > 
> > $ gcc --version
> > gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
> > Copyright (C) 2023 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > $ meson setup build --buildtype=release
> 
> This buildtype turns on -O3 warnings.  We have usually opted against chasing
> warnings in -O3 level because there are often some false-positive
> uninitialized variable warnings with every new compiler.

OTOH, -O3 is substantially faster IME in cpu bound tests than -O2. It doesn't
seem wise to me for the project to basically say that that's not advisable due
to the level of warnings created.

I've also found bugs with -O3 that -O2 didn't find. And often -O3 warnings end
up showing up with -O2 a compiler major version or three down the line, so
it's often just deferring work.

Greetings,

Andres Freund



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

Предыдущее
От: Gurjeet Singh
Дата:
Сообщение: Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: [PATCH] Add GitLab CI to PostgreSQL