[Bug 435997] [NEW] wordlist2dawg segfaults on a small wordlist

Neskie Manuel neskiem at gmail.com
Thu Sep 24 15:48:34 UTC 2009


Public bug reported:


wordlist2dawg segfaults on even a small list.  This list  used is here.

ell
Hello
hello
Kukstsemc
qelmúcw
Secwepemc
te
t̓e
The
the
weytk


The culprit is in training/wordlist2dawg.cpp.  I think it has something to do with the memory allocation, that looks insane.

    EDGE_ARRAY dawg;
    inT32 max_num_edges =  100000000;
    inT32 reserved_edges =  1000000;

    dawg = (EDGE_ARRAY) Emalloc(sizeof (EDGE_RECORD) * max_num_edges);

It's not dynamically increased to what's needed.  wordlist2dawg works
out of svn, and it looks like they fixed it.

I took off two zeros from max_num_edges and reserved_edges and put it in
/usr/local/bin

I dont know if this is fixed in karmic.

** Affects: tesseract (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: ocr

-- 
wordlist2dawg segfaults on a small wordlist
https://bugs.launchpad.net/bugs/435997
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


More information about the universe-bugs mailing list