Re: Assignment before assert

Поиск
Список
Период
Сортировка
Искать

Re: Assignment before assert

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 13 Feb 2025, at 18:08, Dmitry Koval  wrote:
> 
> Hi!
> Function EvalPlanQualFetchRowMark contains an assignment
> 
> ExecRowMark *erm = earm->rowmark;
> 
> before assert
> 
> Assert(earm != NULL);
> 
> Maybe these lines need to be swapped?

That does admittedly look a bit odd, that assertion can't be reached if earm is
null since we've already dereferenced it by then.  I'll have another look after
coffee but something along the lines of your patch looks right (or just remove
the Assertion perhaps).

--
Daniel Gustafsson



Re: Assignment before assert

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 14 Feb 2025, at 06:44, Michael Paquier  wrote:

> the proposed patch makes sense to me.

Committed, with a backpatch down to 13.

--
Daniel Gustafsson



FAQ