pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Binderman <dcb314@hotmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity check after use ?
Date: Fri, 06 Oct 2017 12:40:04 -0400
Message-ID: <9087.1507308004@sss.pgh.pa.us> (raw)
In-Reply-To: <HE1PR0802MB2331A1955CFC7D1D2A6338F19C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
References: <HE1PR0802MB2331A1955CFC7D1D2A6338F19C710@HE1PR0802MB2331.eurprd08.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

David Binderman <dcb314@hotmail.com> writes:
> postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84]: (style) Array index 'j' is used before limits check.

Hmm, this code is ifdef'd out as of v10, so I'm not sure why your
tool paid any attention to it.

Since it's not used, and hasn't been used in decades, and has got more
bugs than just this stylistic one (in particular, even if we fixed that
innermost loop, the next line would still access the undefined select_list
value; plus I think it will fail badly in the event that the "make a list
of selected cities" loop picks the same "pos" more than once),
I'm disinclined to spend any effort on fixing it.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <9087.1507308004@sss.pgh.pa.us>
Permalink:  ../9087.1507308004@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9087.1507308004@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 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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dcb314@hotmail.com
  Subject: Re: postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity check after use ?
  In-Reply-To: <9087.1507308004@sss.pgh.pa.us>
  References: <HE1PR0802MB2331A1955CFC7D1D2A6338F19C710@HE1PR0802MB2331.eurprd08.prod.outlook.com> <9087.1507308004@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