Re: Missing checks when malloc returns NULL...

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: Missing checks when malloc returns NULL...
Дата
Msg-id 20160826153358.GA29981@e733
обсуждение исходный текст
Ответ на Missing checks when malloc returns NULL...  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Missing checks when malloc returns NULL...  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Hello, Michael.

Your patch [1] was marked as "Needs review" so I decided to take a look.

It looks good to me. However I found dozens of places in PostgreSQL code
that seem to have similar problem you are trying to fix [2]. As far as I
understand these are only places left that don't check malloc/realloc/
strdup return values properly. I thought maybe you will be willing to
fix they too so we could forget about this problem forever.

If not I will be happy to do it. However in this case we need someone
familiar with affected parts of the code who will be willing to re-check
a new patch since I'm not filling particularly confident about how
exactly errors should be handled in all these cases.

By the way maybe someone knows other procedures besides malloc, realloc
and strdup that require special attention?

[1] https://commitfest.postgresql.org/10/653/
[2] http://afiskon.ru/s/15/83287ef7d2_malloc.txt

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()
Следующее
От: Yury Zhuravlev
Дата:
Сообщение: Re: Why is a newly created index contains the invalidLSN?