BUG #18891: /src/include/lib/simplehash.h possible palloc0 problems

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

BUG #18891: /src/include/lib/simplehash.h possible palloc0 problems

От:
PG Bug reporting form <noreply@postgresql.org>
Дата:
The following bug has been logged on the website:

Bug reference:      18891
Logged by:          Daniel Elishakov
Email address:      dan-eli@mail.ru
PostgreSQL version: 17.4
Operating system:   Ubuntu 20.04
Description:        

On line 1080 there is an initiallization of array with the usage of palloc0.
On the server side there is no problem as the server version of palloc never
returns NULL. However simplehash is used in some utils: pg_dump,
pg_verifybackup, pg_rewind. It seems these utils use the frontend version of
palloc. Therefore it is required to add a NULL check if FRONTEND macro is
defined.

Re: BUG #18891: /src/include/lib/simplehash.h possible palloc0 problems

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
PG Bug reporting form  writes:
> On line 1080 there is an initiallization of array with the usage of palloc0.
> On the server side there is no problem as the server version of palloc never
> returns NULL. However simplehash is used in some utils: pg_dump,
> pg_verifybackup, pg_rewind. It seems these utils use the frontend version of
> palloc. Therefore it is required to add a NULL check if FRONTEND macro is
> defined.

Have you read the frontend version of palloc?

			regards, tom lane


FAQ