Issue 66583 - crash in lingucomponent spell checker
Summary: crash in lingucomponent spell checker
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: spell checking (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 10:53 UTC by thomas.lange
Modified: 2013-02-24 20:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.lange 2006-06-20 10:53:41 UTC
The following stack is from a crashreport (internal bug ID 133501):

===================================

00e1f61c 62517f73 spell680mi!HashMgr::add_word(char* word = 00e1f640
"Abfrageeinrichtung", int wl = 0x12, char* aff = 00e1f653 "P", int al = 1)+0x96
[o:\src680\src.m3\lingucomponent\source\spellcheck\myspell\hashmgr.cxx @ 102]
00e1f740 62517fc2 spell680mi!HashMgr::load_tables(char* tpath = 7c38b548
"")+0x115 [o:\src680\src.m3\lingucomponent\source\spellcheck\myspell\hashmgr.cxx
@ 183]
00e1f750 6251498b spell680mi!HashMgr::HashMgr(char* tpath = 05281a28 "")+0x15
[o:\src680\src.m3\lingucomponent\source\spellcheck\myspell\hashmgr.cxx @ 22]
00e1f764 62511b76 spell680mi!MySpell::MySpell(char* affpath = 05281948 "", char*
dpath = 05281a28 "")+0x25
[o:\src680\src.m3\lingucomponent\source\spellcheck\myspell\myspell.cxx @ 17]
00e1f7d4 6251361c spell680mi!SpellChecker::GetSpellFailure(rtl::OUString* rWord
= 05281990 , com::sun::star::lang::Locale* rLocale = 00e1f840 )+0x1ef
[o:\src680\src.m3\lingucomponent\source\spellcheck\spell\sspellimp.cxx @ 337]

===================================

There are 8 reports for this one.


The code looks like

int HashMgr::add_word(const char * word, int wl, const char * aff, int al)
{
    int i = hash(word);
    struct hentry * dp = &tableptr[i];
    struct hentry* hp;
    if (dp->word == NULL) {
       dp->wlen = wl;
       dp->alen = al;
       dp->word = mystrdup(word);
       dp->astr = mystrdup(aff);
       dp->next = NULL;
       if ((wl) && (dp->word == NULL)) return 1;
       if ((al) && (dp->astr == NULL)) return 1;
    } else {
       hp = (struct hentry *) malloc (sizeof(struct hentry));
       if (hp == NULL) return 1;
       hp->wlen = wl;
       hp->alen = al;
       hp->word = mystrdup(word);
       hp->astr = mystrdup(aff);
       hp->next = NULL;      
       while (dp->next != NULL) dp=dp->next; 
       dp->next = hp;
       if ((wl) && (hp->word == NULL)) return 1;
       if ((al) && (hp->astr == NULL)) return 1;
    }
    return 0;
}     

According to the report the crash takes place in the line
       while (dp->next != NULL) dp=dp->next;
Comment 1 thomas.lange 2006-06-20 10:55:34 UTC
The source base is OOO680m3.
Comment 2 Mathias_Bauer 2007-12-04 16:40:08 UTC
target 3.0
Comment 3 Martin Hollmichel 2008-08-18 14:38:19 UTC
set target to 3.x