Set of patch to address several Coverity issues

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Set of patch to address several Coverity issues
Дата
Msg-id CAB7nPqRqip_N_FnBgadnc_MY_SrFBf0gW2W7HGHLOK_wyc_UiA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Set of patch to address several Coverity issues  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi all,

As there have been complaints that it was hard to follow all the small
patches I have sent to fix the issues related to Coverity, here they
are gathered with patches for each one of them:
1) Missing return value checks in jsonfuncs.c, fixed by 0001 (send
here previously =>
CAB7nPqQcj3hU9P7a6VUHoMepJkOYQrjXnT1g2f7Qy_CQ0Q8G_g@mail.gmail.com)
 JsonbIteratorNext is missing a set of (void) in front of its calls.
2) Potential pointer dereference in plperl.c, fixed by 0002 (sent
previously here =>
CAB7nPqRBCWAXTLw0yBR=BK94cRYXU8TWVxGyYoxautw08OKeXw@mail.gmail.com).
This is related to a change done by transforms. In short,
plperl_call_perl_func@plperl.c will have a pointer dereference if
desc->arg_arraytype[i] is InvalidOid. And AFAIK,
fcinfo->flinfo->fn_oid can be InvalidOid in this code path.
3) visibilitymap_truncate and FreeSpaceMapTruncateRel are doing a
NULL-pointer check on rel->rd_smgr but it has been dereferenced in all
the code paths leading to those checks. See 0003. For code readability
mainly.
4) Return result of timestamp2tm is not checked 2 times in
GetCurrentDateTime and GetCurrentTimeUsec, while all the other 40
calls of this function do sanity checks. Returning
ERRCODE_DATETIME_VALUE_OUT_OF_RANGE in case of an error would be good
for consistency. See 0004. (issue reported previously here
CAB7nPqRSk=J8eUdd55fL-w+k=8sDTHLVBt-cgG9jWN=VO2ogBQ@mail.gmail.com)

Each issue is independent, please feel free to comment.
Regards,
--
Michael

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Memory Accounting v11
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: RFC: replace pg_stat_activity.waiting with something more descriptive