[9.2] crash on regex

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [9.2] crash on regex
Date: 2012-05-24 14:16:36
Message-ID: CACMqXCLCviziREoqw=y=1Q4WZvf=WXHddqcqVckFxC-w3E7OiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2012-05-24 14:19:18 Re: [RFC] Interface of Row Level Security
Previous Message Sandro Santilli 2012-05-24 14:14:10 Re: Interrupting long external library calls