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-08T16:31:53Z
Lists: pgsql-hackers
I wrote: > While this is sufficient to make the problem go away, I'm > inclined to apply both changesets. Even if it accidentally > works right now to have later backrefs consult the outer s/s2 > state pair rather than the original pair, that seems far too > convoluted and bug-prone. The outer states should be strictly > the concern of the iteration setup logic in the outer invocation > of parseqatom. > (I'm sort of wondering now whether the outer s/s2 states are > even really necessary anymore ... maybe Spencer put those in > as a way of preventing some prehistoric version of this bug. > But I'm not excited about messing with that right now.) I realized that the earlier patch is actually a bad idea, because it breaks the possibility of updating the subre to mark it as being referenced by a later backref, as the REG_NOSUB patch needs to do. However, on closer study, the outer s/s2 states being added by the "prepare a general-purpose state skeleton" stanza really are duplicative of the ones we already made for a parenthesized atom, so we can just get rid of them. Done that way. regards, tom lane
Commits
-
Check the size in COPY_POINTER_FIELD
- c1132aae336c 15.0 cited
-
Rethink regexp engine's backref-related compilation state.
- 5227d9989672 14.0 landed
- 00116dee5ad4 15.0 landed
-
Fix use-after-free issue in regexp engine.
- f42ea8350db2 14.0 landed
- cc1868799c83 15.0 landed
-
Make regexp engine's backref-related compilation state more bulletproof.
- cb76fbd7ec87 15.0 landed
- 5e6ad63c6db7 14.0 landed
-
Really fix the ambiguity in REFRESH MATERIALIZED VIEW CONCURRENTLY.
- ba9f665a4413 13.4 cited
-
Avoid generating extra subre tree nodes for capturing parentheses.
- ea1268f6301c 14.0 cited