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

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)
Date: 2025-02-05 17:09:17
Message-ID: cb8484eb-4d73-46d8-9a5f-a72cf896dd0f@tantorlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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'll look into this issue further.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-02-05 17:17:37 Re: Remove unnecessary static specifier
Previous Message Daniel Gustafsson 2025-02-05 17:07:50 Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)