ts_headline() dumps core - Mailing list pgsql-hackers
| From | Yoshiyuki Asaba |
|---|---|
| Subject | ts_headline() dumps core |
| Date | |
| Msg-id | 20080116.012140.193690958.y-asaba@sraoss.co.jp Whole thread Raw |
| Responses |
Re: ts_headline() dumps core
|
| List | pgsql-hackers |
Hi,
I found a bug in ts_headline(). Here is a reproducible sql.
-- sql ---
SELECT substring(version(), 0, 20);
CREATE TEXT SEARCH PARSER dummy_parser ( START = prsd_start, GETTOKEN = prsd_nexttoken, END = prsd_end,
--
-- HEADLINE = prsd_headline,
--
LEXTYPES = prsd_lextype
);
CREATE TEXT SEARCH CONFIGURATION pg_catalog.dummy (PARSER = dummy_parser);
SELECT ts_headline('dummy', 'test', 'test'::tsquery);
----------
-- result -- substring
---------------------PostgreSQL 8.3RC1 o
(1 row)
CREATE TEXT SEARCH PARSER
CREATE TEXT SEARCH CONFIGURATION
psql:sql:14: server closed the connection unexpectedly This probably means the server terminated abnormally
beforeor while processing the request.
psql:sql:14: connection to server was lost
------------
This is the stack trace.
-----
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x08321a2c in FunctionCall3 (flinfo=0x84f66e8, arg1=3219808336, arg2=0, arg3=139282728) at fmgr.c:1304
#2 0x0825a6c4 in ts_headline_byid_opt (fcinfo=0xbfea60b0) at wparser.c:323
#3 0x083212c4 in DirectFunctionCall3 (func=0x825a57e <ts_headline_byid_opt>, arg1=32776, arg2=139283056,
arg3=139282728)at fmgr.c:1030
#4 0x0825a780 in ts_headline_byid (fcinfo=0xbfea6318) at wparser.c:344
#5 0x08199579 in ExecMakeFunctionResult (fcache=0x84efe98, econtext=0x84efe10, isNull=0x84f0470 "", isDone=0x84f04c8)
atexecQual.c:1351
#6 0x08199daa in ExecEvalFunc (fcache=0x84efe98, econtext=0x84efe10, isNull=0x84f0470 "", isDone=0x84f04c8) at
execQual.c:1753
#7 0x0819f3c3 in ExecTargetList (targetlist=0x84f0340, econtext=0x84efe10, values=0x84f0460, isnull=0x84f0470 "",
itemIsDone=0x84f04c8, isDone=0xbfea6630) at execQual.c:4601
#8 0x0819f7d6 in ExecProject (projInfo=0x84f0480, isDone=0xbfea6630) at execQual.c:4802
#9 0x081ac85a in ExecResult (node=0x84efd88) at nodeResult.c:155
#10 0x08197195 in ExecProcNode (node=0x84efd88) at execProcnode.c:319
#11 0x08194efe in ExecutePlan (estate=0x84efbf8, planstate=0x84efd88, operation=CMD_SELECT, numberTuples=0,
direction=ForwardScanDirection, dest=0x84d4bf8) at execMain.c:1233
#12 0x08193b24 in ExecutorRun (queryDesc=0x84d82d8, direction=ForwardScanDirection, count=0) at execMain.c:267
#13 0x08254634 in PortalRunSelect (portal=0x84e2bd0, forward=1 '\001', count=0, dest=0x84d4bf8) at pquery.c:943
#14 0x0825433e in PortalRun (portal=0x84e2bd0, count=2147483647, isTopLevel=1 '\001', dest=0x84d4bf8,
altdest=0x84d4bf8, completionTag=0xbfea68fa "") at pquery.c:769
#15 0x0824eddf in exec_simple_query (query_string=0x84d3aa0 "SELECT ts_headline('dummy', 'test', 'test'::tsquery);") at
postgres.c:963
#16 0x08252b69 in PostgresMain (argc=4, argv=0x8458e58, username=0x8458e38 "y-asaba") at postgres.c:3535
#17 0x0821db22 in BackendRun (port=0x846c918) at postmaster.c:3207
#18 0x0821d0c7 in BackendStartup (port=0x846c918) at postmaster.c:2830
#19 0x0821ab22 in ServerLoop () at postmaster.c:1274
#20 0x0821a52f in PostmasterMain (argc=1, argv=0x8456070) at postmaster.c:1029
#21 0x081be07b in main (argc=1, argv=0x8456070) at main.c:188
-----
Regards,
--
Yoshiyuki Asaba
y-asaba@sraoss.co.jp
pgsql-hackers by date: