Re: [BUGS] postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity check after use ? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity check after use ?
Date
Msg-id 9087.1507308004@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity checkafter use ?  (David Binderman <dcb314@hotmail.com>)
List pgsql-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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] postgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ?
Next
From: "Hans Buschmann"
Date:
Subject: Re: [BUGS] BUG #14844: Failure/Duplicate key value with ALTER DATABASE set search_path