BUG #18869: /src/backend/optimizer/plan/createplan.c clause can be null if user isn't root

Started by PG Bug reporting formabout 1 year ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 18869
Logged by: Daniel Elishakov
Email address: dan-eli@mail.ru
PostgreSQL version: 17.4
Operating system: ubuntu 20.04
Description:

If root is NULL, pointer clause can also be NULL and then dereferenced at
createplan.c:5104 at if (IsA(clause, OpExpr)). I guess there should be a
check for NULL.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #18869: /src/backend/optimizer/plan/createplan.c clause can be null if user isn't root

PG Bug reporting form <noreply@postgresql.org> writes:

If root is NULL, pointer clause can also be NULL and then dereferenced at
createplan.c:5104 at if (IsA(clause, OpExpr)). I guess there should be a
check for NULL.

root would never be null here, and neither would the clause.

In general, we are not terribly interested in "bug reports" generated
by unsupported static analysis.

regards, tom lane