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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dan-eli(at)mail(dot)ru
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18891: /src/include/lib/simplehash.h possible palloc0 problems
Date: 2025-04-10 18:04:39
Message-ID: 537550.1744308279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2025-04-10 18:17:17 Re: BUG #18888: /src/interfaces/ecpg/preproc/descriptor.c possible NULL dereference
Previous Message Tom Lane 2025-04-10 18:02:22 Re: BUG #18890: /src/timezone/localtime.c condition always false