Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+ - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+
Date
Msg-id 29257.1572727680@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+  (Arthur Zakirov <zaartur@gmail.com>)
Responses Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+
List pgsql-hackers
Arthur Zakirov <zaartur@gmail.com> writes:
> On 2019/10/13 10:26, Tomas Vondra wrote:
>> So I think we need some sort of cross-check here. We certainly need to
>> make NISortDictionary() check the affix value is within AffixData
>> bounds, and error out when the index is non-sensical (maybe negative
>> and/or exceeding nAffixData).

> I agree, I attached the patch which do this. I also added couple 
> asserts, tests and fixed condition in getAffixFlagSet():

> -        if (curaffix > 0 && curaffix <= Conf->nAffixData)
> +        if (curaffix > 0 && curaffix < Conf->nAffixData)

Looks reasonable to me, and we need to get something done before
the upcoming releases, so I pushed this.  Perhaps there's more
that could be done later.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: dropdb --force
Next
From: Pavel Stehule
Date:
Subject: Re: dropdb --force