Re: Assert triggered during RE_compile_and_cache

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert triggered during RE_compile_and_cache
Date: 2021-08-08 17:00:10
Message-ID: 9E6AF50A-61A8-4990-BFB1-868364900016@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Aug 8, 2021, at 9:31 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I realized that the earlier patch is actually a bad idea

Applying only your <fix-backref-corner-case-1.patch> to master, the following which did not crash begins to crash:

select regexp_split_to_array('rjgykkkk', '(?:(.))((\1\1.))');

It also changes the results for another one:

select regexp_split_to_array('jdpveoarcnsarcnsarcnszieqbqbqbqbiufdlywphbnrxtdoboouuzcqiqmenj', '()((.)){1}?\3?', 'itx');
- regexp_split_to_array
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- {"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""}
+ regexp_split_to_array
+------------------------------------------------------------------
+ {jdpveoarcnsarcnsarcnszieqbqbqbqbiufdlywphbnrxtdoboouuzcqiqmenj}

I'm not sure what *should* be returned here, only that it is a behavioral change.


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-08-08 17:04:38 Re: Another regexp performance improvement: skip useless paren-captures
Previous Message Tom Lane 2021-08-08 16:31:53 Re: Assert triggered during RE_compile_and_cache