Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15150: Reading uninitialised value in NISortAffixes (tsearch/spell.c)
Дата
Msg-id 16385.1523641860@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15150: Reading uninitialised value in NISortAffixes(tsearch/spell.c)  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Ответы Re: BUG #15150: Reading uninitialised value in NISortAffixes(tsearch/spell.c)  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Список pgsql-bugs
Arthur Zakirov <a.zakirov@postgrespro.ru> writes:
> On Thu, Apr 12, 2018 at 06:14:03PM -0400, Tom Lane wrote:
>> But I see from the code coverage report that this bit is unexercised
>> in the regression tests.  Any chance of getting a test that covers
>> this?  I'm worried that this means we also lack any coverage of
>> cases where the CompoundAffix array has more than one entry.

> I attached the patch. It fixes the following:
> - show an error if actual number of affix aliases is greater than
>   initial number. I wonder is it necessary. But I think it is better to
>   raise an error than crash, if you set wrong number for AF flag.

Good idea, but I tweaked the message wording a bit.

> The code coverage still isn't 100% for spell.c. But it is better than
> earlier.

Indeed.  Pushed, thanks!

            regards, tom lane


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

Предыдущее
От: Arthur Zakirov
Дата:
Сообщение: Re: BUG #15150: Reading uninitialised value in NISortAffixes(tsearch/spell.c)
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: BUG #15150: Reading uninitialised value in NISortAffixes(tsearch/spell.c)