pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Zakirov <zaartur@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org, Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+
Date: Sat, 02 Nov 2019 16:48:00 -0400
Message-ID: <29257.1572727680@sss.pgh.pa.us> (raw)
In-Reply-To: <3d98671e-f2ea-40ec-d0e7-d5c5cbb16ca3@gmail.com>
References: <20191013012610.2p2fp3zzpoav7jzf@development>
	<3d98671e-f2ea-40ec-d0e7-d5c5cbb16ca3@gmail.com>

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





view thread (5+ messages)  latest in thread

Message-ID: <29257.1572727680@sss.pgh.pa.us>
Permalink:  ../29257.1572727680@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29257.1572727680@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, zaartur@gmail.com, tomas.vondra@2ndquadrant.com, teodor@sigaev.ru
  Subject: Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+
  In-Reply-To: <29257.1572727680@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox