Re: [PATCH] Check for TupleTableSlot nullness before dereferencing

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [PATCH] Check for TupleTableSlot nullness before dereferencing
Дата
Msg-id FDD95AB2-17BF-4C52-A8A9-682115FB4684@yesql.se
обсуждение исходный текст
Ответы Re: [PATCH] Check for TupleTableSlot nullness before dereferencing
Список pgsql-hackers
> On 3 Oct 2024, at 09:47, Alexander Kuznetsov <kuznetsovam@altlinux.org> wrote:
>
> Hello everyone,
>
> I'd like to propose adding check for nullness of
> TupleTableSlot before dereferencing it in /src/backend/executor/nodeAgg.c
>
> It is done in the same manner other TupleTableSlots are checked,
> but was probably left unseen because slot1 and slot2 variables
> can be swapped during function execution.

From a quick reading we can only reach there after evaluating an expression, so
can it really be null though?  This code hasn't changed all that much since
2009, if there was a reachable segfault on a null pointer deref I have a
feeling we'd heard about it by now so some extra care seems warranted to ensure
it's not a static analyzer false positive.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления: