pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pm91.arapov@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL
Date: Fri, 14 Mar 2025 10:04:59 -0400
Message-ID: <3051193.1741961099@sss.pgh.pa.us> (raw)
In-Reply-To: <A664B6DF-7D34-4004-AC89-66B1517B3301@yesql.se>
References: <18845-582c6e10247377ec@postgresql.org>
	<A664B6DF-7D34-4004-AC89-66B1517B3301@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> Why would we want FATAL here?  Wouldn't it be better to return false like how
> other check_ functions already do?

Indeed.  Also, a quick survey shows a lot of inconsistency in
guc_malloc callers --- some are lazy and just use ERROR rather
than LOG-and-return.  That's probably all right for PGC_POSTMASTER
variables (since there's no chance of continuing anyway) but
perhaps it's worth improving elsewhere.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <3051193.1741961099@sss.pgh.pa.us>
Permalink:  ../3051193.1741961099@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3051193.1741961099@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, daniel@yesql.se, pm91.arapov@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18845: DEREF_OF_NULL.RET guc_malloc possibly returns NULL
  In-Reply-To: <3051193.1741961099@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