Re: Memory bug in dsnowball_lexize
От | Tom Lane |
---|---|
Тема | Re: Memory bug in dsnowball_lexize |
Дата | |
Msg-id | 13263.1558627582@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Memory bug in dsnowball_lexize (Mark Dilger <hornschnorter@gmail.com>) |
Список | pgsql-hackers |
Mark Dilger <hornschnorter@gmail.com> writes: > On Thu, May 23, 2019 at 8:46 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Mark Dilger <hornschnorter@gmail.com> writes: >>> In src/backend/snowball/dict_snowball.c, 'dsnowball_lexize' >>> calls 'SN_set_current' and ignores the return value, thereby >>> failing to notice the error, if any. >> Hm. This seems like possibly a bug, in that even if we cover the >> malloc issue, there's no API guarantee that OOM is the only possible >> reason for reporting failure. > Ok, that sounds fair. Since the memory is being palloc'd, I suppose > it would be safe to just ereport when the return value is -1? Yeah ... I'd just make it an elog really, since whatever it is would presumably not be a user-facing error. >> Fair complaint --- do you want to propose some new wording that >> references what header.h does? > Perhaps something along these lines? Seems reasonable, please include in patch covering the other thing. regards, tom lane
В списке pgsql-hackers по дате отправления: