SergeyDjam / stardict-3

Automatically exported from code.google.com/p/stardict-3
GNU General Public License v3.0
0 stars 0 forks source link

dictd2dic segfaults on linux (tested on debian unstable and ubuntu 10.10) #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. copy the attached dictionary files (which work fine in dictd, btw) and 
dictd2dic into a temp directory
2. # ./dictd2dic trv-zht
3.

What is the expected output? What do you see instead?
dictd2dic immediately segfaults.

What version of the product are you using? On what operating system?
Tried source from hg, stardict-tools 3.0.2 and stardict-tools 3.0.1 from debian 
and ubuntu 10.10 respectively.

Please provide any additional information below.

using gdb ./dictd2dic and then 'run trv-zht' reports a segfault at line 208 of 
dictd2dic.cpp:

convert (basefilename=0xbffff8e8 "trv-zht") at dictd2dic.cpp:208
208         while (d_size && g_ascii_isspace(*(worditem.definition+d_size-1))) {
(gdb) print d_size && g_ascii_isspace(*(worditem.definition+d_size-1))
No symbol "g_ascii_isspace" in current context.
(gdb) print g_ascii_isspace(*(worditem.definition+d_size-1))
No symbol "g_ascii_isspace" in current context.
(gdb) print worditem.definition+d_size-1
$1 = (gchar *) 0x9ae25a3d <Address 0x9ae25a3d out of bounds>
(gdb) print worditem.definition
$2 = (
    gchar *) 0xb6e0a192 "Abis,阿比司(男子名)\r\naga,弓\r\nAgih,阿吉呵(女子名)\r\nAgil,阿吉兒(女子名)\r\nAgin,阿戈音(女子名)\r\nAgu,阿古(男子名)\r\nAkang,阿干(男子名)\r\nAkaw,阿高(男子名)\r\nAlay,阿萊"...

Original issue reported on code.google.com by arne.goe...@gmail.com on 24 Nov 2011 at 3:07

Attachments:

GoogleCodeExporter commented 9 years ago
oh, rename trv_zht.* to trv-zht.* :)

Original comment by arne.goe...@gmail.com on 24 Nov 2011 at 3:09

GoogleCodeExporter commented 9 years ago
Fixed! Try the source codes in hg!

Original comment by huzheng...@gmail.com on 16 Feb 2012 at 7:10