Crash with empty dictionary

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Crash with empty dictionary
Дата
Msg-id 46CB32E9.1040109@enterprisedb.com
обсуждение исходный текст
Ответы Re: Crash with empty dictionary
Список pgsql-hackers
I'm fooling around with tsearch, and bumped into a segfault, when using
a custom ispell dictionary with DictFile pointing to an empty file.
NISortDictionary assumes there's at least one word in the dictionary,
and crashes on line 941:

>     Conf->AffixData[1] = pstrdup(Conf->Spell[0]->p.flag);

I'm not sure if this is a sane way to set up a dictionary, but surely
seg faulting is not the right thing to do. Should we throw an error on
an empty dict file, or should we swallow it without crashing?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: A couple of tsearch loose ends
Следующее
От: Andrew Chernow
Дата:
Сообщение: PGparam extension version 0.4