Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL
Дата
Msg-id 940274DD-0B6D-4BB7-B551-D24DADD254D8@yesql.se
обсуждение исходный текст
Ответ на Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
> On 14 Mar 2025, at 15:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> Why would we want FATAL here?  Wouldn't it be better to return false like how
>> other check_ functions already do?
>
> Indeed.  Also, a quick survey shows a lot of inconsistency in
> guc_malloc callers --- some are lazy and just use ERROR rather
> than LOG-and-return.  That's probably all right for PGC_POSTMASTER
> variables (since there's no chance of continuing anyway) but
> perhaps it's worth improving elsewhere.

I'll take a look at all the other callers when preparing a patch for this to
see if there are more cases which need updating.

--
Daniel Gustafsson




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