Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"
Date
Msg-id 2745175.1731772978@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"
List pgsql-bugs
Alexander Lakhin <exclusion@gmail.com> writes:
> Please look at the hornet's failure on processing a test query added here:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hornet&dt=2024-11-15%2023%3A49%3A38

Hmm... for the archives' sake, that looks like

 select * from test_regex('[^\\d\\D]', '0123456789abc*', 'ILPE');
-                        test_regex
- --------------------------------------------------------
-  {0,REG_UBBS,REG_UNONPOSIX,REG_ULOCALE,REG_UIMPOSSIBLE}
- (1 row)
-
+ ERROR:  invalid regular expression: out of memory
  -- check char classes' handling of newlines

I'm not sure what to make of it.  That regex shouldn't consume very
much memory.  To confirm that, I stepped through it and found that
newstate() is reached 14 times and newarc() 35 times.  That's a
pretty tiny amount of memory, and there are other regexps in the
tests that are far larger.

Moreover, no other animal has shown this, including hornet itself
on the v16 branch.  (It's only run this test in v15 and v16 so far,
so that's not a lot of data points.)

I'm inclined to guess this was some weird momentary glitch.  If it
reproduces then I'll look closer.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Today's Postgres Releases break login roles
Next
From: Tom Lane
Date:
Subject: Re: Today's Postgres Releases break login roles