Re: hash_create(nelem = 0) does invalid memory accesses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: hash_create(nelem = 0) does invalid memory accesses
Дата
Msg-id 11967.1475019019@sss.pgh.pa.us
обсуждение исходный текст
Ответ на hash_create(nelem = 0) does invalid memory accesses  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> debugging a citus valgrind bleat I noticed that hash_create() accesses
> the result of palloc(0) as an hash element:
> Do we consider this an API usage error that we want to fix?

I think Assert(nelem > 0) would be an appropriate response.
There are probably issues in sizing the hashtable quite aside
from this one.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: LLVM Address Sanitizer (ASAN) and valgrind support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LLVM Address Sanitizer (ASAN) and valgrind support