BUG #16050: Server crash on CREATE TEXT SEARCH DICTIONARY with a wrong AffFile

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16050: Server crash on CREATE TEXT SEARCH DICTIONARY with a wrong AffFile
Дата
Msg-id 16050-024ae722464ab604@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16050: Server crash on CREATE TEXT SEARCH DICTIONARY with awrong AffFile  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16050
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 12.0
Operating system:   Ubuntu 18.04
Description:

The following query:
CREATE TEXT SEARCH DICTIONARY hunspell_num (Template=ispell,
DictFile=hunspell_sample_num, AffFile=hunspell_sample_long);

crashes postgres with the stack trace:
Core was generated by `postgres: law regression [local] CREATE TEXT SEARCH
DICTIONARY                '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000056512c61b72e in getCompoundAffixFlagValue
(Conf=Conf@entry=0x56512e9d9f70, s=<optimized out>) at spell.c:1126
1126            while (*flagcur)
(gdb) bt
#0  0x000056512c61b72e in getCompoundAffixFlagValue
(Conf=Conf@entry=0x56512e9d9f70, s=<optimized out>) at spell.c:1126
#1  0x000056512c61c00b in makeCompoundFlags (Conf=Conf@entry=0x56512e9d9f70,
affix=<optimized out>) at spell.c:1608
#2  0x000056512c61c16e in mkSPNode (Conf=Conf@entry=0x56512e9d9f70,
low=low@entry=0, high=high@entry=1, 
    level=level@entry=3) at spell.c:1680
#3  0x000056512c61c22b in mkSPNode (Conf=Conf@entry=0x56512e9d9f70,
low=low@entry=0, high=high@entry=1, 
    level=level@entry=2) at spell.c:1692
#4  0x000056512c61c116 in mkSPNode (Conf=Conf@entry=0x56512e9d9f70,
low=low@entry=0, high=high@entry=4, 
    level=level@entry=1) at spell.c:1652
#5  0x000056512c61c116 in mkSPNode (Conf=Conf@entry=0x56512e9d9f70,
low=low@entry=0, high=9, level=level@entry=0)
    at spell.c:1652
#6  0x000056512c61d9eb in NISortDictionary (Conf=Conf@entry=0x56512e9d9f70)
at spell.c:1785
#7  0x000056512c61936d in dispell_init (fcinfo=<optimized out>) at
dict_ispell.c:89
#8  0x000056512c73c7c9 in FunctionCall1Coll
(flinfo=flinfo@entry=0x7ffc6b41a860, collation=collation@entry=0, 
    arg1=arg1@entry=94906674394208) at fmgr.c:1140
#9  0x000056512c73cffb in OidFunctionCall1Coll
(functionId=functionId@entry=3731, collation=collation@entry=0, 
    arg1=94906674394208) at fmgr.c:1418
#10 0x000056512c46c88b in verify_dictoptions (tmplId=tmplId@entry=3733,
dictoptions=<optimized out>, 
    dictoptions@entry=0x56512e9d59e8) at tsearchcmds.c:402
#11 0x000056512c46e6b1 in DefineTSDictionary (names=<optimized out>,
parameters=<optimized out>) at tsearchcmds.c:463
#12 0x000056512c610c6d in ProcessUtilitySlow
(pstate=pstate@entry=0x56512e9d32f8, pstmt=pstmt@entry=0x56512e9b3a08, 
    queryString=queryString@entry=0x56512e9b2628 "CREATE TEXT SEARCH
DICTIONARY hunspell_num (Template=ispell, DictFile=hunspell_sample_num,
AffFile=hunspell_sample_long);",
context=context@entry=PROCESS_UTILITY_TOPLEVEL, 
    params=params@entry=0x0, queryEnv=queryEnv@entry=0x0,
dest=0x56512e9b3b00, completionTag=0x7ffc6b41af50 "")
    at utility.c:1272
#13 0x000056512c61042e in standard_ProcessUtility (pstmt=0x56512e9b3a08, 
    queryString=0x56512e9b2628 "CREATE TEXT SEARCH DICTIONARY hunspell_num
(Template=ispell, DictFile=hunspell_sample_num,
AffFile=hunspell_sample_long);", context=PROCESS_UTILITY_TOPLEVEL,
params=0x0, queryEnv=0x0, dest=0x56512e9b3b00, 
    completionTag=0x7ffc6b41af50 "") at utility.c:927
#14 0x000056512c6104dc in ProcessUtility (pstmt=pstmt@entry=0x56512e9b3a08,
queryString=<optimized out>, 
    context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=<optimized out>,
queryEnv=<optimized out>, 
    dest=dest@entry=0x56512e9b3b00, completionTag=0x7ffc6b41af50 "") at
utility.c:360
#15 0x000056512c60c983 in PortalRunUtility
(portal=portal@entry=0x56512ea198d8, pstmt=pstmt@entry=0x56512e9b3a08, 
    isTopLevel=isTopLevel@entry=true,
setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x56512e9b3b00,

    completionTag=completionTag@entry=0x7ffc6b41af50 "") at pquery.c:1175
#16 0x000056512c60d5d2 in PortalRunMulti
(portal=portal@entry=0x56512ea198d8, isTopLevel=isTopLevel@entry=true, 
    setHoldSnapshot=setHoldSnapshot@entry=false,
dest=dest@entry=0x56512e9b3b00, altdest=altdest@entry=0x56512e9b3b00, 
    completionTag=completionTag@entry=0x7ffc6b41af50 "") at pquery.c:1321
#17 0x000056512c60e342 in PortalRun (portal=portal@entry=0x56512ea198d8,
count=count@entry=9223372036854775807, 
    isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true,
dest=dest@entry=0x56512e9b3b00, 
    altdest=altdest@entry=0x56512e9b3b00, completionTag=0x7ffc6b41af50 "")
at pquery.c:796
#18 0x000056512c60a5f2 in exec_simple_query (
    query_string=query_string@entry=0x56512e9b2628 "CREATE TEXT SEARCH
DICTIONARY hunspell_num (Template=ispell, DictFile=hunspell_sample_num,
AffFile=hunspell_sample_long);") at postgres.c:1215
#19 0x000056512c60c5c2 in PostgresMain (argc=<optimized out>,
argv=argv@entry=0x56512e9dd9d8, dbname=<optimized out>, 
    username=<optimized out>) at postgres.c:4236
#20 0x000056512c57ea53 in BackendRun (port=port@entry=0x56512e9d60b0) at
postmaster.c:4437
#21 0x000056512c581d19 in BackendStartup (port=port@entry=0x56512e9d60b0) at
postmaster.c:4128
#22 0x000056512c582030 in ServerLoop () at postmaster.c:1704
#23 0x000056512c583421 in PostmasterMain (argc=3, argv=<optimized out>) at
postmaster.c:1377
#24 0x000056512c4dec13 in main (argc=3, argv=0x56512e9aca00) at main.c:228


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16049: log_line_prefix=%a and log_connections - application_name missing
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: BUG #16050: Server crash on CREATE TEXT SEARCH DICTIONARY with awrong AffFile