Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)
Дата
Msg-id CAEudQApjXyvo3xx9Lyig=iJKmFDMyrQOVUJKiZ7UVTACHxORfw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)  (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>)
Список pgsql-hackers
Em qua., 5 de fev. de 2025 às 14:09, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com> escreveu:
But what should we do if cheapest == NULL further? Should we return NULL
of get_cheapest_parameterized_child_path() function?

If it is, we should write it like this:

if (cheapset == NULL || bms(PATH_REQ_OUTER(cheapset), required_outer))
     return cheapest;
 
I think no in this case.
If cheapset is NULL, the logic is to continue the find.
What cannot happen is passing a null pointer to bms(PATH_REQ_OUTER.

best regards,
Ranier Vilela

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