pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: gorcom2012@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18910: DEREF_OF_NULL.RET Pointer, returned from function 'palloc0' at simplehash.h:1080, may be NULL
Date: Mon, 05 May 2025 10:43:07 -0400
Message-ID: <2643584.1746456187@sss.pgh.pa.us> (raw)
In-Reply-To: <18910-d074a42367253385@postgresql.org>
References: <18910-d074a42367253385@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> In the file /src/include/lib/simplehash.h, within the SH_STAT() function,
> there is a call to palloc0() that may return NULL:
> uint32 *collisions = (uint32 *) palloc0(tb->size * sizeof(uint32));

palloc and its variants do not return NULL, unless you specify
MCXT_ALLOC_NO_OOM, which this call does not.

			regards, tom lane





view thread (2+ messages)

Message-ID: <2643584.1746456187@sss.pgh.pa.us>
Permalink:  ../2643584.1746456187@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2643584.1746456187@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gorcom2012@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18910: DEREF_OF_NULL.RET Pointer, returned from function 'palloc0' at simplehash.h:1080, may be NULL
  In-Reply-To: <2643584.1746456187@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox