GNUAspell / aspell

http://aspell.net
GNU Lesser General Public License v2.1
243 stars 52 forks source link

aspell still crash on almost all long Russian mistypes #343

Closed aspell-helper closed 7 years ago

aspell-helper commented 18 years ago

Lexan Palych olddaos\@sf created a bug report on 2005-11-11 15:35:13 UTC (Orig. from https://sourceforge.net/p/aspell/bugs/173)

Hello all!

My system is: i386, 4.10-STABLE FreeBSD, generic kernel.

I have aspell 0.60.4, and I tried to use it like a filter for processing very long Russian texts with 50% mistypes. Unfortunately, I wasn't able to do it due to its weird behaviour. It seems like it crashes on any sequence of glued words like
"unscrewyourdriver", "??????????????????", "???????????????" (regardless of language!).

I had compiled aspell with CFLAGS='-ggdb3 -g3' and CXXFLAGS='-ggdb3 -g3' and here I provide backtrace using gdb and coredump file.

This bug is not system dependant, i.e. I had achieved same results on amd64, and on many different 32-bit Intel-based FreeBSD systems. Here are sessions I had:

1) akosenkov@akosenkov:/home/akosenkov/> /usr/local/bin/aspell
--mode=none pipe @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.4) ?????????????????? Segmentation fault (core dumped)

Here are backtrace using gdb: (gdb) bt #​0 0x2f481b in ?? () #​1 0x481aaefe in aspeller::AffixMgr::affix_check (this=0x80d1000, linf=@0xbfbfea74, word={str_ = 0x80922b0 "???????????????", size_ = 4294967295}, ci=@0x8092ca0, gi=0x0) at modules/speller/default/affix.cpp:843 #​2 0x4818667f in aspeller::SpellerImpl::check_affix (this=0x8092c00, word={str_ = 0x80922b0 "???????????????", size_ = 4294967295}, ci=@0x8092ca0, gi=0x8092dc0) at modules/speller/default/speller_impl.cpp:149 #​3 0x4818e6e0 in aspeller::SpellerImpl::check2 (this=0x8092c00, word=0x80922b0 "???????????????", try_uppercase=false, ci=@0x8092ca0, gi=0x8092dc0) at modules/speller/default/speller_impl.cpp:162 #​4 0x481867c5 in aspeller::SpellerImpl::check (this=0x8092c00, word=0x80922b0 "???????????????", word_end=0x80922bf "", try_uppercase=false, run_together_limit=0, ci=0x8092ca0, gi=0x8092dc0) at modules/speller/default/speller_impl.cpp:182 #​5 0x4818e2bc in aspeller::SpellerImpl::check (this=0x8092c00, word={str = 0x80922b0 "???????????????", size = 15}) at modules/speller/default/speller_impl.hpp:104 #​6 0x4818e3ec in aspeller::SpellerImpl::check (this=0x8092c00, word={str_ = 0x80abe00 "???????????????", size_ = 15}) at modules/speller/default/speller_impl.hpp:110 #​7 0x4818e461 in aspeller::SpellerImpl::check (this=0x8092c00, word=0x80abe00 "???????????????") at modules/speller/default/speller_impl.hpp:113 #​8 0x4815d479 in {anonymous}::Working::try_split (this=0xbfbfedf8) at modules/speller/default/suggest.cpp:577 #​9 0x4815c27b in {anonymous}::Working::get_suggestions (this=0xbfbfedf8, sug=@0x8091790) at modules/speller/default/suggest.cpp:299 #​10 0x48161f92 in {anonymous}::SuggestImpl::suggest (this=0x8091780, word=0x80abc80 "?????????????????") at modules/speller/default/suggest.cpp:1326 #​11 0x48186408 in aspeller::SpellerImpl::suggest (this=0x8092c00, word={str = 0x80abc80 "?????????????????", size = 17}) at modules/speller/default/speller_impl.cpp:125 #​12 0x481cb8b0 in aspell_speller_suggest (ths=0x8092c00, word=0x80abc00 "?????????????????", word_size=-1) at lib/speller-c.cpp:148 #​13 0x8059a36 in pipe () at prog/aspell.cpp:883 #​14 0x8055e06 in main (argc=3, argv=0xbfbff7c8) at prog/aspell.cpp:408

Thank you in advance for any help on how to resolve this situation.

I'm looking forward for your reply and I'm ready to provide any additional information, that can help.

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf commented on 2005-11-12 05:41:04 UTC

Logged In: YES user_id=6591

Can you please attach a small list of words which cause the crash so that I can see somthing other than "?????...".

aspell-helper commented 18 years ago

Lexan Palych olddaos\@sf commented on 2005-11-12 15:31:02 UTC

Logged In: YES user_id=1376640

Oh, I'm sorry that I had not managed to ensure, that Russian words were displayed correctly! In fact you can use any syntetic words like "unscrewyourdriver". I had performed _syntetic_ tests on words like this, and had found, that this bug is compiler-dependant. It cannot be reproduced using gcc 3.4*, and always observable when compiled using gcc 2.95.4.

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf commented on 2005-11-12 21:11:24 UTC

Logged In: YES user_id=6591

I would still like a list of russion words to be able to easilly reporoduce the problem.

aspell-helper commented 18 years ago

Sure tresure\@sf commented on 2006-01-09 17:08:38 UTC

Logged In: YES user_id=1423110

I can add also "unscrewdrivers" - many words, length more then 12-13 can crash aspell.

If you want russian words: "копарнокопытное"

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf commented on 2006-01-21 11:00:14 UTC

Logged In: YES user_id=6591

Ok, by compiling Aspell with 2.95 I can reproduce it. I will try to have it fixed for Aspell 0.60.5

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf commented on 2006-01-21 14:27:26 UTC

Fix cvs.diff

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf commented on 2006-01-21 14:27:26 UTC

Logged In: YES user_id=6591

The attached patch should fix the bug. Please try it out and let me know if it does or doesn't.

aspell-helper commented 18 years ago

Kevin Atkinson kevina\@sf updated the issue on 2006-01-21 14:27:26 UTC