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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: dhyan(at)nataraj(dot)su
Subject: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"
Date: 2024-11-14 12:29:12
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18708
Logged by: Nikolay Shaplov (PostgresPro)
Email address: dhyan(at)nataraj(dot)su
PostgreSQL version: 16.4
Operating system: Debian 12
Description:

Hi!

We've found a bug:

If you run

SELECT '' ~ '(?:[^\d\D]){0}';

it will assert with "lp->nouts == 0 && rp->nins == 0"

This behavior have been introduced in 2a0af7fe460 commit.

This bug have been found while fuzzing jsonpath_in function, and then
narrowed down to regex problem. Thanks to Andrey Bille for help with
narrowing sample down and finding commit that caused the problem.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message 2024-11-14 12:49:26 Sorting Discrepancy in PostgreSQL 14.13
Previous Message Chirag Patel 2024-11-14 10:37:04 Export PostgreSQL database into mysql database