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

From Marko Kreen
Subject [9.2] crash on regex
Date
Msg-id CACMqXCLCviziREoqw=y=1Q4WZvf=WXHddqcqVckFxC-w3E7OiA@mail.gmail.com
Whole thread Raw
Responses Re: [9.2] crash on regex
List pgsql-hackers
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  ExecMakeFunctionResult (fcache=0xffffffff, econtext=0x953f3e8,
isNull=0xbffb8d1f "\b", isDone=0x0) at execQual.c:1833
1833                    *isNull = fcinfo->isnull;
(gdb) bt
#0  ExecMakeFunctionResult (fcache=0xffffffff, econtext=0x953f3e8,
isNull=0xbffb8d1f "\b", isDone=0x0) at execQual.c:1833
#1  0x08203104 in ExecEvalExprSwitchContext (expression=0x953ef60,
econtext=0x953f3e8, isNull=0xbffb8d1f "\b", isDone=0x0) at
execQual.c:4187
#2  0x082844d7 in evaluate_expr (expr=<value optimized out>,
result_type=25, result_typmod=<value optimized out>,
result_collation=100) at clauses.c:4408
...

-- 
marko


pgsql-hackers by date:

Previous
From: Sandro Santilli
Date:
Subject: Re: Interrupting long external library calls
Next
From: Kohei KaiGai
Date:
Subject: Re: [RFC] Interface of Row Level Security