Re: [HACKERS] [9.2] crash on regex

2012-05-24 Thread Tom Lane
Thom Brown 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.

Re: [HACKERS] [9.2] crash on regex

2012-05-24 Thread Tom Lane
Robert Haas writes: > On Thu, May 24, 2012 at 10:16 AM, Marko Kreen 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

Re: [HACKERS] [9.2] crash on regex

2012-05-24 Thread Thom Brown
On 24 May 2012 16:24, Thom Brown wrote: > On 24 May 2012 16:08, Robert Haas wrote: >> On Thu, May 24, 2012 at 10:16 AM, Marko Kreen wrote: >>> Following query crashes backend on 9.2: >>> >>>  select substring('asd TO foo' from ' TO (([a-z0-9._]+|"([^"]+|"")+")+)'); >> >> I spent some time trying

Re: [HACKERS] [9.2] crash on regex

2012-05-24 Thread Thom Brown
On 24 May 2012 16:08, Robert Haas wrote: > On Thu, May 24, 2012 at 10:16 AM, Marko Kreen 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

Re: [HACKERS] [9.2] crash on regex

2012-05-24 Thread Robert Haas
On Thu, May 24, 2012 at 10:16 AM, Marko Kreen 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 subs

[HACKERS] [9.2] crash on regex

2012-05-24 Thread Marko Kreen
Following query crashes backend on 9.2: select substring('asd TO foo' from ' TO (([a-z0-9._]+|"([^"]+|"")+")+)'); It is supposed to load potentially quoted table name from CREATE RULE definition. Works fine on 8.3 .. 9.1 Backtrace: Program terminated with signal 11, Segmentation fault. #0 Ex