Re: ARRNELEMS Out-of-bounds possible errors

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ARRNELEMS Out-of-bounds possible errors
Дата
Msg-id 2919523.1671897927@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ARRNELEMS Out-of-bounds possible errors  (Nikita Malakhov <hukutoc@gmail.com>)
Ответы Re: ARRNELEMS Out-of-bounds possible errors  (Nikita Malakhov <hukutoc@gmail.com>)
Список pgsql-hackers
Nikita Malakhov <hukutoc@gmail.com> writes:
> Even with null context it does not turn to ereport, and returns dummy value

Read the code.  ArrayGetNItems passes NULL for escontext, therefore
if there's a problem the ereturn calls in ArrayGetNItemsSafe will
throw error, *not* return -1.

Not sure how we could persuade Coverity of that, though,
if it fails to understand that for itself.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Error-safe user functions
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Error-safe user functions