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: Suppress -Warray-bounds warning in 9.2's xlog.c.
Date: Mon, 13 Dec 2021 16:57:36 +0000
Message-ID: <E1mwods-0004qZ-3l@gemulon.postgresql.org> (raw)

Suppress -Warray-bounds warning in 9.2's xlog.c.

Late-model gcc delivers a confusing warning "'memcpy' offset [0, 63]
is out of the bounds [0, 0]" here, which turns out to be because it
thinks the "record" pointer might be NULL, which again is because
it doesn't know ereport(PANIC) won't return.  The least invasive
way to fix that is to insert a couple of abort() calls.  It's
surprising/fortunate that we don't have this issue in more places
... but this is the last remaining build warning with gcc 11.2.1,
so I'll settle for a narrow fix.

Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com

Branch
------
REL9_2_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/985c8de212faa5a4c983005d4192fb7e543cf5ab

Modified Files
--------------
src/backend/access/transam/xlog.c | 4 ++++
1 file changed, 4 insertions(+)



Message-ID: <E1mwods-0004qZ-3l@gemulon.postgresql.org>
Permalink:  ../E1mwods-0004qZ-3l@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mwods-0004qZ-3l@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Suppress -Warray-bounds warning in 9.2's xlog.c.
  In-Reply-To: <E1mwods-0004qZ-3l@gemulon.postgresql.org>
  References: <E1mwods-0004qZ-3l@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