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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: dan-eli(at)mail(dot)ru
Subject: BUG #18891: /src/include/lib/simplehash.h possible palloc0 problems
Date: 2025-04-10 16:47:44
Message-ID: 18891-16499b7cbaf2661a@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18891
Logged by: Daniel Elishakov
Email address: dan-eli(at)mail(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-04-10 17:51:54 Re: BUG #18887: Inner join returns non-existent data.
Previous Message PG Bug reporting form 2025-04-10 16:44:55 BUG #18890: /src/timezone/localtime.c condition always false