Le dimanche 22 juillet 2007 Ã 15:10 +0100, jamie a Ãcrit :
On Sun, 2007-07-22 at 16:04 +0200, Laurent Aguerreche wrote:Le dimanche 22 juillet 2007 Ã 14:51 +0100, jamie a Ãcrit :On Sun, 2007-07-22 at 15:32 +0200, Michael Biebl wrote:2007/7/22, jamie <jamiemcc blueyonder co uk>:can you pls do a valgrind -v trackerd memory corruption is obviously happening somewhere and only valgrind can tell us whereAttached. HTH. MichaelI have reverted laurents changes to set language and get default language can you retest with latest svnHum... I only changed some "tracker_log()" and cosmetic things like "i=0" => "i = 0"... In tracker-utils.c : char *stem_language; /* set default language */ stem_language = "english"; if (language) { int i; for (i = 0; tmap[i].lang; i++) { if ((strcasecmp (tmap[i].lang, language) == 0)) { stem_language = tmap[i].name; break; } } } stem_language is set to "english" and I think stem_language is statically allocated for 7 bytes. What would happen with "portuguese" in tmp[i].name for instance?!stem_language = "english"; thats a pointer to the stack so does not matter? (IE its not heap allocated)
Oups! Yes, you're right... In tmap declaration, there is: static Matches tmap[] = { {"da", "danish"}, [....] {"ru", "russian"}, {"es", "spanish"}, {"sv", "swedish"}, {NULL, 0}, }; At end, it should be {NULL, NULL}. No? But it won't change anything here...
tmap[i].name is also constant - I guess stem_language should be defined const char *
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=