Re: [9.2] crash on regex

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: [9.2] crash on regex
Дата
Msg-id CAA-aLv66p6zdNChsjHZWmZjnXGheJt3Oqewi0JjW_3YLAXsB=w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [9.2] crash on regex  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [9.2] crash on regex  (Thom Brown <thom@linux.com>)
Список pgsql-hackers
On 24 May 2012 16:08, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, May 24, 2012 at 10:16 AM, Marko Kreen <markokr@gmail.com> wrote:
>> Following query crashes backend on 9.2:
>>
>>  select substring('asd TO foo' from ' TO (([a-z0-9._]+|"([^"]+|"")+")+)');
>
> I spent some time trying to reduce this to the simplest case that
> still causes a crash, and came up with this:
>
> select substring('a' from '((a))+');

It appears to occur with any quantifier attached to a group that is
more than 1 level deep with nothing between the groups, such as
((a))?, ((a))*, ((a)){1,4}, (((a)))+

Or if the quantifier is the only additional thing between the groups,
such as ((a)+)

But when breaking the groups up, it's fine, so this works: ((a)b)+

--
Thom


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Creating multiple indexes in one table scan.
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: Creating multiple indexes in one table scan.