pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Take a little more care in set_backtrace().
Date: Sun, 03 Aug 2025 17:01:59 +0000
Message-ID: <E1uic5u-000ZA6-2K@gemulon.postgresql.org> (raw)

Take a little more care in set_backtrace().

Coverity complained that the "errtrace" string is leaked if we return
early because backtrace_symbols fails.  Another criticism that could
be leveled at this is that not providing any hint of what happened is
user-unfriendly.  Fix that.

The odds of a leak here are small, and typically it wouldn't matter
anyway since the leak will be in ErrorContext which will soon get
reset.  So I'm not feeling a need to back-patch.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5c8eda1f72a2b0a8c48ada9b872eb5ef581f7c81

Modified Files
--------------
src/backend/utils/error/elog.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)



Message-ID: <E1uic5u-000ZA6-2K@gemulon.postgresql.org>
Permalink:  ../E1uic5u-000ZA6-2K@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uic5u-000ZA6-2K@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Take a little more care in set_backtrace().
  In-Reply-To: <E1uic5u-000ZA6-2K@gemulon.postgresql.org>

* 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