Re: BUG #18692: Segmentation fault when extending a varchar column with a gist index with custom signal length

Tender Wang <tndrwang@gmail.com>

From: Tender Wang <tndrwang@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, nicolas.maus@bertelsmann.de, pgsql-bugs@lists.postgresql.org
Date: 2024-11-07T06:47:42Z
Lists: pgsql-bugs

Attachments

Hi all,

Alexander Korotkov <aekorotkov@gmail.com> 于2024年11月7日周四 01:15写道:

> On Wed, Nov 6, 2024 at 7:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > PG Bug reporting form <noreply@postgresql.org> writes:
> > > When extending a varchar column with a gist index with a custom signal
> > > length the Postgres server crashes with a segmentation fault.
> >
> > What this shows is that CompareOpclassOptions has never been tested
> > at all except with null inputs.  It's trying to call array_eq
> > without providing an FmgrInfo.
>
>
Based on Tom's analysis, I  provide a POC patch. I'm not sure if it is right
to use DEFAULT_COLLATION_OID in the patch.

-- 
Thanks,
Tender Wang

Commits

  1. Fix arrays comparison in CompareOpclassOptions()