Re: BUG #18910: DEREF_OF_NULL.RET Pointer, returned from function 'palloc0' at simplehash.h:1080, may be NULL
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: gorcom2012@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-05-05T14:43:07Z
Lists: pgsql-bugs
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