https://bugzilla.novell.com/show_bug.cgi?id=253788
------- Comment #4 from mfabian@novell.com 2007-03-13 13:07 MST -------
Explanation of the the 64bit.patch from my old mail to the
kasumi author:
From: Mike FABIAN
Subject: Some patches for kasumi 2.0.1
To: Takashi Nakamoto
Date: Tue, 29 Aug 2006 18:04:34 +0200
While updating kasumi to version 2.0.1 in the openSUSE distribution
and testing it I found some small problems which I could fix by
the attached patches.
[...]
The second patch "64bit.patch" fixes crashes on x86_64 which occur
when one tries to add new words.
See KasumiMainWindow.cxx line 295:
WordList = gtk_list_store_new(NUM_COLS,G_TYPE_UINT,
G_TYPE_STRING,G_TYPE_STRING,
G_TYPE_UINT,G_TYPE_STRING);
SortList = gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(WordList));
and KasumiMainWindow.hxx line 40:
enum column_name
{
COL_ID = 0,
COL_WORD,
COL_YOMI,
COL_FREQ,
COL_PART,
NUM_COLS
};
I.e. the data type of COL_ID is G_TYPE_UINT which is an unsigned int
which is 4 bytes long on x86_64.
But in KasumiMainWindow.cxx line 479 a size_t data type is used
for the variable "id":
size_t id;
gtk_tree_model_get(SortList, &iter, COL_ID, &id, -1);
KasumiWord *word = KasumiWord::getWordFromID(id);
As size_t is 8 bytes long on x86_64. Therefore, after calling
gtk_tree_model_get(), "id" contains a huge meaningless number and
kasumi crashes when trying to access KasumiWord::words[id] in
KasumiWord.cxx line 276:
KasumiWord* KasumiWord::getWordFromID(unsigned int id)
{
return KasumiWord::words[id];
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.