Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)
Date: 2020-10-09 21:16:07
Message-ID: 20201009211607.GI19056@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Ranier Vilela (ranier(dot)vf(at)gmail(dot)com) wrote:
> Em sex., 9 de out. de 2020 às 18:02, Stephen Frost <sfrost(at)snowman(dot)net>
> escreveu:
> > As a side-note, this kind of further analysis and looking for other,
> > similar, cases that might be problematic is really helpful and important
> > to do whenever you come across a case like this, and will also lend a
> > bit more validation that this is really an issue and something we need
> > to look at and not a one-off mistake (which, as much as we'd like to
> > think we never make mistakes, isn't typically the case...).
> >
> Several places.
> TupIsNull it looks like a minefield...

Is it though? Tom already pointed out that the specific case you were
concerned about isn't an issue- I'd encourage you to go review the other
cases that I found and see if you can find any cases where it's actually
going to result in a crash.

If there is such a case, then perhaps we should consider changing
things, but if not, then perhaps there isn't any need to make a change.
I do wonder if maybe some of those cases don't acutally need the
TupIsNull() check at all as we could prove that it won't be by the time
we reach that point, but it depends- and requires more review.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-10-09 21:17:02 Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)
Previous Message Ranier Vilela 2020-10-09 21:09:40 Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)