From: Tom Lane <tgl@sss.pgh.pa.us>
To: dcb314@hotmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19066: postgresql-18.0/src/backend/optimizer/geqo/geqo_ox2.c:86: Array index check in wrong place ?
Date: Fri, 26 Sep 2025 10:53:26 -0400
Message-ID: <4059820.1758898406@sss.pgh.pa.us> (raw)
In-Reply-To: <19066-53bfa81d53f11b75@postgresql.org>
References: <19066-53bfa81d53f11b75@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Static analyser cppcheck says:
> postgresql-18.0/src/backend/optimizer/geqo/geqo_ox2.c:86:22: style: Array
> index 'j' is used before limits check. [arrayIndexThenCheck]
Did your static analyzer not notice that this dead code is
not even compiled? I don't have a lot of faith in analyzers
that ignore #ifdefs.
(It's fair to ask why we haven't removed this code altogether
... laziness I guess, or waiting for something better than
GEQO to come along. But expending effort on fixing it
is definitely not in the cards.)
regards, tom lane
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, dcb314@hotmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19066: postgresql-18.0/src/backend/optimizer/geqo/geqo_ox2.c:86: Array index check in wrong place ?
In-Reply-To: <4059820.1758898406@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