lttoolbox
lttoolbox copied to clipboard
lt-print segfaults on heb-mlt.autobil.bin
fran@matxine:~/source/apertium/staging/apertium-mlt-heb$ make
apertium-validate-dictionary apertium-mlt-heb.mlt-heb.dix
lt-comp rl apertium-mlt-heb.mlt-heb.dix heb-mlt.autobil.bin
lt-trim .deps/heb.automorf.bin heb-mlt.autobil.bin heb-mlt.automorf.bin
Error: empty set of final states
Makefile:764: recipe for target 'heb-mlt.automorf.bin' failed
make: *** [heb-mlt.automorf.bin] Error 1
fran@matxine:~/source/apertium/staging/apertium-mlt-heb$ ls -lsrth heb-mlt.autobil.bin
8,0K -rw-r--r-- 1 fran fran 6,6K oct 27 03:34 heb-mlt.autobil.bin
fran@matxine:~/source/apertium/staging/apertium-mlt-heb$ lt-print heb-mlt.autobil.bin
Violació de segment
fran@matxine:~/source/apertium/staging/apertium-mlt-heb$ gdb lt-print
GNU gdb (Debian 8.1-4+b1) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lt-print...done.
(gdb) run heb-mlt.autobil.bin
Starting program: /home/fran/local/bin/lt-print heb-mlt.autobil.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79fc3fa in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff79fc3fa in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x000055555555687a in std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const, Transducer> >::operator-- (this=<synthetic pointer>) at /usr/include/c++/7/bits/stl_tree.h:310
#2 main (argc=<optimized out>, argv=<optimized out>) at lt_print.cc:111
(gdb)
Ok, this seems like a classic error and might be a duplicate. Here is the fix:
diff --git a/apertium-mlt-heb.mlt-heb.dix b/apertium-mlt-heb.mlt-heb.dix
index 8c75d3d..d9dd506 100644
--- a/apertium-mlt-heb.mlt-heb.dix
+++ b/apertium-mlt-heb.mlt-heb.dix
@@ -88,6 +88,7 @@
<pardef n="gd_m_f">
<e r="LR"><p><l><s n="GD"/></l><r><s n="m"/></r></p></e>
<e r="LR"><p><l><s n="GD"/></l><r><s n="f"/></r></p></e>
+ <e><p><l></l><r></r></p></e>
</pardef>
</pardefs>