Re: ARRNELEMS Out-of-bounds possible errors

Поиск
Список
Период
Сортировка
Искать
От
Kyotaro Horiguchi
Тема
Re: ARRNELEMS Out-of-bounds possible errors
Дата
Msg-id
20221223.173755.439875412892422008.horikyota.ntt@gmail.com
Ответ на
Список
Дерево обсуждения
ARRNELEMS Out-of-bounds possible errors Ranier Vilela <ranier.vf@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Nikita Malakhov <hukutoc@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Tom Lane <tgl@sss.pgh.pa.us>
Re: ARRNELEMS Out-of-bounds possible errors Nikita Malakhov <hukutoc@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Ranier Vilela <ranier.vf@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Nikita Malakhov <hukutoc@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Ranier Vilela <ranier.vf@gmail.com>
Re: ARRNELEMS Out-of-bounds possible errors Nikita Malakhov <hukutoc@gmail.com>
At Thu, 22 Dec 2022 12:35:58 -0300, Ranier Vilela  wrote in 
> Hi.
> 
> Per Coverity.
> 
> The commit ccff2d2
> ,
> changed the behavior function ArrayGetNItems,
> with the introduction of the function ArrayGetNItemsSafe.
> 
> Now ArrayGetNItems may return -1, according to the comment.
> " instead of throwing an exception. -1 is returned after an error."

If I'm reading the code correctly, it's the definition of
ArrayGetNItems*Safe*. ArrayGetNItems() calls that function with a NULL
escontext and the NULL turns ereturn() into ereport(). That doesn't
seem to be changed by the commit.

Of course teaching Coverity not to issue the false warnings would be
another actual issue that we should do, maybe.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
Сообщение: Re: File API cleanup
От: Kyotaro Horiguchi
Дата:
FAQ