Re: [BUGS] to_tsquery stack overflow

2007-08-30 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > Actually, the right way to fix that is of course to call > check_stack_depth() in makepol and TS_execute. Done. That is, I did it in HEAD's integrated tsearch code. I suppose the same hazard exists in all back-branch contrib/tsearch2 versions ..

Re: [BUGS] to_tsquery stack overflow

2007-08-30 Thread Tom Lane
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > The problem seems to be unbounded recursion in the makepol function that > converts the input query from infix to polish notation. An easy fix > would be to just add a level parameter to makepol that's incremented on > each recursion, and throw an

Re: [BUGS] to_tsquery stack overflow

2007-08-30 Thread Heikki Linnakangas
Heikki Linnakangas wrote: > Passing a query with enough nested parenthesis in it causes a segfault. > Attached is a handy little program to generate such a query, the actual > query was too big to get through to the list. > > The problem seems to be unbounded recursion in the makepol function that

[BUGS] to_tsquery stack overflow

2007-08-30 Thread Heikki Linnakangas
Passing a query with enough nested parenthesis in it causes a segfault. Attached is a handy little program to generate such a query, the actual query was too big to get through to the list. The problem seems to be unbounded recursion in the makepol function that converts the input query from infix