#178 Hunspell 1.2.14 crashes with some PHONE commands

closed-duplicate
None
5
2011-01-17
2011-01-15
Anonymous
No

Hi,

I report there a bug that an Archlinux user told me about recently.
In French : http://www.dicollecte.org/thread.php?prj=fr&t=128

I added in the latest French dictionary (4.0) several experimental PHONE commands. It does no wrong with the current Firefox (3.6.13) and the current Thunderbird (3.1.7) (I am a Windows user).

But these PHONE commands make Firefox and Thunderbird crash with Hunspell 1.2.14-1 on Archlinux.

=== The Archlinux user configuration ===

Archlinux updated
Hunspell 1.2.14-1
Hunspell-fr NOT installed
Firefox 3.6.13
French “Modern” dictionary extension 4.0 : https://addons.mozilla.org/en-US/firefox/addon/french-dictionary-modern-spell/

=== How to reproduce the bug ===

In a textarea field, type :

gaetan
---> underlined with red ---> ask suggestions ---> Firefox crashes

poisssson
---> underlined with red ---> ask suggestions ---> Firefox crashes

poissson
---> underlined with red ---> ask suggestions ---> OK, suggestions offered

=== Here is the PHONE commands I used in the v4.0 dictionary ===

PHONE 69
PHONE AN(DT)$ @
PHONE AILL AY
PHONE AIS$ E
PHONE AIT$ E
PHONE AI E
PHONE A A
PHONE BB- _
PHONE B B
PHONE CH C
PHONE CQ K
PHONE C(CT) KS
PHONE C(AOU)- K
PHONE C(EI)- S
PHONE C K
PHONE DD- _
PHONE D D
PHONE EE- _
PHONE EN(DT) @
PHONE EMM @M
PHONE EILL EY
PHONE EI E
PHONE EU 2
PHONE ER$ E
PHONE ET$ E
PHONE E E
PHONE FF- _
PHONE F F
PHONE G(EI)- J
PHONE G(AOU)- G
PHONE GG- _
PHONE G G
PHONE H _
PHONE IN(CDFGJKLPQRSTVWXZ)- 1
PHONE IM(BP)- 1
PHONE I I
PHONE J J
PHONE K K
PHONE LL- _
PHONE L L
PHONE MM- _
PHONE M M
PHONE NN- _
PHONE N N
PHONE ON(CDFGHJKLMPQRSTVWXZ)- 0
PHONE ON(BP)- 0
PHONE OI OA
PHONE O O
PHONE PP- _
PHONE P P
PHONE QU K
PHONE Q K
PHONE RR- _
PHONE R R
PHONE SH C
PHONE SS S
PHONE S^ S
PHONE S(AEIOUY)- Z
PHONE S S
PHONE TT T
PHONE T T
PHONE UN$ 1
PHONE UN *N
PHONE U U
PHONE V V
PHONE W V
PHONE X KS
PHONE Y(AIEOU)- Y
PHONE Y I
PHONE Z Z

Even if I did something wrong, Hunspell should not crash.

Discussion


  • Anonymous
    2011-01-16

    Duplicate of 3158994

     
  • Olivier R.
    Olivier R.
    2011-01-16

    Not sure it’s the same bug.

    Removing the PHONE commands in the affixes file solves the issue.

     
    • assigned_to: nobody --> nemethl
    • status: open --> open-accepted
     
  • Reproduced in Linux command line. PHONE hasn't supported Unicode yet, but it uses 8 bit capitalization for UTF-8 strings (this was OK for plain latin alphabet). I believe, some recent optimalization (removing 8-bit capitalization support in the case of UTF-8 encoded dictionaries) results this bug. I will try to fix it next day.

     
    • status: open-accepted --> closed-duplicate
     
  • Fixed in the CVS, see also the attached patch in the issue 3158994. Thanks for your reports. Now PHONE handles the letters with diacritics, too (except the parenthesized character classes of the PHONE rules).