Re: Assert triggered during RE_compile_and_cache

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-08-05T23:16:22Z
Lists: pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> I have now found lots of cases of this failure.  I *believe* the backreference is always greater than 1, and it is always in a capture group which then has the {0} or {0,0} applied to it.

Hm.  I thought that this might be an old issue, but I'm not seeing the
crash in pre-v14 branches.  That means it's some bug introduced in
the performance improvements I did a few months ago.  Open item added.

			regards, tom lane



Commits

  1. Check the size in COPY_POINTER_FIELD

  2. Rethink regexp engine's backref-related compilation state.

  3. Fix use-after-free issue in regexp engine.

  4. Make regexp engine's backref-related compilation state more bulletproof.

  5. Really fix the ambiguity in REFRESH MATERIALIZED VIEW CONCURRENTLY.

  6. Avoid generating extra subre tree nodes for capturing parentheses.