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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: dan-eli@mail.ru
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-04-10T18:04:39Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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