Re: [9.2] crash on regex - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [9.2] crash on regex
Date
Msg-id 26558.1337882199@sss.pgh.pa.us
Whole thread Raw
In response to Re: [9.2] crash on regex  (Thom Brown <thom@linux.com>)
List pgsql-hackers
Thom Brown <thom@linux.com> writes:
> Hmmm... curiously, lazy (non-greedy) quantifiers are stable, such as: ((a))*?

I've found it.  The triggering conditions are (1) more than one set of
capturing parens in a substring() pattern, and (2) at least one trial
midpoint failing in ccondissect() or one of its siblings.  That results
in zaptreesubs() trying to clear an array entry that isn't there...
trivial to fix fortunately.  So it's not so much what the quantifiers
are as whether the first attempted match succeeds.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Sergey Koposov
Date:
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Next
From: Peter Eisentraut
Date:
Subject: Re: shared_preload_libraries path