Menu

#313 hfst-regexp2fst triggers stack-smashing

future
open
nobody
regexp2fst (7)
1
2015-09-20
2015-09-20
No

When fiddling with omorfi updated to UPOS tags, some regexps started to segfault. I've attached two files, one compiles correctly and has problematic spots marked with Foo, second one segfaults. Ideally second one should print more informative error message (it has errors in the regex).

$ hfst-regexp2fst -v -j -S -o /dev/null non-stack-smashing.regex 
Output format not specified, defaulting to openfst tropical
Reading from stack-smashing.regex, writing to /dev/null
Compiling expression #1
Compiling expression #2

$ hfst-regexp2fst -v -j -S -o /dev/null stack-smashing.regex 
Output format not specified, defaulting to openfst tropical
Reading from stack-smashing.regex, writing to /dev/null
Compiling expression #1
*** stack smashing detected ***: hfst-regexp2fst terminated
Muistialueen ylitys
2 Attachments

Discussion