Steps to reproduce:
Expected result: voikkospell should function normally.
Actual result: voikkospell throws a segmentation fault:
:::gdb
602 else if (strcmp(info->Name(), "description") == 0)
(gdb)
Breakpoint 1, 0x00007fff86c11c00 in strlen ()
(gdb)
Single stepping until exit from function strlen,
which has no line number information.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff86c11c00 in strlen ()
(gdb)
This happens around line 602 in the function ZHfstOspellerXmlMetadata::parse_info in ZHfstOspellerXmlMetadata.cc, or in the function ZHfstOspellerXmlMetadata::parse_description in the same file.
Running hfst-ospell through libvoikko is necessary, since hfst-ospell itself doesn't parse the metadata (and has no means of displaying the metadata). It would be good to add a simple option to print metadata in the zhfst file, just to be able to verify the integrity of both hfst-ospell and the zhfst file.
It is likely that the same error exists also when using libxml2++ - the bug has been there for longer than the TinyXML2 support, IIRC.
Forget the text in the final paragraph about adding an option to print metadata - it is already there (= --verbose).
Forgot to mention the system: MacOSX 10.6 and 10.9.
empty descriptions should now throw parsing errors in [r3643].
Related
Commit: [r3643]
I guess this bug report can closed now.