reallocing without oom check in pg_regress

Поиск
Список
Период
Сортировка
Искать

reallocing without oom check in pg_regress

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
In pg_regress we realloc() with the destination and source pointer being equal,
without checking for OOM.  While a fairly unlikely source of errors, is there a
reason not to use pg_realloc() there for hygiene?

--
Daniel Gustafsson		https://vmware.com/

Re: reallocing without oom check in pg_regress

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Daniel Gustafsson  writes:
> In pg_regress we realloc() with the destination and source pointer being equal,
> without checking for OOM.  While a fairly unlikely source of errors, is there a
> reason not to use pg_realloc() there for hygiene?

Yeah, looks like oversight to me.

			regards, tom lane


Re: reallocing without oom check in pg_regress

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 23 Feb 2022, at 23:05, Tom Lane  wrote:
> 
> Daniel Gustafsson  writes:
>> In pg_regress we realloc() with the destination and source pointer being equal,
>> without checking for OOM.  While a fairly unlikely source of errors, is there a
>> reason not to use pg_realloc() there for hygiene?
> 
> Yeah, looks like oversight to me.

Thanks for confirming, I've pushed this now after taking it for a spin on the
CI just in case.

--
Daniel Gustafsson		https://vmware.com/



FAQ